hfeiop12 发表于 2013-10-30 09:10:35

ffmpeg 引用-vcodec libx264 会报错

ffmpeg 转化参数 ./ffmpeg -i "/video/c_054c0389_a.mp4" -ac 2 -ab 128 -ar 22050 -s 1024x768 -y -b 1200k -vcodec libx264 "/video/asssdas.flv"

错误:FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
built on Sep 11 2013 10:18:48 with gcc 4.1.2 20080704 (Red Hat 4.1.2-54)
configuration: --enable-gpl --enable-version3 --enable-postproc --enable-nonfree --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxvid --enable-libx264 --enable-libfaac --enable-pthreads --enable-swscale --enable-avfilter --disable-ffserver --disable-ffplay --enable-shared --arch=x86_64 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --prefix=/usr/local
libavutil   50.36. 0 / 50.36. 0
libavcore      0.16. 1 /0.16. 1
libavcodec    52.108. 0 / 52.108. 0
libavformat   52.93. 0 / 52.93. 0
libavdevice   52. 2. 3 / 52. 2. 3
libavfilter    1.74. 0 /1.74. 0
libswscale   0.12. 0 /0.12. 0
libpostproc   51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/video/c_054c0389_a.mp4':
Metadata:
    major_brand   : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.33.100
Duration: 00:00:25.07, start: 0.072562, bitrate: 1274 kb/s
    Stream #0.0(und): Video: h264, yuv420p, 1024x768, 1207 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc
    Stream #0.1(und): Audio: aac, 22050 Hz, stereo, s16, 64 kb/s
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
w:1024 h:768 pixfmt:yuv420p
broken ffmpeg default settings detected
use an encoding preset (e.g. -vpre medium)
preset usage: -vpre <speed> -vpre <profile>
speed presets are listed in x264 --help
profile is optional; x264 defaults to high
Output #0, flv, to '/video/asssdas.flv':
    Stream #0.0(und): Video: libx264, yuv420p, 1024x768, q=2-31, 1200 kb/s, 90k tbn, 24 tbc
    Stream #0.1(und): Audio: libmp3lame, 22050 Hz, stereo, s16, 0 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

孙悟空 发表于 2013-10-30 09:18:06

./ffmpeg -i "/video/c_054c0389_a.mp4"-vcodec libx264-b:v 1200k -r 25 -vprofile baseline -vlevel1.0 -acodec mp3 -ac 2 -ab 128 -ar 22050 -s 1024x768 -y -f flv "/video/asssdas.flv"

这么做试试

hfeiop12 发表于 2013-10-30 09:20:34

孙悟空 发表于 2013-10-30 09:18
./ffmpeg -i "/video/c_054c0389_a.mp4"-vcodec libx264-b:v 1200k -r 25 -vprofile baseline -vlevel ...

没报错 但是转化出来的 是0KB!

T-Bagwell 发表于 2013-10-30 09:21:11

hfeiop12 发表于 2013-10-30 09:20
没报错 但是转化出来的 是0KB!

能否将输出信息贴出来

hfeiop12 发表于 2013-10-30 09:21:12

孙悟空 发表于 2013-10-30 09:18
./ffmpeg -i "/video/c_054c0389_a.mp4"-vcodec libx264-b:v 1200k -r 25 -vprofile baseline -vlevel ...

您看下:FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
built on Sep 11 2013 10:18:48 with gcc 4.1.2 20080704 (Red Hat 4.1.2-54)
configuration: --enable-gpl --enable-version3 --enable-postproc --enable-nonfree --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxvid --enable-libx264 --enable-libfaac --enable-pthreads --enable-swscale --enable-avfilter --disable-ffserver --disable-ffplay --enable-shared --arch=x86_64 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --prefix=/usr/local
libavutil   50.36. 0 / 50.36. 0
libavcore      0.16. 1 /0.16. 1
libavcodec    52.108. 0 / 52.108. 0
libavformat   52.93. 0 / 52.93. 0
libavdevice   52. 2. 3 / 52. 2. 3
libavfilter    1.74. 0 /1.74. 0
libswscale   0.12. 0 /0.12. 0
libpostproc   51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/video/c_054c0389_a.mp4':
Metadata:
    major_brand   : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.33.100
Duration: 00:00:25.07, start: 0.072562, bitrate: 1274 kb/s
    Stream #0.0(und): Video: h264, yuv420p, 1024x768, 1207 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc
    Stream #0.1(und): Audio: aac, 22050 Hz, stereo, s16, 64 kb/s
Unrecognized option 'b:v'

T-Bagwell 发表于 2013-10-30 09:26:35

hfeiop12 发表于 2013-10-30 09:21
您看下:FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
built on Sep 11...

如果可以的话,换一个新版本的ffmpeg吧
$ ffmpeg -i "./yedian.avi"-vcodec libx264-b:v 1200k -r 25 -vprofile baseline -vlevel1.0 -acodec mp3 -ac 2 -ab 128 -ar 22050 -s 1024x768 -y -f flv "./asssdas.flv"
ffmpeg version N-57291-g80b8f78 Copyright (c) 2000-2013 the FFmpeg developers
built on Oct 22 2013 06:43:55 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
configuration: --enable-libx264 --enable-libmp3lame --enable-gpl
libavutil      52. 47.101 / 52. 47.101
libavcodec   55. 37.102 / 55. 37.102
libavformat    55. 19.103 / 55. 19.103
libavdevice    55.4.100 / 55.4.100
libavfilter   3. 88.102 /3. 88.102
libswscale      2.5.101 /2.5.101
libswresample   0. 17.104 /0. 17.104
libpostproc    52.3.100 / 52.3.100
Input #0, avi, from './yedian.avi':
Metadata:
    encoder         : VirtualDubMod 1.5.10.2 (build 2540/release)
Duration: 01:30:10.25, start: 0.000000, bitrate: 1086 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 640x352 , 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: mp3 (U / 0x0055), 48000 Hz, stereo, s16p, 129 kb/s
using SAR=15/11
frame MB size (64x48) > level limit (99)
DPB size (3 frames, 9216 mbs) > level limit (0 frames, 396 mbs)
MB rate (76800) > level limit (1485)
using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
profile Constrained Baseline, level 1.0
264 - core 133 r2334M a3ac64b - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=1200 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Bitrate 128 is extremely low, maybe you mean 128k
The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
Output #0, flv, to './asssdas.flv':
Metadata:
    encoder         : Lavf55.19.103
    Stream #0:0: Video: h264 (libx264) ( / 0x0007), yuv420p, 1024x768 , q=-1--1, 1200 kb/s, 1k tbn, 25 tbc
    Stream #0:1: Audio: mp3 (libmp3lame) ( / 0x0002), 22050 Hz, stereo, s16p, 0 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> libx264)
Stream #0:1 -> #0:1 (mp3 -> libmp3lame)
Press to stop, [?] for help
Video uses a non-standard and wasteful way to store B-frames ('packed B-frames'). Consider using a tool like VirtualDub or avidemux to fix it.
frame=525 fps=116 q=-1.0 Lsize=    3168kB time=00:00:21.65 bitrate=1198.2kbits/s   
video:2974kB audio:170kB subtitle:0 global headers:0kB muxing overhead 0.750449%
frame I:4   Avg QP:10.70size: 14751
frame P:521   Avg QP: 9.21size:5732
mb II16..4: 92.9%0.0%7.1%
mb PI16..4:2.9%0.0%1.2%P16..4:5.5%1.8%0.9%0.0%0.0%    skip:87.7%
final ratefactor: 13.49
coded y,uvDC,uvAC intra: 28.1% 34.5% 29.9% inter: 4.5% 4.4% 2.3%
i16 v,h,dc,p: 82%8%3%7%
i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 28% 13%4%7%7%7%4%5%
i8c dc,h,v,p: 71% 12%9%7%
ref P L0: 90.3%6.4%3.2%
kb/s:1160.08

hfeiop12 发表于 2013-10-30 09:26:40

T-Bagwell 发表于 2013-10-30 09:21
能否将输出信息贴出来

输出:FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
built on Sep 11 2013 10:18:48 with gcc 4.1.2 20080704 (Red Hat 4.1.2-54)
configuration: --enable-gpl --enable-version3 --enable-postproc --enable-nonfree --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxvid --enable-libx264 --enable-libfaac --enable-pthreads --enable-swscale --enable-avfilter --disable-ffserver --disable-ffplay --enable-shared --arch=x86_64 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --prefix=/usr/local
libavutil   50.36. 0 / 50.36. 0
libavcore      0.16. 1 /0.16. 1
libavcodec    52.108. 0 / 52.108. 0
libavformat   52.93. 0 / 52.93. 0
libavdevice   52. 2. 3 / 52. 2. 3
libavfilter    1.74. 0 /1.74. 0
libswscale   0.12. 0 /0.12. 0
libpostproc   51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/video/c_054c0389_a.mp4':
Metadata:
    major_brand   : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.33.100
Duration: 00:00:25.07, start: 0.072562, bitrate: 1274 kb/s
    Stream #0.0(und): Video: h264, yuv420p, 1024x768, 1207 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc
    Stream #0.1(und): Audio: aac, 22050 Hz, stereo, s16, 64 kb/s
Unrecognized option 'b:v'

T-Bagwell 发表于 2013-10-30 09:27:33

hfeiop12 发表于 2013-10-30 09:26
输出:FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
built on Sep 11 2 ...

或者

./ffmpeg -i "/video/c_054c0389_a.mp4"-vcodec libx264-b 1200k -r 25 -vprofile baseline -vlevel1.0 -acodec mp3 -ac 2 -ab 128 -ar 22050 -s 1024x768 -y -f flv "/video/asssdas.flv"

Liang 发表于 2013-10-30 09:27:46

b:v 改成 vb 试试

hfeiop12 发表于 2013-10-30 09:28:23

T-Bagwell 发表于 2013-10-30 09:26
如果可以的话,换一个新版本的ffmpeg吧

您能给个新地址 下载嘛!因为 我是用 命令行下载的 以为 是最新的!
页: [1] 2
查看完整版本: ffmpeg 引用-vcodec libx264 会报错