FFMPEG incorrect image extension fails coding -


i have problem using ffmpeg on images. problem quite lot of images on internet has incorrect extension ( png files names .jpg , jpg files named .png) makes ffmpeg fail.

i couldn't find documentation on internet how can fixed? can force somehow ffmpeg try in other codec types not ones extension suggests?

to reproduce need download png internet , rename it's extension .jpg

and if use simplest command ffmpeg -i image.jpg fails with:

ffprobe.exe -i tux.jpg -report ffprobe version n-61663-g19139d8 copyright (c) 2007-2014 ffmpeg developers   built on mar 20 2014 22:06:17 gcc 4.8.2 (gcc)   configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-zlib   libavutil      52. 67.100 / 52. 67.100   libavcodec     55. 52.102 / 55. 52.102   libavformat    55. 34.101 / 55. 34.101   libavdevice    55. 11.100 / 55. 11.100   libavfilter     4.  3.100 /  4.  3.100   libswscale      2.  5.102 /  2.  5.102   libswresample   0. 18.100 /  0. 18.100   libpostproc    52.  3.100 / 52.  3.100 [aviocontext @ 00000000041614e0] statistics: 41236 bytes read, 0 seeks [mjpeg @ 0000000004160d60] marker=db avail_size_in_buf=41068 [mjpeg @ 0000000004160d60] dqt: invalid precision [mjpeg @ 0000000004160d60] marker parser used 3 bytes (20 bits) [mjpeg @ 0000000004160d60] marker=fe avail_size_in_buf=40036 [mjpeg @ 0000000004160d60] marker parser used 2 bytes (16 bits) [mjpeg @ 0000000004160d60] marker=cf avail_size_in_buf=39899 [mjpeg @ 0000000004160d60] mjpeg: unsupported coding type (cf) [mjpeg @ 0000000004160d60] marker parser used 0 bytes (0 bits) [mjpeg @ 0000000004160d60] marker=c3 avail_size_in_buf=39465 [mjpeg @ 0000000004160d60] sof0: picture: 4697x50895 [image2 @ 000000000415fee0] decoding stream 0 failed [image2 @ 000000000415fee0] not find codec parameters stream 0 (video: mjpeg): unspecified size consider increasing value 'analyzeduration' , 'probesize' options tux.jpg: end of file 

ps: tried increase analyzeduration , probsize if that's not obvious same thing happens.

it's not perfect answer, maybe can check failure , try different format, e.g.:

ffmpeg -c:v png -i lol.jpg 

where lol.jpg png. or maybe rename file have correct extension once know true format.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -