[FFmpeg-user] corrupted mp4 encoded from images sent from a pipe

pablo platt pablo.platt at gmail.com
Tue Dec 10 16:22:01 CET 2013


I've generated images with phantomjs instead of sending to the pipe.
I have img001.png, img002.png...
I'm calling the command:
../ffmpeg -r 1 -pattern_type glob -i '*.png' -c:v libx264 -pix_fmt yuv420p
out.mp4

The video is still corrupted.

../ffmpeg -r 1 -pattern_type glob -i '*.png' -c:v libx264 -pix_fmt yuv420p
out.mp4
ffmpeg version 2.1-static Copyright (c) 2000-2013 the FFmpeg developers
  built on Dec  9 2013 23:45:24 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --prefix=/home/user/ffmpeg-static/target
--extra-cflags='-I/home/user/ffmpeg-static/target/include -static'
--extra-ldflags='-L/home/user/ffmpeg-static/target/lib -lm -static'
--extra-version=static --disable-debug --disable-shared --enable-static
--extra-cflags=--static --disable-ffplay --disable-ffserver --disable-doc
--enable-gpl --enable-pthreads --enable-postproc --enable-gray
--enable-runtime-cpudetect --enable-libfaac --enable-libmp3lame
--enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid
--enable-bzlib --enable-zlib --enable-nonfree --enable-version3
--enable-libvpx --disable-devices
  libavutil      52. 48.100 / 52. 48.100
  libavcodec     55. 39.100 / 55. 39.100
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, image2, from '*.png':
  Duration: 00:00:04.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgba, 900x800 [SAR 2835:2835 DAR 9:8], 25 fps,
25 tbr, 25 tbn, 25 tbc
File 'out.mp4' already exists. Overwrite ? [y/N] y
[libx264 @ 0xa722fe0] using SAR=1/1
[libx264 @ 0xa722fe0] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0xa722fe0] profile High, level 3.1
[libx264 @ 0xa722fe0] 264 - core 140 - H.264/MPEG-4 AVC codec - Copyleft
2003-2013 - 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=-2 threads=1 lookahead_threads=1
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=1 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 'out.mp4':
  Metadata:
    encoder         : Lavf55.19.104
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p,
900x800 [SAR 1:1 DAR 9:8], q=-1--1, 16384 tbn, 1 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> libx264)
Press [q] to stop, [?] for help
frame=  101 fps=9.0 q=17.0 Lsize=    5678kB time=00:01:39.00 bitrate=
469.8kbits/s
video:5676kB audio:0kB subtitle:0 global headers:0kB muxing overhead
0.033466%
[libx264 @ 0xa722fe0] frame I:2     Avg QP: 4.13  size: 22018
[libx264 @ 0xa722fe0] frame P:58    Avg QP:11.20  size: 77162
[libx264 @ 0xa722fe0] frame B:41    Avg QP:17.59  size: 31504
[libx264 @ 0xa722fe0] consecutive B-frames: 18.8% 81.2%  0.0%  0.0%
[libx264 @ 0xa722fe0] mb I  I16..4: 89.6%  0.1% 10.2%
[libx264 @ 0xa722fe0] mb P  I16..4:  7.3%  1.8%  2.6%  P16..4: 13.5% 15.0%
22.3%  0.0%  0.0%    skip:37.6%
[libx264 @ 0xa722fe0] mb B  I16..4:  0.3%  0.1%  0.4%  B16..8: 20.0% 16.1%
11.6%  direct: 8.7%  skip:42.7%  L0:32.0% L1:33.7% BI:34.3%
[libx264 @ 0xa722fe0] 8x8 transform intra:12.1% inter:20.3%
[libx264 @ 0xa722fe0] coded y,uvDC,uvAC intra: 28.4% 39.0% 36.4% inter:
25.7% 41.8% 37.4%
[libx264 @ 0xa722fe0] i16 v,h,dc,p: 80% 13%  6%  0%
[libx264 @ 0xa722fe0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  6%  4% 76%  2%  2%
2%  3%  1%  2%
[libx264 @ 0xa722fe0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 17% 27%  7%  6%
6%  8%  5%  4%
[libx264 @ 0xa722fe0] i8c dc,h,v,p: 72% 16% 11%  2%
[libx264 @ 0xa722fe0] Weighted P-Frames: Y:8.6% UV:6.9%
[libx264 @ 0xa722fe0] ref P L0: 60.7% 10.7% 19.4%  9.0%  0.2%
[libx264 @ 0xa722fe0] ref B L0: 82.2% 17.8%
[libx264 @ 0xa722fe0] kb/s:460.29


On Tue, Dec 10, 2013 at 5:03 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> pablo platt <pablo.platt <at> gmail.com> writes:
>
> > Command used to create the mp4:
> > ./phantomjs test.js | ./ffmpeg -y -c:v png -f image2pipe
> > -r 10 -i - -c:v libx264 -pix_fmt yuv420p test.mp4
>
> What happens if you save the output of phantomjs to a file first?
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list