[FFmpeg-user] Overlay fails in the middle of the video

Michael Koch astroelectronic at t-online.de
Sun Nov 12 20:30:09 EET 2017


Hi all,

I'm trying to make a timelapse video from 145 images, which must first 
be cropped to quadratic size and then a circular mask must be overlaid. 
The overlay comes from a PNG image (black border with transparent 
circle). The video looks good in the first 4 or 5 seconds, but then the 
overlay disappears and doesn't come back until the end of the video. 
What's wrong with my command line? The console output is copied below.

Thanks,
Michael


F:\xxx>c:/ffmpeg/ffmpeg -framerate 10 -i IMG_%3d.jpg -i Circle_3648.png 
-filter_
complex "crop=ih:ih,overlay" -codec:v mpeg4 -q:v 2 -s 1000x1000 -y video.mp4
ffmpeg version N-88555-g6ea7711532 Copyright (c) 2000-2017 the FFmpeg 
developers

   built with gcc 7.2.0 (GCC)
   configuration: --enable-gpl --enable-version3 --enable-sdl2 
--enable-bzlib --e
nable-fontconfig --enable-gnutls --enable-iconv --enable-libass 
--enable-libblur
ay --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg 
--enable-libopu
s --enable-libshine --enable-libsnappy --enable-libsoxr 
--enable-libtheora --ena
ble-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp 
--enable-lib
x264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma 
--enable-z
lib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda 
--enable-c
uvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth 
--enable-l
ibmfx
   libavutil      56.  0.100 / 56.  0.100
   libavcodec     58.  1.100 / 58.  1.100
   libavformat    58.  0.102 / 58.  0.102
   libavdevice    58.  0.100 / 58.  0.100
   libavfilter     7.  0.101 /  7.  0.101
   libswscale      5.  0.101 /  5.  0.101
   libswresample   3.  0.101 /  3.  0.101
   libpostproc    55.  0.100 / 55.  0.100
Input #0, image2, from 'IMG_%3d.jpg':
   Duration: 00:00:14.50, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 
5472x3648,
  10 tbr, 10 tbn, 10 tbc
Input #1, png_pipe, from 'Circle_3648.png':
   Duration: N/A, bitrate: N/A
     Stream #1:0: Video: png, pal8(pc), 3648x3648 [SAR 3780:3780 DAR 
1:1], 25 tbr
, 25 tbn, 25 tbc
Stream mapping:
   Stream #0:0 (mjpeg) -> crop
   Stream #1:0 (png) -> overlay:overlay
   overlay -> Stream #0:0 (mpeg4)
Press [q] to stop, [?] for help
[swscaler @ 000000000832d0a0] deprecated pixel format used, make sure 
you did se
t range correctly
[swscaler @ 000000000832d0a0] Warning: data is not aligned! This can 
lead to a s
peed loss
Output #0, mp4, to 'video.mp4':
   Metadata:
     encoder         : Lavf58.0.102
     Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 1000x1000, 
q=2-31, 2
00 kb/s, 10 fps, 10240 tbn, 10 tbc (default)
     Metadata:
       encoder         : Lavc58.1.100 mpeg4
     Side data:
       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    1 fps=0.0 q=2.0 size=     256kB time=00:00:00.00 
bitrate=21403102.0kbi
frame=    5 fps=4.0 q=2.0 size=    2048kB time=00:00:00.40 
bitrate=41933.6kbits/
frame=    7 fps=4.0 q=2.0 size=    3072kB time=00:00:00.60 
bitrate=41936.8kbits/
frame=    9 fps=3.9 q=2.0 size=    4096kB time=00:00:00.80 
bitrate=41938.3kbits/
frame=   11 fps=3.8 q=2.0 size=    4864kB time=00:00:01.00 
bitrate=39842.3kbits/
frame=   13 fps=3.8 q=2.0 size=    5888kB time=00:00:01.20 
bitrate=40192.4kbits/
frame=   15 fps=3.8 q=2.0 size=    6912kB time=00:00:01.40 
bitrate=40442.5kbits/
frame=   17 fps=3.8 q=2.0 size=    7936kB time=00:00:01.60 
bitrate=40630.1kbits/
frame=   19 fps=3.7 q=2.0 size=    8960kB time=00:00:01.80 
bitrate=40775.9kbits/
frame=   21 fps=3.7 q=2.0 size=    9984kB time=00:00:02.00 
bitrate=40892.6kbits/
frame=   23 fps=3.7 q=2.0 size=   10752kB time=00:00:02.20 
bitrate=40034.9kbits/
frame=   25 fps=3.7 q=2.0 size=   11776kB time=00:00:02.40 
bitrate=40193.9kbits/
frame=   27 fps=3.7 q=2.0 size=   12544kB time=00:00:02.60 
bitrate=39521.9kbits/
frame=   29 fps=3.7 q=2.0 size=   13568kB time=00:00:02.80 
bitrate=39694.8kbits/
frame=   31 fps=3.7 q=2.0 size=   14336kB time=00:00:03.00 
bitrate=39145.7kbits/
frame=   33 fps=3.7 q=2.0 size=   15104kB time=00:00:03.20 
bitrate=38665.2kbits/
frame=   35 fps=3.7 q=2.0 size=   15872kB time=00:00:03.40 
bitrate=38241.2kbits/
frame=   37 fps=3.7 q=2.0 size=   16640kB time=00:00:03.60 
bitrate=37864.3kbits/
frame=   39 fps=3.7 q=2.0 size=   17664kB time=00:00:03.80 
bitrate=38079.0kbits/
frame=   41 fps=3.7 q=2.0 size=   18432kB time=00:00:04.00 
bitrate=37747.9kbits/
frame=   43 fps=3.7 q=2.0 size=   19200kB time=00:00:04.20 
bitrate=37448.4kbits/
[swscaler @ 00000000084bf7a0] deprecated pixel format used, make sure 
you did se
t range correctly
[swscaler @ 00000000085200a0] deprecated pixel format used, make sure 
you did se
t range correctly
frame=   46 fps=3.7 q=2.0 size=   20480kB time=00:00:04.50 
bitrate=37282.0kbits/
frame=   49 fps=3.8 q=2.0 size=   22016kB time=00:00:04.80 
bitrate=37573.3kbits/
frame=   52 fps=3.8 q=2.0 size=   23296kB time=00:00:05.10 
bitrate=37419.1kbits/
frame=   55 fps=3.9 q=2.0 size=   24576kB time=00:00:05.40 
bitrate=37282.1kbits/
frame=   58 fps=3.9 q=2.0 size=   25856kB time=00:00:05.70 
bitrate=37159.5kbits/
frame=   61 fps=3.9 q=2.0 size=   27392kB time=00:00:06.00 
bitrate=37398.7kbits/
frame=   64 fps=4.0 q=2.0 size=   28672kB time=00:00:06.30 
bitrate=37282.2kbits/
frame=   67 fps=4.0 q=2.0 size=   30208kB time=00:00:06.60 
bitrate=37494.0kbits/
frame=   70 fps=4.0 q=2.0 size=   31488kB time=00:00:06.90 
bitrate=37383.5kbits/
frame=   73 fps=4.0 q=2.0 size=   33024kB time=00:00:07.20 
bitrate=37573.5kbits/
frame=   76 fps=4.1 q=2.0 size=   34560kB time=00:00:07.50 
bitrate=37748.3kbits/
frame=   79 fps=4.1 q=2.0 size=   36352kB time=00:00:07.80 
bitrate=38178.5kbits/
frame=   82 fps=4.1 q=2.0 size=   38144kB time=00:00:08.10 
bitrate=38576.8kbits/
frame=   85 fps=4.1 q=2.0 size=   39680kB time=00:00:08.40 
bitrate=38697.0kbits/
frame=   88 fps=4.1 q=2.0 size=   41216kB time=00:00:08.70 
bitrate=38809.0kbits/
frame=   91 fps=4.1 q=2.0 size=   42752kB time=00:00:09.00 
bitrate=38913.4kbits/
frame=   94 fps=4.1 q=2.0 size=   44032kB time=00:00:09.30 
bitrate=38785.7kbits/
frame=   97 fps=4.2 q=2.0 size=   45568kB time=00:00:09.60 
bitrate=38884.3kbits/
frame=  100 fps=4.2 q=2.0 size=   46848kB time=00:00:09.90 
bitrate=38765.2kbits/
frame=  103 fps=4.2 q=2.0 size=   48128kB time=00:00:10.20 
bitrate=38653.1kbits/
frame=  106 fps=4.2 q=2.0 size=   49664kB time=00:00:10.50 
bitrate=38747.1kbits/
frame=  109 fps=4.2 q=2.0 size=   50944kB time=00:00:10.80 
bitrate=38641.6kbits/
frame=  112 fps=4.2 q=2.0 size=   52480kB time=00:00:11.10 
bitrate=38730.9kbits/
frame=  115 fps=4.2 q=2.0 size=   53760kB time=00:00:11.40 
bitrate=38631.4kbits/
frame=  118 fps=4.3 q=2.0 size=   55296kB time=00:00:11.70 
bitrate=38716.4kbits/
frame=  121 fps=4.3 q=2.0 size=   56320kB time=00:00:12.00 
bitrate=38447.5kbits/
frame=  124 fps=4.3 q=2.0 size=   57856kB time=00:00:12.30 
bitrate=38532.8kbits/
frame=  127 fps=4.3 q=2.0 size=   59392kB time=00:00:12.60 
bitrate=38614.0kbits/
frame=  130 fps=4.3 q=2.0 size=   60928kB time=00:00:12.90 
bitrate=38691.4kbits/
frame=  133 fps=4.3 q=2.0 size=   62720kB time=00:00:13.20 
bitrate=38924.1kbits/
frame=  136 fps=4.3 q=2.0 size=   64256kB time=00:00:13.50 
bitrate=38991.2kbits/
frame=  139 fps=4.3 q=2.0 size=   65280kB time=00:00:13.80 
bitrate=38751.5kbits/
frame=  142 fps=4.3 q=2.0 size=   66560kB time=00:00:14.10 
bitrate=38670.6kbits/
frame=  145 fps=4.3 q=2.0 size=   68096kB time=00:00:14.40 
bitrate=38738.8kbits/
frame=  145 fps=4.3 q=2.0 Lsize=   68104kB time=00:00:14.40 
bitrate=38743.3kbits
/s speed=0.426x
video:68102kB audio:0kB subtitle:0kB other streams:0kB global 
headers:0kB muxing
  overhead: 0.002924%



More information about the ffmpeg-user mailing list