📜  如何使用 ffmpeg 在 python 中对视频进行转码 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:44.345000             🧑  作者: Mango

代码示例1
ffmpeg -i input.mkv -c:a copy -s hd720 output.mkv
This modifies the video to 1280x720 in the output, but you can set the width and height manually if you want:

ffmpeg -i input.mkv -c:a copy -s 1280x720 output.mkv
This produces the exact same output as the earlier command. If you want to set custom sizes in FFmpeg, please remember that the width parameter (1280) comes before height (720).