ffmpeg timestamps, offsets, and frame count
Hi, I am having trouble combining a video and a gif. complete command and console output, starting with the source video made by the camera: Mobius Maxi: $ ffprobe 20190913_144617_driveway-Acoustimeter_USPS_0.12Vm_753uWm2_FHDw.MOV ffprobe version N-95997-g9f7b2b37e3 Copyright (c) 2007-2019 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 configuration: --prefix=/usr/local --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-libopenjpeg --enable-libfreetype --disable-doc --disable-htmlpages --disable-podpages --enable-shared --enable-libvpx --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib/i386-linux-gnu --enable-libass --enable-libtesseract --extra-cflags=-msse2 --enable-openssl --enable-nonfree libavutil 56. 36.101 / 56. 36.101 libavcodec 58. 64.101 / 58. 64.101 libavformat 58. 35.101 / 58. 35.101 libavdevice 58. 9.101 / 58. 9.101 libavfilter 7. 68.100 / 7. 68.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1fdbc80] st: 0 edit list: 1 Missing key frame while searching for timestamp: 2000 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1fdbc80] st: 0 edit list 1 Cannot find an index entry before timestamp: 2000. Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20190913_144617_driveway-Acoustimeter_USPS_0.12Vm_753uWm2_FHDw.MOV': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2019-09-13T14:46:17.000000Z playback_requirements: QuickTime 6.0 or greater playback_requirements-eng: QuickTime 6.0 or greater Duration: 00:02:32.00, start: 0.000000, bitrate: 20254 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 20119 kb/s, 30 fps, 30 tbr, 60k tbn, 120k tbc (default) Metadata: creation_time : 2019-09-13T14:46:17.000000Z handler_name : Video Handler encoder : iCatch AVCC Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default) Metadata: creation_time : 2019-09-13T14:46:17.000000Z handler_name : Audio Handler The source file plays correctly, starts at 0.000 Trim and clip: $ ffmpeg -i 20190913_144617_driveway-Acoustimeter_USPS_0.12Vm_753uWm2_FHDw.MOV -ss 58 -t 62 -c copy test1-c58t62.MOV ffmpeg version N-95997-g9f7b2b37e3 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 configuration: --prefix=/usr/local --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-libopenjpeg --enable-libfreetype --disable-doc --disable-htmlpages --disable-podpages --enable-shared --enable-libvpx --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib/i386-linux-gnu --enable-libass --enable-libtesseract --extra-cflags=-msse2 --enable-openssl --enable-nonfree libavutil 56. 36.101 / 56. 36.101 libavcodec 58. 64.101 / 58. 64.101 libavformat 58. 35.101 / 58. 35.101 libavdevice 58. 9.101 / 58. 9.101 libavfilter 7. 68.100 / 7. 68.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x10e1540] st: 0 edit list: 1 Missing key frame while searching for timestamp: 2000 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x10e1540] st: 0 edit list 1 Cannot find an index entry before timestamp: 2000. Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20190913_144617_driveway-Acoustimeter_USPS_0.12Vm_753uWm2_FHDw.MOV': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2019-09-13T14:46:17.000000Z playback_requirements: QuickTime 6.0 or greater playback_requirements-eng: QuickTime 6.0 or greater Duration: 00:02:32.00, start: 0.000000, bitrate: 20254 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 20119 kb/s, 30 fps, 30 tbr, 60k tbn, 120k tbc (default) Metadata: creation_time : 2019-09-13T14:46:17.000000Z handler_name : Video Handler encoder : iCatch AVCC Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default) Metadata: creation_time : 2019-09-13T14:46:17.000000Z handler_name : Audio Handler Output #0, mov, to 'test1-c58t62.MOV': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt playback_requirements-eng: QuickTime 6.0 or greater playback_requirements: QuickTime 6.0 or greater encoder : Lavf58.35.101 Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, q=2-31, 20119 kb/s, 30 fps, 30 tbr, 60k tbn, 60k tbc (default) Metadata: creation_time : 2019-09-13T14:46:17.000000Z handler_name : Video Handler encoder : iCatch AVCC Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default) Metadata: creation_time : 2019-09-13T14:46:17.000000Z handler_name : Audio Handler Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 439 fps=0.0 q=-1.0 size= 36352kB time=00:00:15.08 bitrate=19737.3kbframe= 759 fps=758 q=-1.0 size= 62208kB time=00:00:25.75 bitrate=19787.0kbframe= 1246 fps=830 q=-1.0 size= 102400kB time=00:00:41.98 bitrate=19978.0kbframe= 1565 fps=777 q=-1.0 size= 128256kB time=00:00:52.61 bitrate=19969.7kbframe= 1835 fps=729 q=-1.0 size= 150528kB time=00:01:01.63 bitrate=20006.1kbframe= 1846 fps=687 q=-1.0 Lsize= 151667kB time=00:01:01.97 bitrate=20046.5kbits/s speed=23.1x video:150636kB audio:968kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.041857% When I play the above file, it starts at 0:00:00.561 instead of 0.000 This is problem #1. Next add overlay(s): $ ffmpeg -i test1-c58t62.MOV -ignore_loop 0 -i redwave-500x400.gif -filter_complex "[0]scale=1280x720,drawtext='fontfile=/usr/share/fonts/TrueType/lsansd.ttf:text=%{n}:x=(w-tw)/2:y=h-(2*lh):fontcolor=white:box=1:boxcolor=0x00000099'[0st],[0st][1]overlay=x=213:y=195:enable=between(n\,511\,1224)" -s 1280x720 -c:v h264 -b:v 4700k -r 30 -t 62 test1.0-720e.mov ffmpeg version N-95997-g9f7b2b37e3 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 configuration: --prefix=/usr/local --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-libopenjpeg --enable-libfreetype --disable-doc --disable-htmlpages --disable-podpages --enable-shared --enable-libvpx --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib/i386-linux-gnu --enable-libass --enable-libtesseract --extra-cflags=-msse2 --enable-openssl --enable-nonfree libavutil 56. 36.101 / 56. 36.101 libavcodec 58. 64.101 / 58. 64.101 libavformat 58. 35.101 / 58. 35.101 libavdevice 58. 9.101 / 58. 9.101 libavfilter 7. 68.100 / 7. 68.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test1-c58t62.MOV': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf58.35.101 Duration: 00:01:02.00, start: 0.005000, bitrate: 20041 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 20054 kb/s, 30 fps, 30 tbr, 60k tbn, 120k tbc (default) Metadata: handler_name : Video Handler encoder : iCatch AVCC Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default) Metadata: handler_name : Audio Handler Input #1, gif, from 'redwave-500x400.gif': Duration: 00:00:01.35, start: 0.000000, bitrate: 2635 kb/s Stream #1:0: Video: gif, bgra, 500x400, 34 fps, 100 tbr, 100 tbn, 100 tbc Stream mapping: Stream #0:0 (h264) -> scale (graph 0) Stream #1:0 (gif) -> overlay:overlay (graph 0) overlay (graph 0) -> Stream #0:0 (libx264) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Press [q] to stop, [?] for help [libx264 @ 0x79fcc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX LZCNT BMI1 SlowPshufb [libx264 @ 0x79fcc0] profile High, level 3.1 [libx264 @ 0x79fcc0] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=6 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=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=4700 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mov, to 'test1.0-720e.mov': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf58.35.101 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720, q=-1--1, 4700 kb/s, 30 fps, 15360 tbn, 30 tbc (default) Metadata: encoder : Lavc58.64.101 libx264 Side data: cpb: bitrate max/min/avg: 0/0/4700000 buffer size: 0 vbv_delay: N/A Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name : Audio Handler encoder : Lavc58.64.101 aac frame= 23 fps=0.0 q=0.0 size= 0kB time=00:00:00.83 bitrate= 0.3kbitframe= 45 fps= 45 q=0.0 size= 0kB time=00:00:01.60 bitrate= 0.2kbitframe= 51 fps= 34 q=25.0 size= 256kB time=00:00:01.77 bitrate=1184.5kbiframe= 55 fps= 27 q=33.0 size= 256kB time=00:00:01.92 bitrate=1092.4kbiframe= 67 fps= 27 q=23.0 size= 256kB time=00:00:02.32 bitrate= 902.0kbiframe= 72 fps= 24 q=23.0 size= 256kB time=00:00:02.47 bitrate= 847.6kbiframe= 78 fps= 22 q=22.0 size= 512kB time=00:00:02.68 bitrate=1560.5kbiframe= 84 fps= 20 q=23.0 size= 512kB time=00:00:02.88 bitrate=1456.5kbiframe= 92 fps= 19 q=24.0 size= 768kB time=00:00:03.15 bitrate=1992.7kbiframe= 99 fps= 19 q=23.0 size= 768kB time=00:00:03.39 bitrate=1854.9kbiframe= 104 fps= 18 q=23.0 size= 1024kB time=00:00:03.54 bitrate=2368.9kbiframe= 109 fps= 17 q=23.0 size= 1024kB time=00:00:03.71 bitrate=2259.9kbiframe= 116 fps= 17 q=24.0 size= 1280kB time=00:00:03.94 bitrate=2656.9kbiframe= 124 fps= 16 q=23.0 size= 1280kB time=00:00:04.22 bitrate=2482.5kbiframe= 132 fps= 16 q=24.0 size= 1536kB time=00:00:04.48 bitrate=2808.8kbiframe= 140 fps= 16 q=23.0 size= 1792kB time=00:00:04.75 bitrate=3085.8kbiframe= 148 fps= 15 q=24.0 size= 1792kB time=00:00:05.01 bitrate=2928.3kbiframe= 156 fps= 15 q=23.0 size= 2048kB time=00:00:05.29 bitrate=3171.2kbiframe= 164 fps= 15 q=23.0 size= 2048kB time=00:00:05.54 bitrate=3024.8kbiframe= 172 fps= 15 q=23.0 size= 2304kB time=00:00:05.82 bitrate=3240.8kbiframe= 180 fps= 15 q=23.0 size= 2560kB time=00:00:06.08 bitrate=3449.3kbiframe= 188 fps= 15 q=23.0 size= 2560kB time=00:00:06.35 bitrate=3298.8kbiframe= 196 fps= 14 q=23.0 size= 2816kB time=00:00:06.61 bitrate=3488.3kbiframe= 202 fps= 14 q=23.0 size= 2816kB time=00:00:06.82 bitrate=3379.2kbiframe= 210 fps= 14 q=23.0 size= 3072kB time=00:00:07.06 bitrate=3563.9kbiframe= 214 fps= 14 q=23.0 size= 3072kB time=00:00:07.21 bitrate=3490.1kbiframe= 220 fps= 14 q=23.0 size= 3328kB time=00:00:07.42 bitrate=3672.3kbiframe= 228 fps= 14 q=23.0 size= 3328kB time=00:00:07.68 bitrate=3549.9kbiframe= 236 fps= 14 q=23.0 size= 3584kB time=00:00:07.95 bitrate=3689.7kbiframe= 244 fps= 14 q=23.0 size= 3840kB time=00:00:08.21 bitrate=3830.1kbiframe= 252 fps= 14 q=23.0 size= 3840kB time=00:00:08.49 bitrate=3705.0kbiframe= 260 fps= 14 q=23.0 size= 4096kB time=00:00:08.74 bitrate=3836.3kbiframe= 268 fps= 14 q=23.0 size= 4096kB time=00:00:09.02 bitrate=3718.4kbiframe= 276 fps= 13 q=23.0 size= 4352kB time=00:00:09.28 bitrate=3841.8kbiframe= 284 fps= 13 q=23.0 size= 4608kB time=00:00:09.55 bitrate=3949.7kbiframe= 292 fps= 13 q=23.0 size= 4608kB time=00:00:09.81 bitrate=3846.7kbiframe= 298 fps= 13 q=25.0 size= 4864kB time=00:00:10.02 bitrate=3974.0kbiframe= 304 fps= 13 q=24.0 size= 5120kB time=00:00:10.21 bitrate=4104.6kbiframe= 310 fps= 13 q=24.0 size= 5376kB time=00:00:10.41 bitrate=4230.3kbiframe= 318 fps= 13 q=24.0 size= 5376kB time=00:00:10.68 bitrate=4120.6kbiframe= 326 fps= 13 q=24.0 size= 5632kB time=00:00:10.94 bitrate=4215.8kbiframe= 334 fps= 13 q=24.0 size= 5632kB time=00:00:11.22 bitrate=4111.6kbiframe= 342 fps= 13 q=24.0 size= 5888kB time=00:00:11.47 bitrate=4202.6kbiframe= 350 fps= 13 q=24.0 size= 6144kB time=00:00:11.75 bitrate=4281.9kbiframe= 358 fps= 13 q=24.0 size= 6144kB time=00:00:12.01 bitrate=4190.6kbiframe= 366 fps= 13 q=24.0 size= 6400kB time=00:00:12.28 bitrate=4266.7kbiframe= 374 fps= 13 q=24.0 size= 6400kB time=00:00:12.54 bitrate=4179.6kbiframe= 381 fps= 13 q=24.0 size= 6656kB time=00:00:12.77 bitrate=4267.0kbiframe= 387 fps= 13 q=24.0 size= 6656kB time=00:00:12.99 bitrate=4196.9kbiframe= 394 fps= 13 q=24.0 size= 6912kB time=00:00:13.22 bitrate=4281.0kbiframe= 402 fps= 13 q=24.0 size= 6912kB time=00:00:13.48 bitrate=4199.7kbiframe= 410 fps= 13 q=24.0 size= 7168kB time=00:00:13.76 bitrate=4267.5kbiframe= 418 fps= 13 q=24.0 size= 7424kB time=00:00:14.01 bitrate=4339.2kbiframe= 426 fps= 13 q=24.0 size= 7424kB time=00:00:14.29 bitrate=4255.0kbiframe= 434 fps= 13 q=24.0 size= 7680kB time=00:00:14.54 bitrate=4324.2kbiframe= 442 fps= 13 q=24.0 size= 7680kB time=00:00:14.82 bitrate=4243.4kbiframe= 450 fps= 13 q=24.0 size= 7936kB time=00:00:15.08 bitrate=4310.4kbiframe= 455 fps= 13 q=24.0 size= 7936kB time=00:00:15.25 bitrate=4262.2kbiframe= 462 fps= 13 q=24.0 size= 8192kB time=00:00:15.48 bitrate=4333.0kbiframe= 470 fps= 13 q=24.0 size= 8192kB time=00:00:15.74 bitrate=4262.5kbiframe= 478 fps= 13 q=24.0 size= 8448kB time=00:00:16.02 bitrate=4319.6kbiframe= 486 fps= 13 q=24.0 size= 8448kB time=00:00:16.27 bitrate=4251.7kbiframe= 494 fps= 13 q=24.0 size= 8704kB time=00:00:16.55 bitrate=4307.2kbiframe= 502 fps= 13 q=24.0 size= 8704kB time=00:00:16.81 bitrate=4241.6kbiframe= 510 fps= 13 q=24.0 size= 8960kB time=00:00:17.08 bitrate=4295.4kbiframe= 516 fps= 13 q=24.0 size= 9216kB time=00:00:17.28 bitrate=4369.1kbiframe= 522 fps= 13 q=24.0 size= 9216kB time=00:00:17.49 bitrate=4315.8kbiframe= 530 fps= 13 q=24.0 size= 9728kB time=00:00:17.74 bitrate=4489.9kbiframe= 538 fps= 13 q=25.0 size= 9984kB time=00:00:18.02 bitrate=4537.1kbiframe= 545 fps= 13 q=25.0 size= 9984kB time=00:00:18.24 bitrate=4484.1kbiframe= 551 fps= 12 q=26.0 size= 10496kB time=00:00:18.45 bitrate=4659.5kbiframe= 560 fps= 12 q=26.0 size= 10752kB time=00:00:18.75 bitrate=4697.1kbiframe= 568 fps= 12 q=26.0 size= 11008kB time=00:00:19.00 bitrate=4744.2kbiframe= 573 fps= 12 q=26.0 size= 11264kB time=00:00:19.17 bitrate=4811.3kbiframe= 580 fps= 12 q=26.0 size= 11264kB time=00:00:19.41 bitrate=4753.2kbiframe= 588 fps= 12 q=26.0 size= 11520kB time=00:00:19.66 bitrate=4797.9kbiframe= 592 fps= 12 q=26.0 size= 11776kB time=00:00:19.81 bitrate=4867.6kbiframe= 598 fps= 12 q=27.0 size= 11776kB time=00:00:20.01 bitrate=4820.9kbiframe= 604 fps= 12 q=27.0 size= 12032kB time=00:00:20.22 bitrate=4873.7kbiframe= 612 fps= 12 q=27.0 size= 12032kB time=00:00:20.48 bitrate=4812.8kbiframe= 620 fps= 12 q=27.0 size= 12288kB time=00:00:20.75 bitrate=4849.5kbiframe= 628 fps= 12 q=27.0 size= 12544kB time=00:00:21.01 bitrate=4890.3kbiframe= 633 fps= 12 q=27.0 size= 12544kB time=00:00:21.16 bitrate=4855.8kbiframe= 640 fps= 12 q=27.0 size= 12800kB time=00:00:21.41 bitrate=4895.6kbiframe= 646 fps= 12 q=27.0 size= 12800kB time=00:00:21.61 bitrate=4852.1kbiframe= 652 fps= 12 q=27.0 size= 13056kB time=00:00:21.82 bitrate=4900.8kbiframe= 660 fps= 12 q=27.0 size= 13312kB time=00:00:22.08 bitrate=4939.0kbiframe= 668 fps= 12 q=27.0 size= 13312kB time=00:00:22.35 bitrate=4877.7kbiframe= 676 fps= 12 q=27.0 size= 13568kB time=00:00:22.61 bitrate=4915.2kbiframe= 683 fps= 12 q=27.0 size= 13568kB time=00:00:22.84 bitrate=4864.7kbiframe= 689 fps= 12 q=27.0 size= 13824kB time=00:00:23.06 bitrate=4910.7kbiframe= 696 fps= 12 q=27.0 size= 14080kB time=00:00:23.27 bitrate=4955.8kbiframe= 703 fps= 12 q=27.0 size= 14080kB time=00:00:23.48 bitrate=4910.7kbiframe= 708 fps= 12 q=27.0 size= 14336kB time=00:00:23.68 bitrate=4959.5kbiframe= 716 fps= 12 q=27.0 size= 14336kB time=00:00:23.95 bitrate=4902.1kbiframe= 724 fps= 12 q=27.0 size= 14592kB time=00:00:24.21 bitrate=4936.9kbiframe= 732 fps= 12 q=27.0 size= 14592kB time=00:00:24.49 bitrate=4881.0kbiframe= 740 fps= 12 q=27.0 size= 14848kB time=00:00:24.74 bitrate=4915.2kbiframe= 748 fps= 12 q=27.0 size= 15104kB time=00:00:25.02 bitrate=4944.5kbiframe= 756 fps= 12 q=27.0 size= 15104kB time=00:00:25.28 bitrate=4894.5kbiframe= 764 fps= 12 q=28.0 size= 15360kB time=00:00:25.55 bitrate=4923.4kbiframe= 772 fps= 12 q=28.0 size= 15616kB time=00:00:25.81 bitrate=4955.8kbiframe= 780 fps= 12 q=28.0 size= 15616kB time=00:00:26.09 bitrate=4903.2kbiframe= 788 fps= 12 q=28.0 size= 15872kB time=00:00:26.34 bitrate=4935.1kbiframe= 793 fps= 12 q=28.0 size= 15872kB time=00:00:26.51 bitrate=4903.3kbiframe= 801 fps= 12 q=28.0 size= 16384kB time=00:00:26.77 bitrate=5013.1kbiframe= 810 fps= 12 q=28.0 size= 16384kB time=00:00:27.09 bitrate=4953.9kbiframe= 818 fps= 12 q=28.0 size= 16640kB time=00:00:27.34 bitrate=4984.2kbiframe= 824 fps= 12 q=28.0 size= 16640kB time=00:00:27.54 bitrate=4949.5kbiframe= 830 fps= 12 q=28.0 size= 16896kB time=00:00:27.75 bitrate=4987.0kbiframe= 837 fps= 12 q=28.0 size= 16896kB time=00:00:27.98 bitrate=4945.2kbiframe= 844 fps= 12 q=28.0 size= 17152kB time=00:00:28.22 bitrate=4978.4kbiframe= 850 fps= 12 q=28.0 size= 17152kB time=00:00:28.41 bitrate=4944.7kbiframe= 858 fps= 12 q=28.0 size= 17408kB time=00:00:28.67 bitrate=4973.7kbiframe= 863 fps= 12 q=28.0 size= 17408kB time=00:00:28.84 bitrate=4944.3kbiframe= 870 fps= 12 q=28.0 size= 17664kB time=00:00:29.07 bitrate=4976.5kbiframe= 878 fps= 12 q=28.0 size= 17664kB time=00:00:29.35 bitrate=4929.5kbiframe= 886 fps= 12 q=28.0 size= 17920kB time=00:00:29.61 bitrate=4957.7kbiframe= 894 fps= 12 q=28.0 size= 18176kB time=00:00:29.88 bitrate=4981.9kbiframe= 902 fps= 12 q=28.0 size= 18176kB time=00:00:30.14 bitrate=4939.6kbiframe= 910 fps= 12 q=28.0 size= 18432kB time=00:00:30.40 bitrate=4966.9kbiframe= 916 fps= 12 q=28.0 size= 18432kB time=00:00:30.61 bitrate=4932.3kbiframe= 922 fps= 12 q=28.0 size= 18688kB time=00:00:30.82 bitrate=4966.2kbiframe= 930 fps= 12 q=28.0 size= 18688kB time=00:00:31.08 bitrate=4925.3kbiframe= 937 fps= 12 q=28.0 size= 18944kB time=00:00:31.31 bitrate=4955.4kbiframe= 942 fps= 12 q=28.0 size= 18944kB time=00:00:31.48 bitrate=4928.5kbiframe= 950 fps= 12 q=28.0 size= 19200kB time=00:00:31.74 bitrate=4954.8kbiframe= 958 fps= 12 q=28.0 size= 19200kB time=00:00:32.02 bitrate=4911.9kbiframe= 964 fps= 12 q=28.0 size= 19456kB time=00:00:32.21 bitrate=4947.8kbiframe= 970 fps= 12 q=28.0 size= 19456kB time=00:00:32.42 bitrate=4915.2kbiframe= 978 fps= 12 q=28.0 size= 19712kB time=00:00:32.68 bitrate=4940.9kbiframe= 985 fps= 12 q=28.0 size= 19712kB time=00:00:32.91 bitrate=4905.7kbiframe= 991 fps= 12 q=28.0 size= 19968kB time=00:00:33.10 bitrate=4940.5kbiframe= 998 fps= 12 q=28.0 size= 19968kB time=00:00:33.34 bitrate=4905.8kbiframe= 1006 fps= 12 q=28.0 size= 20224kB time=00:00:33.62 bitrate=4927.7kbiframe= 1012 fps= 12 q=28.0 size= 20224kB time=00:00:33.81 bitrate=4899.7kbiframe= 1018 fps= 12 q=28.0 size= 20480kB time=00:00:34.02 bitrate=4930.6kbiframe= 1026 fps= 12 q=28.0 size= 20480kB time=00:00:34.28 bitrate=4893.8kbiframe= 1034 fps= 12 q=28.0 size= 20736kB time=00:00:34.56 bitrate=4915.2kbiframe= 1040 fps= 12 q=28.0 size= 20736kB time=00:00:34.75 bitrate=4888.1kbiframe= 1046 fps= 12 q=25.0 size= 20992kB time=00:00:34.94 bitrate=4921.2kbiframe= 1051 fps= 12 q=28.0 size= 21248kB time=00:00:35.11 bitrate=4957.0kbiframe= 1058 fps= 12 q=28.0 size= 21248kB time=00:00:35.37 bitrate=4921.1kbiframe= 1065 fps= 12 q=28.0 size= 21504kB time=00:00:35.56 bitrate=4953.5kbiframe= 1072 fps= 12 q=28.0 size= 21504kB time=00:00:35.81 bitrate=4918.1kbiframe= 1080 fps= 12 q=28.0 size= 21760kB time=00:00:36.07 bitrate=4941.4kbiframe= 1086 fps= 12 q=28.0 size= 21760kB time=00:00:36.28 bitrate=4912.3kbiframe= 1092 fps= 12 q=28.0 size= 22016kB time=00:00:36.48 bitrate=4944.0kbiframe= 1100 fps= 12 q=28.0 size= 22016kB time=00:00:36.73 bitrate=4909.5kbiframe= 1105 fps= 12 q=28.0 size= 22272kB time=00:00:36.90 bitrate=4943.6kbiframe= 1112 fps= 12 q=28.0 size= 22272kB time=00:00:37.14 bitrate=4912.4kbiframe= 1116 fps= 12 q=28.0 size= 22272kB time=00:00:37.29 bitrate=4892.7kbiframe= 1124 fps= 12 q=28.0 size= 22528kB time=00:00:37.54 bitrate=4915.2kbiframe= 1132 fps= 12 q=28.0 size= 22784kB time=00:00:37.82 bitrate=4934.6kbiframe= 1139 fps= 12 q=28.0 size= 22784kB time=00:00:38.03 bitrate=4906.9kbiframe= 1144 fps= 12 q=28.0 size= 22784kB time=00:00:38.20 bitrate=4885.0kbiframe= 1152 fps= 12 q=28.0 size= 23040kB time=00:00:38.48 bitrate=4904.3kbiframe= 1159 fps= 12 q=28.0 size= 23040kB time=00:00:38.72 bitrate=4874.6kbiframe= 1165 fps= 12 q=28.0 size= 23296kB time=00:00:38.91 bitrate=4904.4kbiframe= 1172 fps= 12 q=28.0 size= 23296kB time=00:00:39.14 bitrate=4875.0kbiframe= 1180 fps= 12 q=28.0 size= 23296kB time=00:00:39.42 bitrate=4840.7kbiframe= 1188 fps= 12 q=28.0 size= 23296kB time=00:00:39.68 bitrate=4809.5kbiframe= 1196 fps= 12 q=28.0 size= 23552kB time=00:00:39.95 bitrate=4828.6kbiframe= 1204 fps= 12 q=27.0 size= 23552kB time=00:00:40.21 bitrate=4797.9kbiframe= 1212 fps= 12 q=27.0 size= 23552kB time=00:00:40.49 bitrate=4765.0kbiframe= 1220 fps= 12 q=27.0 size= 23552kB time=00:00:40.74 bitrate=4735.1kbiframe= 1228 fps= 12 q=27.0 size= 23808kB time=00:00:41.02 bitrate=4754.2kbiframe= 1236 fps= 12 q=27.0 size= 23808kB time=00:00:41.28 bitrate=4724.7kbiframe= 1244 fps= 12 q=27.0 size= 23808kB time=00:00:41.55 bitrate=4693.2kbiframe= 1252 fps= 12 q=27.0 size= 24064kB time=00:00:41.81 bitrate=4714.6kbiframe= 1260 fps= 12 q=27.0 size= 24064kB time=00:00:42.09 bitrate=4683.5kbiframe= 1266 fps= 12 q=27.0 size= 24064kB time=00:00:42.28 bitrate=4662.3kbiframe= 1272 fps= 12 q=26.0 size= 24320kB time=00:00:42.47 bitrate=4690.6kbiframe= 1280 fps= 12 q=26.0 size= 24320kB time=00:00:42.75 bitrate=4660.1kbiframe= 1288 fps= 12 q=26.0 size= 24320kB time=00:00:43.00 bitrate=4632.4kbiframe= 1295 fps= 12 q=26.0 size= 24320kB time=00:00:43.24 bitrate=4607.2kbiframe= 1301 fps= 12 q=26.0 size= 24832kB time=00:00:43.45 bitrate=4681.1kbiframe= 1308 fps= 12 q=26.0 size= 24832kB time=00:00:43.69 bitrate=4656.0kbiframe= 1315 fps= 12 q=26.0 size= 24832kB time=00:00:43.92 bitrate=4631.1kbiframe= 1322 fps= 12 q=26.0 size= 25088kB time=00:00:44.16 bitrate=4654.0kbiframe= 1330 fps= 12 q=26.0 size= 25088kB time=00:00:44.41 bitrate=4627.2kbiframe= 1338 fps= 12 q=26.0 size= 25344kB time=00:00:44.69 bitrate=4645.4kbiframe= 1346 fps= 12 q=26.0 size= 25344kB time=00:00:44.94 bitrate=4618.9kbiframe= 1354 fps= 12 q=26.0 size= 25344kB time=00:00:45.22 bitrate=4590.6kbiframe= 1362 fps= 12 q=26.0 size= 25600kB time=00:00:45.48 bitrate=4610.9kbiframe= 1370 fps= 12 q=26.0 size= 25600kB time=00:00:45.76 bitrate=4582.9kbiframe= 1378 fps= 12 q=26.0 size= 25856kB time=00:00:46.01 bitrate=4603.0kbiframe= 1385 fps= 12 q=26.0 size= 25856kB time=00:00:46.25 bitrate=4579.7kbiframe= 1391 fps= 12 q=26.0 size= 25856kB time=00:00:46.44 bitrate=4560.7kbiframe= 1398 fps= 12 q=25.0 size= 26112kB time=00:00:46.67 bitrate=4582.7kbiframe= 1406 fps= 12 q=25.0 size= 26112kB time=00:00:46.95 bitrate=4555.7kbiframe= 1414 fps= 12 q=25.0 size= 26368kB time=00:00:47.21 bitrate=4575.4kbiframe= 1422 fps= 12 q=25.0 size= 26368kB time=00:00:47.48 bitrate=4548.7kbiframe= 1430 fps= 12 q=25.0 size= 26624kB time=00:00:47.74 bitrate=4568.2kbiframe= 1438 fps= 12 q=25.0 size= 26624kB time=00:00:48.02 bitrate=4541.8kbiframe= 1446 fps= 12 q=25.0 size= 26880kB time=00:00:48.27 bitrate=4561.2kbiframe= 1454 fps= 12 q=25.0 size= 26880kB time=00:00:48.55 bitrate=4535.1kbiframe= 1462 fps= 12 q=25.0 size= 27136kB time=00:00:48.81 bitrate=4554.3kbiframe= 1469 fps= 12 q=25.0 size= 27136kB time=00:00:49.04 bitrate=4532.5kbiframe= 1474 fps= 12 q=25.0 size= 27392kB time=00:00:49.21 bitrate=4559.4kbiframe= 1482 fps= 12 q=25.0 size= 27392kB time=00:00:49.49 bitrate=4533.9kbiframe= 1490 fps= 12 q=25.0 size= 27648kB time=00:00:49.74 bitrate=4552.7kbiframe= 1498 fps= 12 q=25.0 size= 27648kB time=00:00:50.02 bitrate=4527.4kbiframe= 1506 fps= 12 q=25.0 size= 27904kB time=00:00:50.28 bitrate=4546.1kbiframe= 1514 fps= 12 q=25.0 size= 27904kB time=00:00:50.56 bitrate=4521.2kbiframe= 1521 fps= 12 q=25.0 size= 27904kB time=00:00:50.77 bitrate=4502.2kbiframe= 1526 fps= 12 q=25.0 size= 28160kB time=00:00:50.94 bitrate=4528.2kbiframe= 1534 fps= 12 q=25.0 size= 28160kB time=00:00:51.22 bitrate=4503.7kbiframe= 1542 fps= 12 q=25.0 size= 28416kB time=00:00:51.47 bitrate=4522.1kbiframe= 1551 fps= 12 q=25.0 size= 28672kB time=00:00:51.77 bitrate=4536.5kbiframe= 1559 fps= 12 q=25.0 size= 28928kB time=00:00:52.05 bitrate=4552.6kbiframe= 1564 fps= 12 q=25.0 size= 28928kB time=00:00:52.22 bitrate=4537.7kbiframe= 1572 fps= 12 q=25.0 size= 29184kB time=00:00:52.48 bitrate=4555.6kbiframe= 1580 fps= 12 q=25.0 size= 29440kB time=00:00:52.75 bitrate=4571.4kbiframe= 1588 fps= 12 q=25.0 size= 29440kB time=00:00:53.01 bitrate=4549.3kbiframe= 1595 fps= 12 q=25.0 size= 29440kB time=00:00:53.24 bitrate=4529.2kbiframe= 1600 fps= 12 q=25.0 size= 29696kB time=00:00:53.41 bitrate=4554.0kbiframe= 1608 fps= 12 q=25.0 size= 29696kB time=00:00:53.67 bitrate=4532.3kbiframe= 1616 fps= 12 q=25.0 size= 29952kB time=00:00:53.95 bitrate=4547.9kbiframe= 1624 fps= 12 q=25.0 size= 30208kB time=00:00:54.20 bitrate=4565.1kbiframe= 1632 fps= 12 q=25.0 size= 30208kB time=00:00:54.48 bitrate=4541.9kbiframe= 1640 fps= 12 q=25.0 size= 30464kB time=00:00:54.74 bitrate=4558.9kbiframe= 1648 fps= 12 q=25.0 size= 30464kB time=00:00:55.01 bitrate=4535.9kbiframe= 1656 fps= 12 q=25.0 size= 30464kB time=00:00:55.27 bitrate=4514.9kbiframe= 1664 fps= 12 q=25.0 size= 30720kB time=00:00:55.55 bitrate=4530.1kbiframe= 1670 fps= 12 q=24.0 size= 30720kB time=00:00:55.74 bitrate=4514.5kbiframe= 1676 fps= 12 q=24.0 size= 30976kB time=00:00:55.95 bitrate=4534.8kbiframe= 1684 fps= 12 q=24.0 size= 30976kB time=00:00:56.21 bitrate=4514.2kbiframe= 1693 fps= 12 q=24.0 size= 31232kB time=00:00:56.51 bitrate=4527.4kbiframe= 1699 fps= 12 q=24.0 size= 31232kB time=00:00:56.70 bitrate=4512.1kbiframe= 1704 fps= 12 q=24.0 size= 31232kB time=00:00:56.87 bitrate=4498.5kbiframe= 1712 fps= 12 q=24.0 size= 31488kB time=00:00:57.15 bitrate=4513.4kbiframe= 1718 fps= 12 q=24.0 size= 31488kB time=00:00:57.34 bitrate=4498.3kbiframe= 1724 fps= 12 q=24.0 size= 31744kB time=00:00:57.55 bitrate=4518.1kbiframe= 1732 fps= 12 q=24.0 size= 31744kB time=00:00:57.81 bitrate=4498.0kbiframe= 1740 fps= 12 q=24.0 size= 32000kB time=00:00:58.09 bitrate=4512.7kbiframe= 1748 fps= 12 q=24.0 size= 32000kB time=00:00:58.34 bitrate=4492.9kbiframe= 1754 fps= 12 q=24.0 size= 32000kB time=00:00:58.56 bitrate=4476.5kbiframe= 1760 fps= 12 q=24.0 size= 32256kB time=00:00:58.75 bitrate=4497.6kbiframe= 1768 fps= 12 q=24.0 size= 32256kB time=00:00:59.00 bitrate=4478.1kbiframe= 1776 fps= 12 q=24.0 size= 32512kB time=00:00:59.28 bitrate=4492.5kbiframe= 1784 fps= 12 q=24.0 size= 32512kB time=00:00:59.54 bitrate=4473.2kbiframe= 1792 fps= 12 q=24.0 size= 32768kB time=00:00:59.81 bitrate=4487.5kbiframe= 1801 fps= 12 q=24.0 size= 33280kB time=00:01:00.11 bitrate=4535.0kbiframe= 1810 fps= 12 q=24.0 size= 33280kB time=00:01:00.41 bitrate=4512.5kbiframe= 1818 fps= 12 q=24.0 size= 33536kB time=00:01:00.69 bitrate=4526.5kbiframe= 1826 fps= 12 q=24.0 size= 33536kB time=00:01:00.94 bitrate=4507.5kbiframe= 1834 fps= 12 q=24.0 size= 33792kB time=00:01:01.22 bitrate=4521.3kbiframe= 1842 fps= 12 q=24.0 size= 33792kB time=00:01:01.48 bitrate=4502.5kbiframe= 1850 fps= 12 q=24.0 size= 34048kB time=00:01:01.76 bitrate=4516.2kbiframe= 1858 fps= 12 q=24.0 size= 34048kB time=00:01:01.95 bitrate=4502.2kbiframe= 1860 fps= 12 q=-1.0 Lsize= 34996kB time=00:01:01.99 bitrate=4624.4kbits/s dup=19 drop=0 speed=0.405x video:33951kB audio:976kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.195101% [libx264 @ 0x79fcc0] frame I:8 Avg QP:15.78 size:317474 [libx264 @ 0x79fcc0] frame P:469 Avg QP:19.25 size: 53787 [libx264 @ 0x79fcc0] frame B:1383 Avg QP:25.21 size: 5061 [libx264 @ 0x79fcc0] consecutive B-frames: 0.9% 0.0% 0.0% 99.1% [libx264 @ 0x79fcc0] mb I I16..4: 2.4% 50.4% 47.2% [libx264 @ 0x79fcc0] mb P I16..4: 0.0% 0.3% 0.3% P16..4: 51.2% 14.7% 21.2% 0.0% 0.0% skip:12.2% [libx264 @ 0x79fcc0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 25.4% 1.6% 1.5% direct: 1.6% skip:69.9% L0:32.6% L1:59.4% BI: 8.0% [libx264 @ 0x79fcc0] final ratefactor: 19.13 [libx264 @ 0x79fcc0] 8x8 transform intra:48.3% inter:54.1% [libx264 @ 0x79fcc0] coded y,uvDC,uvAC intra: 95.5% 97.4% 90.3% inter: 17.5% 23.2% 7.0% [libx264 @ 0x79fcc0] i16 v,h,dc,p: 28% 17% 20% 34% [libx264 @ 0x79fcc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 24% 17% 6% 7% 5% 10% 6% 14% [libx264 @ 0x79fcc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 22% 10% 6% 9% 8% 11% 7% 13% [libx264 @ 0x79fcc0] i8c dc,h,v,p: 50% 25% 13% 11% [libx264 @ 0x79fcc0] Weighted P-Frames: Y:0.9% UV:0.6% [libx264 @ 0x79fcc0] ref P L0: 55.9% 8.6% 28.7% 6.8% 0.0% [libx264 @ 0x79fcc0] ref B L0: 89.3% 9.1% 1.6% [libx264 @ 0x79fcc0] ref B L1: 94.3% 5.7% [libx264 @ 0x79fcc0] kb/s:4485.87 [aac @ 0x7e7080] Qavg: 445.427 1. frame# as n, or at playback and pressing the keys for back to beginning, does not start until 0.566 for frame # 0 because (I think) the source video has an audio offset. This makes problem#1 affect all future edits. 2. overlay:between appears at frame# 446 15.433 sec which is not as requested at 511 a difference of 65 frames early. 3. overlay:between disappears early also, last frame# 1092 37.000 which is not 1224. A difference of 132 frames. My math on the drift makes that a factor of 90.6%, but [0] is 30 fps. The cause is because the gif file [1] is 30ms per frame, not 33.333ms, which accounts for the 90% figure. So question#2 is: How can I override the timing, and just copy frame by frame ignoring the timestamps of [1]? Problem #3: 4. overlay appears a second time for one frame at frame# 1207 40.799 sec Acts like it ignored it's own timestamp calculations and included one frame at the end of the requested range, plus the audio offset. Stewart
S Andreason wrote:
1. frame# as n, or at playback and pressing the keys for back to beginning, does not start until 0.566 for frame # 0 because (I think) the source video has an audio offset. This makes problem#1 affect all future edits.
2. How can I override the timing, and just copy frame by frame ignoring the timestamps of [1]?
Perhaps if I supply sample files... here is a sample source video from the camera in question. https://www.seahorsecorral.org/videos/tests/20190628_163959_driving-WCurlewL... https://www.seahorsecorral.org/videos/tests/redwave-500x400.gif I have also recompiled latest git with no change. Step 1. clip desired video. I want to start at 22.0 seconds, (where the blue sign is visible on left) but the nearest I-frame appears to be at 21.933 sec according to mpv. $ ffprobe -show_frames says 21.566 for nearest pict_type=I Giving a -ss 22 or -ss 21.97 results in a 0.566 gap in video, where the audio is not cut at the same place as the video, so it was not cut at the I-frame. -ss 21.933 results in a 0.114 sec gap. -ss 21.566 results in a 0.497 sec gap. -ss 21.96 results in 0.092 sec gap, which seems to be the best I can get. Too many of these concat together later will result in audio sync problems, so there is a good reason to ask how to improve the cut here. $ ffmpeg -i 20190628_163959_driving-WCurlewLkRd-S_30sec_FHDw.MOV -ss 21.96 -t 6 -c copy 20190628_163959_driving-WCurlewLkRd-S_30sec_FHDw_c21.96t6.MOV ffmpeg version N-96573-g73aab08d9d Copyright (c) 2000-2020 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 configuration: --prefix=/usr/local --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-libopenjpeg --enable-libfreetype --disable-doc --disable-htmlpages --disable-podpages --enable-shared --enable-libvpx --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib/i386-linux-gnu --enable-libass --enable-libtesseract --extra-cflags=-msse2 --enable-openssl --enable-nonfree libavutil 56. 38.100 / 56. 36.101 libavcodec 58. 67.100 / 58. 64.101 libavformat 58. 37.100 / 58. 35.101 libavdevice 58. 9.103 / 58. 9.101 libavfilter 7. 72.100 / 7. 68.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1569540] st: 0 edit list: 1 Missing key frame while searching for timestamp: 2000 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1569540] st: 0 edit list 1 Cannot find an index entry before timestamp: 2000. Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20190628_163959_driving-WCurlewLkRd-S_30sec_FHDw.MOV': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2019-06-28T16:39:59.000000Z playback_requirements: QuickTime 6.0 or greater playback_requirements-eng: QuickTime 6.0 or greater Duration: 00:00:29.50, start: 0.000000, bitrate: 15212 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 15078 kb/s, 30 fps, 30 tbr, 60k tbn, 120k tbc (default) Metadata: creation_time : 2019-06-28T16:39:59.000000Z handler_name : Video Handler encoder : iCatch AVCC Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default) Metadata: creation_time : 2019-06-28T16:39:59.000000Z handler_name : Audio Handler Output #0, mov, to '20190628_163959_driving-WCurlewLkRd-S_30sec_FHDw_c21.96t6.MOV': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt playback_requirements-eng: QuickTime 6.0 or greater playback_requirements: QuickTime 6.0 or greater encoder : Lavf58.35.101 Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, q=2-31, 15078 kb/s, 30 fps, 30 tbr, 60k tbn, 60k tbc (default) Metadata: creation_time : 2019-06-28T16:39:59.000000Z handler_name : Video Handler encoder : iCatch AVCC Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default) Metadata: creation_time : 2019-06-28T16:39:59.000000Z handler_name : Audio Handler Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 180 fps=0.0 q=-1.0 Lsize= 10873kB time=00:00:05.98 bitrate=14878.9kbits/s speed=74.4x video:10772kB audio:94kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.068655% Step 2 add gif and show n $ ffmpeg -i 20190628_163959_driving-WCurlewLkRd-S_30sec_FHDw_c21.96t6.MOV -ignore_loop 0 -i redwave-500x400.gif -filter_complex "[0]scale=1280x720,drawtext='fontfile=/usr/share/fonts/TrueType/lsansd.ttf:text=%{n}:x=(w-tw)/2:y=h-(2*lh):fontcolor=white:box=1:boxcolor=0x00000099'[0st],[0st][1]overlay=x=(570+(n*6)):y=10:enable=between(n\,30\,120)" -s 1280x720 -c:v h264 -b:v 4700k -r 30 -t 6 CurlewLk_c216t6-red_30-120-720e.mov ffmpeg version N-96573-g73aab08d9d Copyright (c) 2000-2020 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 configuration: --prefix=/usr/local --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-libopenjpeg --enable-libfreetype --disable-doc --disable-htmlpages --disable-podpages --enable-shared --enable-libvpx --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib/i386-linux-gnu --enable-libass --enable-libtesseract --extra-cflags=-msse2 --enable-openssl --enable-nonfree libavutil 56. 38.100 / 56. 36.101 libavcodec 58. 67.100 / 58. 64.101 libavformat 58. 37.100 / 58. 35.101 libavdevice 58. 9.103 / 58. 9.101 libavfilter 7. 72.100 / 7. 68.100 libswscale 5. 6.100 / 5. 6.100 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '20190628_163959_driving-WCurlewLkRd-S_30sec_FHDw_c21.96t6.MOV': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf58.35.101 Duration: 00:00:06.00, start: 0.013000, bitrate: 14845 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 14707 kb/s, 30 fps, 30 tbr, 60k tbn, 120k tbc (default) Metadata: handler_name : Video Handler encoder : iCatch AVCC Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default) Metadata: handler_name : Audio Handler Input #1, gif, from 'redwave-500x400.gif': Duration: 00:00:01.35, start: 0.000000, bitrate: 2635 kb/s Stream #1:0: Video: gif, bgra, 500x400, 34 fps, 100 tbr, 100 tbn, 100 tbc Stream mapping: Stream #0:0 (h264) -> scale (graph 0) Stream #1:0 (gif) -> overlay:overlay (graph 0) overlay (graph 0) -> Stream #0:0 (libx264) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Press [q] to stop, [?] for help [libx264 @ 0x1ac8d40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX LZCNT BMI1 SlowPshufb [libx264 @ 0x1ac8d40] profile High, level 3.1 [libx264 @ 0x1ac8d40] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=6 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=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=4700 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mov, to 'CurlewLk_c216t6-red_30-120-720e.mov': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf58.35.101 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720, q=-1--1, 4700 kb/s, 30 fps, 15360 tbn, 30 tbc (default) Metadata: encoder : Lavc58.67.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/4700000 buffer size: 0 vbv_delay: N/A Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name : Audio Handler encoder : Lavc58.67.100 aac frame= 180 fps=9.2 q=-1.0 Lsize= 2921kB time=00:00:05.99 bitrate=3991.5kbits/s dup=3 drop=0 speed=0.308x video:2819kB audio:94kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.270207% [libx264 @ 0x1ac8d40] frame I:1 Avg QP:16.49 size:136468 [libx264 @ 0x1ac8d40] frame P:45 Avg QP:23.47 size: 27882 [libx264 @ 0x1ac8d40] frame B:134 Avg QP:26.75 size: 11154 [libx264 @ 0x1ac8d40] consecutive B-frames: 0.6% 0.0% 1.7% 97.8% [libx264 @ 0x1ac8d40] mb I I16..4: 6.2% 58.4% 35.4% [libx264 @ 0x1ac8d40] mb P I16..4: 1.3% 6.8% 2.1% P16..4: 44.2% 16.8% 10.0% 0.0% 0.0% skip:18.8% [libx264 @ 0x1ac8d40] mb B I16..4: 0.1% 0.9% 0.4% B16..8: 41.1% 6.5% 2.4% direct: 2.1% skip:46.5% L0:43.7% L1:48.2% BI: 8.1% [libx264 @ 0x1ac8d40] final ratefactor: 20.29 [libx264 @ 0x1ac8d40] 8x8 transform intra:64.4% inter:68.0% [libx264 @ 0x1ac8d40] coded y,uvDC,uvAC intra: 82.4% 80.6% 41.9% inter: 17.5% 21.8% 3.4% [libx264 @ 0x1ac8d40] i16 v,h,dc,p: 3% 48% 4% 45% [libx264 @ 0x1ac8d40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 22% 17% 6% 8% 7% 9% 6% 14% [libx264 @ 0x1ac8d40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 26% 15% 7% 9% 7% 10% 6% 9% [libx264 @ 0x1ac8d40] i8c dc,h,v,p: 50% 31% 10% 9% [libx264 @ 0x1ac8d40] Weighted P-Frames: Y:6.7% UV:4.4% [libx264 @ 0x1ac8d40] ref P L0: 53.1% 16.7% 21.6% 8.2% 0.3% [libx264 @ 0x1ac8d40] ref B L0: 83.3% 13.4% 3.3% [libx264 @ 0x1ac8d40] ref B L1: 91.1% 8.9% [libx264 @ 0x1ac8d40] kb/s:3847.67 [aac @ 0x1ab7600] Qavg: 222.272 Notice frame 1 overlay doesn't start at 0.0 I really need frame 0 to be 0 for all later calculations to work without adding offsets. Notice the gif frame starts at 24 or 0.900 sec. Notice the last gif frame is 105 at 3.600 sec. I can work around this limitation (unless you have a solution) by recalculating the start and stop points for n. x/30/0.03=n I can't duplicate problem 3 on such a short file, so let's focus on the above questions. Thank you, Stewart
participants (1)
-
S Andreason