[FFmpeg-user] ffmpeg is generating an empty movie from my PNG's ...

David Boles biblioboles at gmail.com
Sat May 10 16:56:54 CEST 2014


I have generated a sequence of PNGs programmatically and wish to use ffmpeg
to create a movie sequence from them. This movie is just to visualize the
results, so I'm not tied to any codec/frame-rate/etc. - as long as I can
play it I'm happy.

The PNGs show up fine within Mac OS X Preview as well as within GIMP so
they are basically correct, but since I generated them there might be some
header parameters that aren't up-to-snuff.

When I try to run ffmpeg against them with a command line like:

    ffmpeg  -y -v verbose -r 25 -i %04d.png -qscale 2 output.mp4 >
ffmpeg.out 2>&1

I get an empty movie file and no error indicated that I can clearly
discern. I've tried this with both GRAY_ALPHA PNG's and RGB_ALPHA PNG's and
get the same result. The same thing happens when I give the codec a png and
target output.mov.

The lead-in to what is printed by ffmpeg looks like this:

====

ffmpeg version 2.1.4 Copyright (c) 2000-2014 the FFmpeg developers
  built on Mar 17 2014 15:54:58 with Apple LLVM version 5.0
(clang-500.2.79) (based on LLVM 3.3svn)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter
--enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus
--enable-libtheora --enable-libschroedinger --enable-libopenjpeg
--enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass
--enable-libbluray --enable-gnutls --enable-fontconfig --enable-libfreetype
--disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man
--enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda
--arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264
--enable-libxvid
  libavutil      52. 48.101 / 52. 48.101
  libavcodec     55. 39.101 / 55. 39.101
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
[png @ 0x7fa363821400] No bytes left
Input #0, image2, from '%04d.png':
  Duration: 00:00:04.00, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgba, 1800x1800, 25 fps, 25 tbr, 25 tbn, 25 tbc
Please use -q:a or -q:v, -qscale is ambiguous
[graph 0 input from stream 0:0 @ 0x7fa363415e20] w:1800 h:1800 pixfmt:rgba
tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2
[auto-inserted scaler 0 @ 0x7fa363416de0] w:iw h:ih flags:'0x4' interl:0
[format @ 0x7fa3634169a0] auto-inserting filter 'auto-inserted scaler 0'
between the filter 'Parsed_null_0' and the filter 'format'
[graph 0 input from stream 0:0 @ 0x7fa363415e20] TB:0.040000
FRAME_RATE:25.000000 SAMPLE_RATE:nan
[auto-inserted scaler 0 @ 0x7fa363416de0] w:1800 h:1800 fmt:rgba sar:0/1 ->
w:1800 h:1800 fmt:yuv444p sar:0/1 flags:0x4
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x7fa363821a00] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.1 Cache64
[libx264 @ 0x7fa363821a00] profile High 4:4:4 Predictive, level 5.0, 4:4:4
8-bit
[libx264 @ 0x7fa363821a00] 264 - core 142 - H.264/MPEG-4 AVC codec -
Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1
ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00
mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11
fast_pskip=1 chroma_qp_offset=4 threads=12 lookahead_threads=2
sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0
constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1
weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40
intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0
qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
  Metadata:
    encoder         : Lavf55.19.104
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p,
1800x1800, q=-1--1, 12800 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> libx264)
Press [q] to stop, [?] for help

====

Followed by lines like this:

====
...
[png @ 0x7fa363a6a400] No bytes left
[png @ 0x7fa363a6aa00] No bytes left
[png @ 0x7fa363a6b600] No bytes left
[png @ 0x7fa363a6c200] No bytes left
Error while decoding stream #0:0: Invalid data found when processing input
[png @ 0x7fa363a6ce00] No bytes left
Error while decoding stream #0:0: Invalid data found when processing input
[png @ 0x7fa363a6da00] No bytes left
Error while decoding stream #0:0: Invalid data found when processing input
    Last message repeated 3 times
[png @ 0x7fa363a6e600] No bytes left
Error while decoding stream #0:0: Invalid data found when processing input
[png @ 0x7fa363a6f200] No bytes left
Error while decoding stream #0:0: Invalid data found when processing input
[png @ 0x7fa363a6fe00] No bytes left
Error while decoding stream #0:0: Invalid data found when processing input
[png @ 0x7fa363a6aa00] No bytes left
...
====

and finally this at the end.

====
...
[png @ 0x7fa363a6fe00] No bytes left
[png @ 0x7fa363a6a400] No bytes left
No more output streams to write to, finishing.
frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead
555.000000%
====

Any help would be appreciated!


More information about the ffmpeg-user mailing list