Android ffmpeg 10.04 找不到编解码器参数

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11659267/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 08:23:59  来源:igfitidea点击:

ffmpeg 10.04 Could Not Find Codec Parameters

androidffmpegubuntu-10.04x264

提问by Dmitry

I am getting an error while executing the command ffmpeg -i /path/to/video.mp4:

执行命令时出现错误 ffmpeg -i /path/to/video.mp4

  ffmpeg version git-2012-07-24-93342de Copyright (c) 2000-2012 the FFmpeg developers
      built on Jul 24 2012 23:55:41 with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
      configuration: --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-swscale --enable-vdpau --enable-version3 --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab
      libavutil      51. 65.100 / 51. 65.100
      libavcodec     54. 44.100 / 54. 44.100
      libavformat    54. 20.100 / 54. 20.100
      libavdevice    54.  2.100 / 54.  2.100
      libavfilter     3.  3.100 /  3.  3.100
      libswscale      2.  1.100 /  2.  1.100
      libswresample   0. 15.100 /  0. 15.100
      libpostproc    52.  0.100 / 52.  0.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2a1b240] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), 1280x720): unspecified pixel format
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    /path/to/video.mp4: could not find codec parameters

采纳答案by Dmitry

Adjust -probesizeand/or -analyzeduration.

调整-probesize和/或-analyzeduration

The files I was testing were in fact damaged. But if anyone faces this problem, setting -probesizeand -analyzedurationto 100and 10000000for example might help.

我正在测试的文件实际上已损坏。但是如果有人面临这个问题,设置-probesize-analyzedurationto10010000000可能会有所帮助。

From a popular comment by @DiverseAndRemote.com

来自@DiverseAndRemote.com 的热门评论

my solution was

ffmpeg -analyzeduration 2147483647 -probesize 2147483647 -i /path/to/video.mp4 

2147483647 is max_int

我的解决方案是

ffmpeg -analyzeduration 2147483647 -probesize 2147483647 -i /path/to/video.mp4 

2147483647 是 max_int