最终工作的视频具有以下参数(来自 ffprobe 的输出)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf54.6.100
Duration: 00:02:03.74, start: 0.000000, bitrate: 917 kb/s
Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p , 480x360 [SAR 1:1 DAR 4:3], 786 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 22050 Hz, stereo, s16, 128 kb/s
Metadata:
handler_name : SoundHandler
0.00 A-V:-134874618Frame changed from size:0x0 to size:480x360
2.74 A-V: 0.070 fd= 9 aq= 7KB vq= 38KB sq= 0B f=0/0 f=0/0
要对此类文件进行编码,请为 ffmpeg 使用以下参数:
ffmpeg.exe -i "input_file.mov" -strict -2 -vcodec mpeg4 -vb 786k -acodec aac -ab 128k "output_file.mp4"