最新消息:不要跟我说什么底层原理、框架内核!老夫敲代码就是一把梭! 复制,粘贴,拿起键盘就是干!!

ffmpeg mov转mp4格式

软件·服务器 楚盟 1927浏览 0评论

这篇文章测试的是用ffmpeg直接将mov格式专程mp4格式,简单粗暴用默认参数不修改指定其它参数;

转换后的视频参数没有太大变化,视频格式依旧是H264 音频依旧是AAC 视音频码率及分辨率等等没有改变,这次我测试的是一个3.4G大小的文件转换后体积略微有缩小;

ffmpeg -i movie.mov -vcodec copy -acodec copy out.mp4

转码过程

[root@vultr Downloads]# ffmpeg -i movie.MOV -vcodec copy -acodec copy out.mp4
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jan 29 2012 17:53:48 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0

Seems stream 0 codec frame rate differs from container frame rate: 1200.00 (1200/1) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'movie.MOV':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
  Duration: 00:26:54.39, start: 0.000000, bitrate: 17189 kb/s
    Stream #0.0(und): Video: h264, yuv420p, 1920x1080, 17072 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 1200 tbc
    Stream #0.1(und): Audio: aac, 44100 Hz, mono, s16, 89 kb/s
    Stream #0.2(und): Data: mebx / 0x7862656D, 19 kb/s
    Stream #0.3(und): Data: mebx / 0x7862656D
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf52.64.2
    Stream #0.0(und): Video: libx264, yuv420p, 1920x1080, q=2-31, 17072 kb/s, 600 tbn, 600 tbc
    Stream #0.1(und): Audio: libfaac, 44100 Hz, mono, 89 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame=48394 fps=1546 q=-1.0 Lsize= 3382799kB time=1614.29 bitrate=17166.6kbits/s
video:3364280kB audio:17579kB global headers:0kB muxing overhead 0.027791%

MOV原始视频参数:

Seems stream 0 codec frame rate differs from container frame rate: 1200.00 (1200/1) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '御膳煲录像.MOV':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
  Duration: 00:26:54.39, start: 0.000000, bitrate: 17189 kb/s
    Stream #0.0(und): Video: h264, yuv420p, 1920x1080, 17072 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 1200 tbc
    Stream #0.1(und): Audio: aac, 44100 Hz, mono, s16, 89 kb/s
    Stream #0.2(und): Data: mebx / 0x7862656D, 19 kb/s
    Stream #0.3(und): Data: mebx / 0x7862656D
At least one output file must be specified

MOV转换成mp4后的视频参数信息:

Seems stream 0 codec frame rate differs from container frame rate: 1200.00 (1200/1) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf52.64.2
  Duration: 00:26:54.39, start: 0.000000, bitrate: 17165 kb/s
    Stream #0.0(und): Video: h264, yuv420p, 1920x1080, 17072 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 1200 tbc
    Stream #0.1(und): Audio: aac, 44100 Hz, mono, s16, 89 kb/s
At least one output file must be specified

可见视频比特率从17189kb/s(原始MOV视频)略微降至了17165kb/s(转换后的MP4视频),分辨率没有发生改变依然是1920*1080,音频依旧是AAC 44100HZ 89kb/s;

转载请注明:楚盟网 » ffmpeg mov转mp4格式

发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址