虽然这个命令已经工作了几个月,但在通过我的 php 应用程序编码视频时,我突然开始遇到以下错误。在命令行上测试编码参数产生了相同的结果,而我本地机器上的 ffmpeg 版本读取输入没有问题
我使用的命令:
ffmpeg -i clip_20121022150813.mp4 -acodec libfaac -ab 44100 encoded.mp4
和输出(最后一行的错误):
ffmpeg version N-45871-g34ccb94 Copyright (c) 2000-2012 the FFmpeg developers
built on Oct 22 2012 22:20:53 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-52)
configuration: --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libfaac --enable-nonfree
libavutil 51. 77.100 / 51. 77.100
libavcodec 54. 68.100 / 54. 68.100
libavformat 54. 34.100 / 54. 34.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 20.104 / 3. 20.104
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 16.100 / 0. 16.100
libpostproc 52. 1.100 / 52. 1.100
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'clip_20121022150813.mp4':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2012-10-22 22:08:02
Duration: 00:00:03.80, start: 0.000000, bitrate: 3259 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 480x640, 2593 kb/s, 18.73 fps, 29.97 tbr, 600 tbn, 1200 tbc
Metadata:
creation_time : 2012-10-22 22:08:02
handler_name : Core Media Data Handler
Stream #0:1(und): Audio: pcm_s16le (lpcm / 0x6D63706C), 44100 Hz, mono, s16, 705 kb/s
Metadata:
creation_time : 2012-10-22 22:08:02
handler_name : Core Media Data Handler
File 'encoded.mp4' already exists. Overwrite ? [y/N] y
using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
[libx264 @ 0x104fa4e0] profile High, level 3.0
[libx264 @ 0x104fa4e0] 264 - core 128 r2216 198a7ea - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - 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=24 lookahead_threads=4 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=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'encoded.mp4':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
Stream #0:0(und): Video: h264, yuv420p, 480x640, q=-1--1, 90k tbn, 29.97 tbc
Metadata:
creation_time : 2012-10-22 22:08:02
handler_name : Core Media Data Handler
Stream #0:1(und): Audio: aac, 44100 Hz, mono, s16, 44 kb/s
Metadata:
creation_time : 2012-10-22 22:08:02
handler_name : Core Media Data Handler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (pcm_s16le -> libfaac)
Error while opening decoder for input stream #0:0
我已经卸载了 ffmpeg,从源代码重新编译,还重新编译了 x264 和许多其他库,但是这个错误仍然存在。无论如何我可以找到更多关于究竟是什么失败?