ffmpeg get to Unhandled pixel format 0x11111111 only with some images

1

Hi I'm using ffmpeg to transform images in video. I need 1 still image for a video of 2 seconds, I'm using this call:

ffmpeg -loop 1 -i img.jpg -t 2 -vcodec mpeg2video result.avi

If I use some test images (generated as 200x200px unicolor images with photoshop) it gets this output:

ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jul 26 2013 20:18:03 with Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/1.2.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=cc --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mjpeg @ 0x7fba0901e800] Unhandled pixel format 0x11111111
    Last message repeated 8 times
[image2 @ 0x7fba09006600] decoding for stream 0 failed
[image2 @ 0x7fba09006600] Could not find codec parameters for stream 0 (Video: mjpeg, 200x200): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
1.jpg: could not find codec parameters

note that the same command with some random images downloaded from the internet works nice.

this is the test image that fails: enter image description here

some ideas?

nkint

Posted 2013-07-31T20:37:18.920

Reputation: 569

1If the image is faulty, have you tried re-generating it? – slhck – 2013-07-31T21:26:12.030

how can you say that, i mean have you tried to download and done something or just because of the ffmpe error i have – nkint – 2013-07-31T22:04:53.093

Answers

0

You can encountering a bug: Ticket #896: ljpeg - support 32bpp RGBA. Fortunately it has been fixed with commit 6db57fa about a week ago on 2013-07-25:

$ cd ~/ffmpeg; git log 6db57fa
commit 6db57fa8bc1a40c16293f9224d195e43ae52aabd
Author: Michael Niedermayer <michaelni@gmx.at>
Date:   Thu Jul 25 00:32:44 2013 +0200

    avcodec/mjpegdec: Support RGBA lpegs

    Fixes Ticket896

    Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

This just means you have to get a newer ffmpeg build. See the FFmpeg download page for links to builds for OSX, Windows, and Linux. Of course you can always compile ffmpeg too.

llogan

Posted 2013-07-31T20:37:18.920

Reputation: 31 929

@nkint Firefox shows the image as blue, but ffmpeg shows it as red. Can you confirm what the correct color is? – llogan – 2013-07-31T21:46:22.990

mhm... it should be cyan.. so the opposite of red, that for our eyes is like a light blue.. http://en.wikipedia.org/wiki/Cyan

– nkint – 2013-07-31T22:04:10.353

@nkint Then I was premature in my answer. Sorry about that. It appears you are now encountering a likely related bug #2799: No support for cmyk jpeg which is currently an open bug.

– llogan – 2013-07-31T22:13:13.033