FFMPEG - Not finding codec parameters

后端 未结 5 1484
没有蜡笔的小新
没有蜡笔的小新 2020-12-17 15:43

I\'m trying to convert a sequence of images into a mpeg movie via FFMPEG, although I keep getting an error saying that it could not find the code parameters (Video: mjpeg).

相关标签:
5条回答
  • 2020-12-17 15:48

    There can be several issues of FFmpeg not being able decode your image. Other answers aren't insightful on this issue, none addressed the issue of unsupported coding algorithms.

    The JFIF standard allows for Huffman or Arithmetic coding (Annex B.1.1.5). FFmpeg's implementation however, doesn't consider for Arithmetic coding, it outputs similar error messages to yours.


    # query the coding type
    exiftool image.jpg | grep -i "encoding"
    
    0 讨论(0)
  • 2020-12-17 15:49

    What ffmpeg is actually trying to tell you is, that your file has extension of jpeg, but the file actually is bmp or some other format.

    Make sure that the file is encoded in jpeg and the problem will disappear.

    0 讨论(0)
  • 2020-12-17 16:04

    Some people here say that it is because the mjpeg codec cannot really be found. They suggested installing it from the source. I feel that it is more likely that the mjpeg is not installed. I feel there are two solutions for this.

    1. You can try to install that codec and see if it helps MJpeg Download For Win
    2. You can try forcing the ffmpeg to export it into a different codec Try: ffmpeg -f image2 -i /tmp/img%03d.jpg -vcodec mpeg2video video.mpg
    0 讨论(0)
  • 2020-12-17 16:04

    It may be necessary to specify the input codec for the series of images. Note the -c:v gif addition in the second example, to be placed before the input source:

    $ ffmpeg -f image2 -i %03d.gif zzz.webm
    # Error: %03d.gif: could not find codec parameters
    
    $ ffmpeg -f image2 -c:v gif -i %03d.gif zzz.webm
    # Works! ffmpeg version 2.7
    
    0 讨论(0)
  • 2020-12-17 16:05

    Try this:

    ffmpeg -f image2 -i /tmp/img%03d.**jpeg** video.mpg
    

    Actually, I have a similar problem here .. (and solved).

    I have a sequence of images named file-001, file-002 etc (.tiff files). I forgot to give an extension ".tiff", so I got an error when I ran ffmpeg command

    ffmpeg -f image2 -i file-%03d.tiff video.mpg
    

    It was solved when I renamed the files by adding ".tiff" extension.

    0 讨论(0)
提交回复
热议问题