我该如何修复这个问题?由于这种情况发生在 .mov 源文件而不是 .mp4 源文件上,我认为我没有设置正确的解码器。那么我需要重新编译吗?我需要使用什么设置?
我正在尝试使用 ffmpeg 将大多数用户上传的电影处理成所有 HTML5 支持的编解码器。当我上传 mp4 时它可以工作,但在 .mov 视频上会死机并显示错误。这是从终端运行相同命令时的完整输出。我使用的是 centos 6.3 64 位,因为我使用的是 cPanel。
ffmpeg -i Vails_in_the_Field.mov -b:v 300k -vcodec libx264 -g 30 -s 640x360 Vails_in_the_Field.mp4
ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers built on Jan 30 2013 21:33:27 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4) configuration: --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvpx --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libvo-aacenc --enable-libxvid --disable-ffplay --enable-shared --enable-gpl --enable-postproc --enable-nonfree --enable-avfilter --enable-pthreads --arch=x86_64 --extra-cflags=-fPIC
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8f6240] multiple edit list entries, a/v desync might occur, patch welcome
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8f6240] Stream #1: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8f6240] Could not find codec parameters for stream 0 (Video: none (icod / 0x646F6369), 1280x720, 26592 kb/s): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Vails_in_the_Field.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2013-01-31 21:29:39
composer : Alex Fulton
title : Score for Tea Bags Field
artist : Alex Fulton
album : Alex Fulton's Album
encoder : GarageBand 6.0.5
date : 2013
Duration: 00:02:07.87, start: 0.000000, bitrate: 25560 kb/s
Stream #0:0(eng): Video: none (icod / 0x646F6369), 1280x720, 26592 kb/s, SAR 1280:1280 DAR 16:9, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc
Metadata:
creation_time : 2013-01-31 21:29:39
handler_name : Apple Alias Data Handler
timecode : 00:00:00:00
Stream #0:1(eng): Data: none (tmcd / 0x64636D74)
Metadata:
creation_time : 2013-01-31 21:29:39
handler_name : Apple Alias Data Handler
timecode : 00:00:00:00
Stream #0:2(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 191 kb/s
Metadata:
creation_time : 2013-01-31 21:29:39
handler_name : Apple Alias Data Handler
File 'Vails_in_the_Field.mp4' already exists. Overwrite ? [y/N] y
Unable to parse option value "-1" as pixel format
Error opening filters!
我也尝试使用从 ffmpeg 页面链接的静态二进制文件,结果完全相同。
答案1
自 2013 年 5 月 17 日起,ffmpeg
支持解码 Apple Intermediate Codec,标识为icod
。