ffmpeg:使用image2 demuxer时出错

时间:2014-06-14 15:44:07

标签: ffmpeg jpeg mkv

从ffmpeg文档的image2 demuxer开始,从一组JPEG图片创建MKV文件似乎很简单。

但是当我跑步时:

ffmpeg -v debug -i 'img-%03d.jpeg' out.mkv 

失败并报告:

ffmpeg version 2.1.3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun 14 2014 17:40:58 with gcc 4.8 (Debian 4.8.2-15)
  configuration: --prefix=/media/DOWNLOAD/ip7000_new/.build/i486-linux-gnu/libroot --enable-static --disable-shared --disable-asm --disable-doc --disable-devices --disable-network --disable-bsfs --disable-protocols --disable-yasm --enable-pic
  libavutil      52. 48.101 / 52. 48.101
  libavcodec     55. 39.101 / 55. 39.101
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument 'img-%03d.jpeg'.
Reading option 'out.mkv' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file img-%03d.jpeg.
Successfully parsed a group of options.
Opening an input file: img-%03d.jpeg.
No URL Protocols are registered. Missing call to av_register_all()?
    Last message repeated 4 times
[image2 @ 0xa7d0ce0] Could find no file with path 'img-%03d.jpeg' and index in the range 0-4
img-%03d.jpeg: No such file or directory

我尝试了不同版本的ffmpeg并且行为是一样的。 用strace运行它并没有显示任何尝试打开一些文件,所以我肯定错过了一些东西......

1 个答案:

答案 0 :(得分:1)

为什么要添加--disable-protocols(除其他外)?文件输入被视为protocol。如果没有协议支持,则无法输入或输出文件。

您必须使用更有用的配置重新编译ffmpeg。如果您需要其他帮助,请参阅How to Compile FFmpeg on Ubuntu, Debian, and Mint,或者只需从FFmpeg Download页面获取版本。