[FFmpeg-user] png to mp4 conversion error.

ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S) nageshblore at gmail.com
Thu Dec 12 16:56:57 CET 2013


I have a png file that I want to convert to a video of n seconds. These png
files were created from the convert (imagemagick) command where the input
is a couple of lines of text. The output is a png file with the text in
white, background black, Helvetica font and size 16. The ffmpeg command
(shown below) converts most images correctly. For others, the conversion
does not happen.

It seems, there are some parameters of png file that need to be set
correctly to allow successful conversion. If so, what are they ? And, would
you know how to set them when using the convert command ?

user at host:~$ ffmpeg -y -loop 1 -t 10 -f image2 -i banner.png -c:v libx264
banner.mp4
ffmpeg version git-2013-12-01-975110a Copyright (c) 2000-2013 the FFmpeg
developers
  built on Dec  2 2013 02:23:37 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
  configuration: --prefix=/home/user/ffmpeg_build
--extra-cflags=-I/home/user/ffmpeg_build/include
--extra-ldflags=-L/home/user/ffmpeg_build/lib --bindir=/home/user/bin
--extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac
--enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
  libavutil      52. 56.100 / 52. 56.100
  libavcodec     55. 44.100 / 55. 44.100
  libavformat    55. 22.100 / 55. 22.100
  libavdevice    55.  5.102 / 55.  5.102
  libavfilter     3. 91.100 /  3. 91.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
[png @ 0x3389c00] unsupported bit depth 16 and color type 4
    Last message repeated 126 times
[image2 @ 0x3388a40] decoding for stream 0 failed
[image2 @ 0x3388a40] Could not find codec parameters for stream 0 (Video:
png, 777x166 [SAR 72:72 DAR 777:166]): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
banner.png: could not find codec parameters


More information about the ffmpeg-user mailing list