
Tengo un directorio lleno de imágenes que estoy convirtiendo en video usando ffmpeg.
El primer fotograma es un fotograma de título negro que se desvanece/se transforma en el primer fotograma de vídeo, con una transformación de 5 fotogramas.
Hago la imagen reflejada de eso al final del video, transformando nuevamente desde el último cuadro del video a un cuadro 100% blanco usando una transformación de 5 cuadros.
Puedo mirar los marcos (archivos png) y son correctos.
Pero cuando genero un video, el desvanecimiento se ve bien, pero al final corta abruptamente del fotograma del video al blanco, sin desvanecimiento. ¿Es esto un problema de compresión? ¿Algo más?
Este es el comando que uso...
ffmpeg -pattern_type glob -i "*.png" -pix_fmt yuv420p -vcodec libx264 -movflags faststart /tmp/out.mp4
Y aquí está la salida de ffmpeg:
ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 18 2014 12:58:38 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/lib/ffmpeg --extra-cflags=-I/lib/ffmpeg/include --extra-ldflags=-L/lib/ffmpeg/lib --bindir=/usr/local/bin --extra-libs=-ldl --enable-gpl --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree
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.101 / 2. 5.101
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mpeg, from 'pipe:':
Duration: N/A, start: 0.533367, bitrate: 104857 kb/s
Stream #0:0[0x1e0]: Video: mpeg1video, yuv420p(tv), 720x480 [SAR 1:1 DAR 3:2], 104857 kb/s, 29.17 fps, 25 tbr, 90k tbn, 25 tbc
[libx264 @ 0x21af120] using SAR=1/1
[libx264 @ 0x21af120] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 LZCNT
[libx264 @ 0x21af120] profile High, level 3.0
[libx264 @ 0x21af120] 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=-2 threads=24 lookahead_threads=3 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 '/tmp/3113866936.9fXLvm/3113866936.mp4':
Metadata:
encoder : Lavf55.34.101
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 720x480 [SAR 1:1 DAR 3:2], q=-1--1, 12800 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mpeg1video -> libx264)
[mp4 @ 0x21adfa0] Starting second pass: moving the moov atom to the beginning of the filerop=39
frame= 1045 fps=253 q=-1.0 Lsize= 1678kB time=00:00:41.72 bitrate= 329.6kbits/s dup=1 drop=41
video:1666kB audio:0kB subtitle:0 data:0 global headers:0kB muxing overhead 0.734772%
[libx264 @ 0x21af120] frame I:6 Avg QP:13.20 size: 28432
[libx264 @ 0x21af120] frame P:359 Avg QP:19.17 size: 4154
[libx264 @ 0x21af120] frame B:680 Avg QP:13.98 size: 64
[libx264 @ 0x21af120] consecutive B-frames: 12.5% 1.3% 2.3% 83.8%
[libx264 @ 0x21af120] mb I I16..4: 56.3% 34.5% 9.2%
[libx264 @ 0x21af120] mb P I16..4: 2.6% 4.4% 0.7% P16..4: 11.3% 2.4% 1.5% 0.0% 0.0% skip:77.2%
[libx264 @ 0x21af120] mb B I16..4: 0.5% 0.0% 0.0% B16..8: 2.3% 0.1% 0.0% direct: 0.2% skip:96.9% L0:26.2% L1:71.8% BI: 1.9%
[libx264 @ 0x21af120] 8x8 transform intra:48.6% inter:82.7%
[libx264 @ 0x21af120] coded y,uvDC,uvAC intra: 47.1% 49.5% 21.3% inter: 3.2% 3.9% 0.8%
[libx264 @ 0x21af120] i16 v,h,dc,p: 74% 15% 7% 4%
[libx264 @ 0x21af120] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 25% 22% 3% 4% 3% 6% 4% 7%
[libx264 @ 0x21af120] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 27% 12% 3% 4% 4% 6% 3% 5%
[libx264 @ 0x21af120] i8c dc,h,v,p: 55% 22% 19% 5%
[libx264 @ 0x21af120] Weighted P-Frames: Y:20.3% UV:20.1%
[libx264 @ 0x21af120] ref P L0: 59.8% 17.6% 19.7% 2.7% 0.2%
[libx264 @ 0x21af120] ref B L0: 66.1% 29.0% 4.9%
[libx264 @ 0x21af120] ref B L1: 94.4% 5.6%
[libx264 @ 0x21af120] kb/s:326.42