Part of the answer references GPT, GPT_Pro to solve the problem better
According to the 16:9 ratio, width 2160 corresponds to height 1215, But libx264 and libx265 don't support odd resolutions, so they compress the video to 1214. Typically, such videos are 1/1214, 1/1215, or 1/1216. To enable encoder to encode 1215 video, we can use ffmpeg tool to implement.
When using the ffmpeg tool, you can use the following code:
ffmpeg -i input.mp4 -vf scale=2160:1215 output.mp4
Where input.mp4 is the input file and output.mp4 is the output file. Specify that you want to change the resolution of the video to 2160:1215 by adding the -vf parameter. This will change the original video resolution to 2160:1215 and generate a new video file.
In addition, ffmpeg has many features about image processing, such as cropping, rotation, compression, adding watermarks, and so on. Using ffmpeg can be very convenient for image processing or modification, effectively help us to deal with picture related problems.
If the answer is helpful, please accept it.