Linux/Unix:使用ffmpeg命令将AVI转换为MOV格式
时间:2020-01-09 10:40:13 来源:igfitidea点击:
如何在Linux下使用命令行选项将.avi文件格式转换为quicktime .mov文件格式?
您可以使用ffmpeg命令一个非常快速的视频和音频转换器,也可以从实时音频/视频源中获取视频。
语法为:
/usr/bin/ffmpeg -i "input.avi" -acodec libmp3lame -ab 192 "output.mov"
其中:
-i" input.avi"
:输入.avi文件。-acodec libmp3lame
:将音频编解码器强制为libmp3lam编解码器。-ab 192-bitrate
:将音频比特率设置为192 bit/s" output.mov"
:输出文件名。
例子
输入以下命令:
/usr/bin/ffmpeg -i "kids-birthday-party.avi" -acodec libmp3lame -ab 192 "/tmp/kids-dvd.mov"
输出示例:
ffmpeg version 0.7.13, Copyright (c) 2000-2011 the FFmpeg developers built on Jun 13 2012 14:14:09 with gcc 4.4.5 configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g ' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac --disable-decoder=libdirac --enable-libfreetype --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --extra-libs=-lgcrypt --disable-altivec --disable-armv5te --disable-armv6 --disable-vis libavutil 50. 43. 0 / 50. 43. 0 libavcodec 52.123. 0 / 52.123. 0 libavformat 52.111. 0 / 52.111. 0 libavdevice 52. 5. 0 / 52. 5. 0 libavfilter 1. 80. 0 / 1. 80. 0 libswscale 0. 14. 1 / 0. 14. 1 libpostproc 51. 2. 0 / 51. 2. 0 [mpeg4 @ 0x212edc0] Invalid and inefficient vfw-avi packed B frames detected Input #0, avi, from 'kids-birthday-party.avi': Metadata: encoder : VirtualDubMod 1.5.10.2 (build 2540/release) Duration: 01:29:51.92, start: 0.000000, bitrate: 1088 kb/s Stream #0.0: Video: mpeg4, yuv420p, 640x272 [PAR 1:1 DAR 40:17], 25 tbr, 25 tbn, 25 tbc Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 32 kb/s WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s [buffer @ 0x212ebe0] w:640 h:272 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param: Output #0, mov, to '/tmp/kids-dvd.mov': Metadata: encoder : Lavf52.111.0 Stream #0.0: Video: mpeg4, yuv420p, 640x272 [PAR 1:1 DAR 40:17], q=2-31, 200 kb/s, 25 tbn, 25 tbc Stream #0.1: Audio: libmp3lame, 48000 Hz, stereo, s16, 0 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop, [?] for help