我刚刚安装了 ffmpeg,我正在尝试将所有上传的视频编码为 .mp4 文件。大多数用户目前上传 .mov,我想将每个视频转换为 .mp4。
我正在运行以下命令:
ffmpeg -i movie.mov -vcodec copy -acodec cop out.mp4
但我得到的只是以下错误
ffmpeg version 0.8.5, Copyright (c) 2000-2011 the FFmpeg developers built on Aug 19 2012 11:38:20 with clang 3.1 (tags/Apple/clang-318.0.61) configuration: --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libfaac --enable-libxvid --enable-libx264 --enable-libvpx --enable-hardcoded-tables --enable-shared --enable-pthreads --disable-indevs --cc=clang libavutil 51. 9. 1 / 51. 9. 1 libavcodec 53. 7. 0 / 53. 7. 0 libavformat 53. 4. 0 / 53. 4. 0 libavdevice 53. 1. 1 / 53. 1. 1 libavfilter 2. 23. 0 / 2. 23. 0 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'movie.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time : 2012-03-28 07:13:20 Duration: 00:00:26.23, start: 0.000000, bitrate: 12974 kb/s Stream #0.0(eng): Video: mjpeg, yuvj420p, 1280x720 [PAR 72:72 DAR 16:9], 12972 kb/s, 11.67 fps, 600 tbr, 600 tbn, 600 tbc Metadata: creation_time : 2012-03-28 07:13:20 File 'out.mp4' already exists. Overwrite ? [y/N] y Output #0, mp4, to 'out.mp4': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time : 2012-03-28 07:13:20 encoder : Lavf53.4.0 Stream #0.0(eng): Video: mjpeg, yuvj420p, 1280x720 [PAR 72:72 DAR 16:9], q=2-31, 12972 kb/s, 600 tbn, 600 tbc Metadata: creation_time : 2012-03-28 07:13:20 Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop, [?] for help frame= 121 fps= 0 q=-1.0 size= 16408kB time=00:00:10.08 bitrate=13332.2kbitsframe= 306 fps= 0 q=-1.0 Lsize= 41543kB time=00:00:26.12 bitrate=13025.0kbits/s video:41538kB audio:0kB global headers:0kB muxing overhead 0.012531%
将其流式传输到某些应用程序(如 Adobe Premiere Pro)所需的新容器(mp4)的命令, 无需编码 (快速)是:
ffmpeg -i input.mov -qscale 0 output.mp4
评论中提到的替代方案 ,它以最佳质量重新编码(-qscale 0):
-qscale 0
ffmpeg -i input.mov -q:v 0 output.mp4