[FFmpeg-devel] [PATCH] Allow use of PNGs with image2pipe

Eugene Ware eugene at noblesamurai.com
Fri May 4 09:03:52 CEST 2012


Problem this patch fixes:
--------------------------------------

When I run the following command

$ cat file1.png file2.png | ffmpeg -y -f image2pipe -r 1 -vcodec png -i -
out.mp4

I get the following error.

ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers
built on Apr 25 2012 19:55:19 with clang 3.0 (tags/Apple/clang-211.10.1)
configuration: --prefix=/opt/local --enable-gpl --enable-postproc
--enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis
--enable-libtheora --enable-libdirac --enable-libschroedinger
--enable-libopenjpeg --enable-libxvid --enable-libx264 --enable-libvpx
--enable-libspeex --mandir=/opt/local/share/man --enable-shared
--enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm
--enable-nonfree --enable-libfaac
libavutil 50. 43. 0 / 50. 43. 0
libavcodec 52.123. 0 / 52.123. 0
libavformat 52.111. 0 / 52.111. 0
libavdevice 52. 5. 0 / 52. 5. 0
libavfilter 1. 80. 0 / 1. 80. 0
libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0
[image2pipe @ 0x7f9dd104ac00] max_analyze_duration 5000000 reached at
5000000
[image2pipe @ 0x7f9dd104ac00] Estimating duration from bitrate, this may be
inaccurate
Input #0, image2pipe, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: png, 1 fps, 1 tbr, 1 tbn, 1 tbc
[buffer @ 0x7f9dd0c32780] Invalid pixel format string '-1'
Error opening filters!


You can use the following as example png files to replicate the issue:
 http://dl.dropbox.com/u/4763380/ffmpeg/file1.png
 http://dl.dropbox.com/u/4763380/ffmpeg/file2.png


This is a long standing issue. I found an old patch and updated it to work
with the latest version of ffmpeg in the git repository.

Here's the fix:
-----------------------

http://pastebin.com/5mTfGsdg

This problem has been hanging around for a long time. It would be great to
finally get it patched into the main trunk.

Cheers,

Eugene

*Eugene Ware*
Chief Executive Officer

Phone: +61 3 9955 7041
Email: eugene at noblesamurai.com
Twitter: @EugeneWare <http://twitter.com/EugeneWare>

*Noble Samurai Pty Ltd*
Level 1, 234 Whitehorse Rd
Nunawading, Victoria, 3131, Australia

noblesamurai.com <http://www.noblesamurai.com/> | eugeneware.com |
facebook.com/Eugene.S.Ware <http://www.facebook.com/Eugene.S.Ware>


More information about the ffmpeg-devel mailing list