我在OSX Lion上遇到ffmpeg问题。我试图转换mpeg文件,输出始终是一个大小为400kb左右的文件..
命令是:
ffmpeg -i out_poem_big.mpg -s 1280x720 -vpre medium outvideo.mp4
这是日志:
FFmpeg version 0.6.3, Copyright (c) 2000-2010 the FFmpeg developers
built on Feb 21 2012 21:57:04 with gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
configuration: --disable-debug --prefix=/usr/local/Cellar/ffmpeg/0.6.3 --enable-shared --enable-pthreads --enable-nonfree --enable-gpl --disable-indev=jack --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libfaad
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
libswscale 0.11. 0 / 0.11. 0
Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (60000/2002)
Input #0, mpeg, from 'out_poem_big.mpg':
Duration: 00:08:35.61, start: 1.000000, bitrate: 14823 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 104857 kb/s, 28.90 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x1c0]: Audio: mp2, 44100 Hz, 2 channels, s16, 128 kb/s
File 'outvideo.mp4' already exists. Overwrite ? [y/N] y
[libx264 @ 0x7fb7ca033600]using SAR=1/1
[libx264 @ 0x7fb7ca033600]using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x7fb7ca033600]profile High, level 3.1
[libx264 @ 0x7fb7ca033600]264 - core 120 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=200 ratetol=20.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.41 aq=1:1.00
Output #0, mp4, to 'outvideo.mp4':
Metadata:
encoder : Lavf52.64.2
Stream #0.0: Video: libx264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=10-51, 200 kb/s, 60k tbn, 29.97 tbc
Stream #0.1: Audio: libfaac, 44100 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
Input Stream #0.0 frame size changed to 1920x1080, yuv420p
我尝试了各种各样的vcodec,输出也是最好的,也试过-sameq但没有运气。
ffmpeg是通过自制软件安装的
它只是这个文件或ffmpeg吗?你是否介意发布一个类似的文件,你在公共场所遇到困难我们要测试?
—
fideli
我们可以看到文件/usr.local/share/ffmpeg/libx264-medium.ffpreset - 您正在使用的参数模板?也许它设置自己的视频大小或需要可被64像素左右整除的尺寸?
—
ZaB
@ZaB视频大小很好,看看输出流
—
slhck
#0.0
。你可以看到,比特率太低了。此外,ffpresets
不管怎么说都不应该使用。