
Recherche avancée
Autres articles (97)
-
Les images
15 mai 2013 -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (5742)
-
Cannot merge VisualSampleEntry error while appending videos in MP4parser
13 août 2021, par Abhishek IppakayalI am creating four videos with ffmpeg and then i am appending them with MP4parser.
Details of four videos that i am creating with ffmpeg.


- 

- 1,2 video : created using one image




[-loop, 1, -i, Count_1627453922.jpg, -s, 720x1280, -vf, format=yuv420p,fps=25,fade=type=in:duration=1,fade=type=out:duration=1:start_time=1, -t, 2, -preset, ultrafast, CountImageVideo_1627453922.mp4]



- 

- 3,4 video : trimming 3 second video from an existing mp4 video




[-i, footages_5_1624263519549.mp4, -ss, 00:00:00, -to, 00:00:02, -s, 720x1280, -r, 25, -preset, ultrafast, One_1627453926.mp4]



Now i am trying to append all these videos with MP4Parser and getting below error :


java.io.IOException: Cannot merge VisualSampleEntry[com.googlecode.mp4parser.boxes.mp4.ESDescriptorBox@f3f76444] and VisualSampleEntry[com.googlecode.mp4parser.boxes.mp4.ESDescriptorBox@e20a2ed0]
 at com.googlecode.mp4parser.authoring.tracks.AppendTrack.mergeStsds(AppendTrack.java:116)
 at com.googlecode.mp4parser.authoring.tracks.AppendTrack.<init>(AppendTrack.java:59)
</init>


I have done some debugging and found something that can help understand error better.
Sample Description boxes of two videos


Two video tracks have different formats (MP4v & AVC1). I am new to ffmpeg and MP4parser so did not getting what i am doing wrong. Thanks ! in advance.


Logs of all video creation ffmpeg command and error of mp4parser


Copyright (c) 2000-2020 the FFmpeg developers
I: built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
I: configuration: --cross-prefix=i686-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=i686 --cpu=i686 --cc=i686-linux-android16-clang --cxx=i686-linux-android16-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/cpu-features/lib -lndk_compat' --target-os=android --disable-neon --disable-asm --disable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
I: libavutil 56. 55.100 / 56. 55.100
I: libavcodec 58. 96.100 / 58. 96.100
I: libavformat 58. 48.100 / 58. 48.100
I: libavdevice 58. 11.101 / 58. 11.101
I: libavfilter 7. 87.100 / 7. 87.100
I: libswscale 5. 8.100 / 5. 8.100
I: libswresample 3. 8.100 / 3. 8.100
I: Input #0, png_pipe, from '1628829731.jpg':
I: Duration: 
I: N/A
I: , bitrate: 
I: N/A
I: Stream #0:0
I: : Video: png, rgb24(pc), 1280x592
I: , 
I: 25 fps, 
I: 25 tbr, 
I: 25 tbn, 
I: 25 tbc
I: Input #1, lavfi, from 'anullsrc':
I: Duration: 
I: N/A
I: , start: 
I: 0.000000
I: , bitrate: 
I: 705 kb/s
I: Stream #1:0
I: : Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
W: Codec AVOption preset (Configuration preset) specified for output file #0 (FootageVideo_1628829747.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
I: Stream mapping:
I: Stream #0:0 -> #0:0
I: (png (native) -> mpeg4 (native))
I: Stream #1:0 -> #0:1
I: (pcm_u8 (native) -> aac (native))
I: Press [q] to stop, [?] for help
W: [graph 0 input from stream 0:0 @ 0xbdf3a220] sws_param option is deprecated and ignored
I: Output #0, mp4, to 'FootageVideo_1628829747.mp4':
I: Metadata:
I: encoder : 
I: Lavf58.48.100
I: Stream #0:0
I: : Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 1280x592, q=2-31, 200 kb/s
I: , 
I: 24 fps, 
I: 12288 tbn, 
I: 24 tbc
I: Metadata:
I: encoder : 
I: Lavc58.96.100 mpeg4
I: Side data:
I: 
I: cpb: 
I: bitrate max/min/avg: 0/0/200000 buffer size: 0 
I: vbv_delay: N/A
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
I: Stream #0:1
I: : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
I: Metadata:
I: encoder : 
I: Lavc58.96.100 aac
I: Background young concurrent copying GC freed 20080(1054KB) AllocSpace objects, 9(2100KB) LOS objects, 7% free, 26MB/29MB, paused 4.477ms total 113.190ms
I: frame= 9 fps=0.0 q=13.8 size= 0kB time=00:00:00.34 bitrate= 1.0kbits/s speed=0.665x 
I: frame= 24 fps= 23 q=24.9 size= 0kB time=00:00:00.97 bitrate= 0.4kbits/s speed=0.953x 
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
I: frame= 40 fps= 26 q=21.0 size= 0kB time=00:00:01.64 bitrate= 0.2kbits/s speed=1.07x 
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
I: frame= 55 fps= 27 q=23.7 size= 0kB time=00:00:02.27 bitrate= 0.2kbits/s speed= 1.1x 
I: frame= 71 fps= 28 q=31.0 size= 256kB time=00:00:02.92 bitrate= 716.9kbits/s speed=1.13x 
I: frame= 72 fps= 27 q=31.0 Lsize= 307kB time=00:00:03.01 bitrate= 832.4kbits/s speed=1.14x 
I: video:303kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 
I: 1.018265%
I: [aac @ 0xbdf43c00] Qavg: 65536.000
I: Image to video: 0 : 674960272
I: [-loop, 1, -i, Count_1628829749.jpg, -f, lavfi, -i, anullsrc, -s, 1280x592, -vf, scale='if(gt(a,1280/592),1280,-1)':'if(gt(a1280/592),-1,592)',format=yuv420p,fps=24,fade=type=in:duration=1,fade=type=out:duration=1:start_time=1, -t, 2, -preset, ultrafast, CountImageVideo_1628829749.mp4]
I: [-loop, 1, -i, Count_1628829749.jpg, -f, lavfi, -i, anullsrc, -s, 1280x592, -vf, scale='if(gt(a,1280/592),1280,-1)':'if(gt(a1280/592),-1,592)',format=yuv420p,fps=24,fade=type=in:duration=1,fade=type=out:duration=1:start_time=1, -t, 2, -preset, ultrafast, CountImageVideo_1628829749.mp4]
I: Image to Video: [-loop, 1, -i, Count_1628829749.jpg, -f, lavfi, -i, anullsrc, -s, 1280x592, -vf, scale='if(gt(a,1280/592),1280,-1)':'if(gt(a1280/592),-1,592)',format=yuv420p,fps=24,fade=type=in:duration=1,fade=type=out:duration=1:start_time=1, -t, 2, -preset, ultrafast, CountImageVideo_1628829749.mp4]
I: ffmpeg version v4.4-dev-416
I: Copyright (c) 2000-2020 the FFmpeg developers
I: built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
I: configuration: --cross-prefix=i686-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=i686 --cpu=i686 --cc=i686-linux-android16-clang --cxx=i686-linux-android16-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/cpu-features/lib -lndk_compat' --target-os=android --disable-neon --disable-asm --disable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
I: libavutil 56. 55.100 / 56. 55.100
I: libavcodec 58. 96.100 / 58. 96.100
I: libavformat 58. 48.100 / 58. 48.100
I: libavdevice 58. 11.101 / 58. 11.101
I: libavfilter 7. 87.100 / 7. 87.100
I: libswscale 5. 8.100 / 5. 8.100
I: libswresample 3. 8.100 / 3. 8.100
I: Input #0, png_pipe, from 'Count_1628829749.jpg':
I: Duration: 
I: N/A
I: , bitrate: 
I: N/A
I: Stream #0:0
I: : Video: png, rgba(pc), 1794x1080
I: , 
I: 25 fps, 
I: 25 tbr, 
I: 25 tbn, 
I: 25 tbc
I: Input #1, lavfi, from 'anullsrc':
I: Duration: 
I: N/A
I: , start: 
I: 0.000000
I: , bitrate: 
I: 705 kb/s
I: Stream #1:0
I: : Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
W: Codec AVOption preset (Configuration preset) specified for output file #0 (CountImageVideo_1628829749.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
I: Stream mapping:
I: Stream #0:0 -> #0:0
I: (png (native) -> mpeg4 (native))
I: Stream #1:0 -> #0:1
I: (pcm_u8 (native) -> aac (native))
I: Press [q] to stop, [?] for help
W: [graph 0 input from stream 0:0 @ 0xbe554440] sws_param option is deprecated and ignored
I: Output #0, mp4, to 'CountImageVideo_1628829749.mp4':
I: Metadata:
I: encoder : 
I: Lavf58.48.100
I: Stream #0:0
I: : Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 1280x592, q=2-31, 200 kb/s
I: , 
I: 24 fps, 
I: 12288 tbn, 
I: 24 tbc
I: Metadata:
I: encoder : 
I: Lavc58.96.100 mpeg4
I: Side data:
I: 
I: cpb: 
I: bitrate max/min/avg: 0/0/200000 buffer size: 0 
I: vbv_delay: N/A
I: Stream #0:1
I: : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
I: Metadata:
I: encoder : 
I: Lavc58.96.100 aac
W: Not supplying enough data to HAL, expected position 1243219441 , only wrote 1243083210
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
I: frame= 3 fps=0.0 q=2.0 size= 0kB time=00:00:00.09 bitrate= 3.8kbits/s speed=0.289x 
I: frame= 11 fps=0.0 q=2.0 size= 0kB time=00:00:00.44 bitrate= 0.8kbits/s speed=0.521x 
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
I: frame= 18 fps= 13 q=2.0 size= 0kB time=00:00:00.71 bitrate= 0.5kbits/s speed=0.532x 
I: frame= 26 fps= 14 q=2.0 size= 0kB time=00:00:01.06 bitrate= 0.3kbits/s speed=0.571x 
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
I: frame= 35 fps= 14 q=2.0 size= 0kB time=00:00:01.43 bitrate= 0.2kbits/s speed=0.595x 
I: frame= 43 fps= 14 q=2.0 size= 0kB time=00:00:01.76 bitrate= 0.2kbits/s speed=0.593x 
D: onUnbind: Intent { act=com.google.android.gms.wallet.service.BIND pkg=com.google.android.gms }
D: onUnbind: Intent { act=com.google.android.mdd.service.START cmp=com.google.android.gms/.chimera.GmsBoundBrokerService }
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
I: frame= 48 fps= 14 q=2.0 Lsize= 75kB time=00:00:02.02 bitrate= 303.7kbits/s speed=0.586x 
I: video:72kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 
I: 3.472700%
I: [aac @ 0xbdf69c00] Qavg: 65536.000
I: Count Image to video: 0 : 674963874
I: Start Video Query: [-i, iOS_footages_4_1627755471638.mp4, -ss, 00:00:02, -to, 00:00:05, -s, 1280x592, -r, 24, -preset, ultrafast, TilePartOne_1628829753.mp4]
I: ffmpeg version v4.4-dev-416
I: Copyright (c) 2000-2020 the FFmpeg developers
I: built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
I: configuration: --cross-prefix=i686-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=i686 --cpu=i686 --cc=i686-linux-android16-clang --cxx=i686-linux-android16-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/cpu-features/lib -lndk_compat' --target-os=android --disable-neon --disable-asm --disable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
I: libavutil 56. 55.100 / 56. 55.100
I: libavcodec 58. 96.100 / 58. 96.100
I: libavformat 58. 48.100 / 58. 48.100
I: libavdevice 58. 11.101 / 58. 11.101
I: libavfilter 7. 87.100 / 7. 87.100
I: libswscale 5. 8.100 / 5. 8.100
I: libswresample 3. 8.100 / 3. 8.100
I: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'iOS_footages_4_1627755471638.mp4':
I: Metadata:
I: major_brand : 
I: qt 
I: minor_version : 
I: 0
I: compatible_brands: 
I: qt 
I: creation_time : 
I: 2021-07-31T18:17:18.000000Z
I: com.apple.quicktime.author: 
I: ReplayKitRecording
I: Duration: 
I: 00:03:34.00
I: , start: 
I: 0.000000
I: , bitrate: 
I: 2183 kb/s
I: Stream #0:0
I: (und)
I: : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 37 kb/s
I: (default)
I: Metadata:
I: creation_time : 
I: 2021-07-31T18:17:18.000000Z
I: handler_name : 
I: Core Media Audio
I: Stream #0:1
I: (und)
I: : Video: h264 (avc1 / 0x31637661), yuvj420p(pc, bt709), 592x1280, 2139 kb/s
I: , 
I: 38.89 fps, 
I: 59.94 tbr, 
I: 600 tbn, 
I: 1200 tbc
I: (default)
I: Metadata:
I: rotate : 
I: 270
I: creation_time : 
I: 2021-07-31T18:17:18.000000Z
I: handler_name : 
I: Core Media Video
I: encoder : 
I: H.264
I: Side data:
I: 
I: displaymatrix: rotation of 90.00 degrees
W: Codec AVOption preset (Configuration preset) specified for output file #0 (TilePartOne_1628829753.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
I: Stream mapping:
I: Stream #0:1 -> #0:0
I: (h264 (native) -> mpeg4 (native))
I: Stream #0:0 -> #0:1
I: (aac (native) -> aac (native))
I: Press [q] to stop, [?] for help
I: frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A 
W: [graph 0 input from stream 0:1 @ 0xedd7fca0] sws_param option is deprecated and ignored
W: [swscaler @ 0xb645a800] deprecated pixel format used, make sure you did set range correctly
I: frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A 
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
E: Couldn't load memtrack module
W: failed to get memory consumption info: -1
I: Output #0, mp4, to 'TilePartOne_1628829753.mp4':
I: Metadata:
I: major_brand : 
I: qt 
I: minor_version : 
I: 0
I: compatible_brands: 
I: qt 
I: com.apple.quicktime.author: 
I: ReplayKitRecording
I: encoder : 
I: Lavf58.48.100
I: Stream #0:0
I: (und)
I: : Video: mpeg4 (mp4v / 0x7634706D), yuv420p(progressive), 1280x592, q=2-31, 200 kb/s
I: , 
I: 24 fps, 
I: 12288 tbn, 
I: 24 tbc
I: (default)
I: Metadata:
I: encoder : 
I: Lavc58.96.100 mpeg4
I: creation_time : 
I: 2021-07-31T18:17:18.000000Z
I: handler_name : 
I: Core Media Video
I: Side data:
I: 
I: cpb: 
I: bitrate max/min/avg: 0/0/200000 buffer size: 0 
I: vbv_delay: N/A
I: 
I: displaymatrix: rotation of -0.00 degrees
I: Stream #0:1
I: (und)
I: : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
I: (default)
I: Metadata:
I: creation_time : 
I: 2021-07-31T18:17:18.000000Z
I: handler_name : 
I: Core Media Audio
I: encoder : 
I: Lavc58.96.100 aac
I: frame= 6 fps=6.0 q=5.8 size= 0kB time=00:00:00.20 bitrate= 1.7kbits/s speed=0.208x 
I: frame= 28 fps= 18 q=31.0 size= 0kB time=00:00:01.12 bitrate= 0.3kbits/s dup=0 drop=3 speed=0.736x 
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
I: frame= 44 fps= 22 q=31.0 size= 0kB time=00:00:01.79 bitrate= 0.2kbits/s dup=0 drop=15 speed=0.881x 
I: frame= 63 fps= 25 q=31.0 size= 0kB time=00:00:02.58 bitrate= 0.1kbits/s dup=0 drop=18 speed=1.01x 
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
I: frame= 72 fps= 24 q=31.0 size= 256kB time=00:00:02.95 bitrate= 709.0kbits/s dup=0 drop=19 speed=0.968x 
I: frame= 72 fps= 21 q=31.0 Lsize= 448kB time=00:00:03.01 bitrate=1215.1kbits/s dup=0 drop=19 speed=0.873x 
I: video:398kB audio:47kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 
I: 0.696200%
I: Start video: 0 : 674967468
I: [aac @ 0xb8c6e400] Qavg: 667.684
I: End Video Query: [-i, iOS_footages_4_1627755471638.mp4, -ss, 00:00:05, -to, 00:00:08, -s, 1280x592, -r, 24, -preset, ultrafast, TilePartTwo_1628829756.mp4]
I: ffmpeg version v4.4-dev-416
I: Copyright (c) 2000-2020 the FFmpeg developers
I: built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
I: configuration: --cross-prefix=i686-linux-android- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=i686 --cpu=i686 --cc=i686-linux-android16-clang --cxx=i686-linux-android16-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-x86/cpu-features/lib -lndk_compat' --target-os=android --disable-neon --disable-asm --disable-inline-asm --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
I: libavutil 56. 55.100 / 56. 55.100
I: libavcodec 58. 96.100 / 58. 96.100
I: libavformat 58. 48.100 / 58. 48.100
I: libavdevice 58. 11.101 / 58. 11.101
I: libavfilter 7. 87.100 / 7. 87.100
I: libswscale 5. 8.100 / 5. 8.100
I: libswresample 3. 8.100 / 3. 8.100
I: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'iOS_footages_4_1627755471638.mp4':
I: Metadata:
I: major_brand : 
I: qt 
I: minor_version : 
I: 0
I: compatible_brands: 
I: qt 
I: creation_time : 
I: 2021-07-31T18:17:18.000000Z
I: com.apple.quicktime.author: 
I: ReplayKitRecording
I: Duration: 
I: 00:03:34.00
I: , start: 
I: 0.000000
I: , bitrate: 
I: 2183 kb/s
I: Stream #0:0
I: (und)
I: : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 37 kb/s
I: (default)
I: Metadata:
I: creation_time : 
I: 2021-07-31T18:17:18.000000Z
I: handler_name : 
I: Core Media Audio
I: Stream #0:1
I: (und)
I: : Video: h264 (avc1 / 0x31637661), yuvj420p(pc, bt709), 592x1280, 2139 kb/s
I: , 
I: 38.89 fps, 
I: 59.94 tbr, 
I: 600 tbn, 
I: 1200 tbc
I: (default)
I: Metadata:
I: rotate : 
I: 270
I: creation_time : 
I: 2021-07-31T18:17:18.000000Z
I: handler_name : 
I: Core Media Video
I: encoder : 
I: H.264
I: Side data:
I: 
I: displaymatrix: rotation of 90.00 degrees
W: Codec AVOption preset (Configuration preset) specified for output file #0 (TilePartTwo_1628829756.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
I: Stream mapping:
I: Stream #0:1 -> #0:0
I: (h264 (native) -> mpeg4 (native))
I: Stream #0:0 -> #0:1
I: (aac (native) -> aac (native))
I: Press [q] to stop, [?] for help
W: [graph 0 input from stream 0:1 @ 0xe2c97860] sws_param option is deprecated and ignored
W: [swscaler @ 0xb5d28a80] deprecated pixel format used, make sure you did set range correctly
I: frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A 
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
I: frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A 
I: Output #0, mp4, to 'TilePartTwo_1628829756.mp4':
I: Metadata:
I: major_brand : 
I: qt 
I: minor_version : 
I: 0
I: compatible_brands: 
I: qt 
I: com.apple.quicktime.author: 
I: ReplayKitRecording
I: encoder : 
I: Lavf58.48.100
I: Stream #0:0
I: (und)
I: : Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 1280x592, q=2-31, 200 kb/s
I: , 
I: 24 fps, 
I: 12288 tbn, 
I: 24 tbc
I: (default)
I: Metadata:
I: encoder : 
I: Lavc58.96.100 mpeg4
I: creation_time : 
I: 2021-07-31T18:17:18.000000Z
I: handler_name : 
I: Core Media Video
I: Side data:
I: 
I: cpb: 
I: bitrate max/min/avg: 0/0/200000 buffer size: 0 
I: vbv_delay: N/A
I: 
I: displaymatrix: rotation of -0.00 degrees
I: Stream #0:1
I: (und)
I: : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
I: (default)
I: Metadata:
I: creation_time : 
I: 2021-07-31T18:17:18.000000Z
I: handler_name : 
I: Core Media Audio
I: encoder : 
I: Lavc58.96.100 aac
I: frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x 
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
I: frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x 
I: frame= 10 fps=4.9 q=18.5 size= 0kB time=00:00:00.37 bitrate= 0.9kbits/s speed=0.183x 
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
I: frame= 31 fps= 12 q=31.0 size= 0kB time=00:00:01.25 bitrate= 0.3kbits/s dup=0 drop=2 speed=0.491x 
I: frame= 52 fps= 17 q=31.0 size= 0kB time=00:00:02.12 bitrate= 0.2kbits/s dup=0 drop=5 speed=0.692x 
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
I: frame= 72 fps= 20 q=31.0 size= 0kB time=00:00:02.95 bitrate= 0.1kbits/s dup=0 drop=7 speed=0.827x 
I: frame= 72 fps= 18 q=31.0 size= 256kB time=00:00:02.95 bitrate= 709.0kbits/s dup=0 drop=7 speed=0.725x 
E: gnssSvStatusCb: a: input svInfo.flags is 8
E: gnssSvStatusCb: b: input svInfo.flags is 8
I: frame= 72 fps= 16 q=31.0 Lsize= 543kB time=00:00:03.01 bitrate=1472.6kbits/s dup=0 drop=7 speed=0.689x 
I: video:493kB audio:47kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 
I: 0.573798%
I: [aac @ 0xc2f20000] Qavg: 669.561
I: Movie paths: [CountImageVideo_1628829749.mp4, TilePartTwo_1628829756.mp4, FootageVideo_1628829747.mp4]
 
 --------- beginning of crash
E: FATAL EXCEPTION: Thread-8
 Process: com.wev.app, PID: 21310
 java.io.IOException: Cannot merge VisualSampleEntry[com.googlecode.mp4parser.boxes.mp4.ESDescriptorBox@ed48a2a8] and VisualSampleEntry[com.googlecode.mp4parser.boxes.mp4.ESDescriptorBox@dc387090]
 at com.googlecode.mp4parser.authoring.tracks.AppendTrack.mergeStsds(AppendTrack.java:116)
 at com.googlecode.mp4parser.authoring.tracks.AppendTrack.<init>(AppendTrack.java:59)
 at Mp4Cutter2.combineClips(Mp4Cutter2.kt:208)
 at com.wev.app.ui.activity.videoplayer.PlayVideoActivity.finalVideoGenerate(PlayVideoActivity.kt:3457)
 at com.wev.app.ui.activity.videoplayer.PlayVideoActivity.endVideoCreate(PlayVideoActivity.kt:3383)
 at com.wev.app.ui.activity.videoplayer.PlayVideoActivity.startVideoCreate(PlayVideoActivity.kt:3298)
 at com.wev.app.ui.activity.videoplayer.PlayVideoActivity.countImageToVideo(PlayVideoActivity.kt:3220)
 at com.wev.app.ui.activity.videoplayer.PlayVideoActivity.imageToVideo(PlayVideoActivity.kt:3158)
 at com.wev.app.ui.activity.videoplayer.PlayVideoActivity$createWev$1$getVideo$imageToVideo$1.run(PlayVideoActivity.kt:3056)
 
</init>


-
FFMPEG overlay by time not working in my case
18 août 2021, par Patel MilanImage Overlay on image and enable by time


ffmpeg -y -loop 1 -i .\1080.png -i .\021.jpg -i .\022.jpg -i .\023.jpg -filter_complex " [1:v]scale=534:810[a]; [2:v]scale=534:810[b]; [3:v]scale=534:810[c]; [0:v][a] overlay=10:8:enable='between(t,0,8)'[o1]; [o1][b] overlay=264:778:enable='between(t,1,8)'[o2]; [o2][c] overlay=534:1524:enable='between(t,2,8)'[o3]" -map "[o3]" -t 8 outImageOverlay.mp4



Log


ffmpeg version 4.3.1-2021-01-01-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
Input #0, png_pipe, from '.\1080.png':
 Duration: N/A, bitrate: N/A
 Stream #0:0: Video: png, rgba(pc), 1080x2340, 25 fps, 25 tbr, 25 tbn, 25 tbc
Input #1, image2, from '.\021.jpg':
 Duration: 00:00:00.04, start: 0.000000, bitrate: 286665 kb/s
 Stream #1:0: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1080x2340, 25 tbr, 25 tbn, 25 tbc
Input #2, image2, from '.\022.jpg':
 Duration: 00:00:00.04, start: 0.000000, bitrate: 337493 kb/s
 Stream #2:0: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1080x2340, 25 tbr, 25 tbn, 25 tbc
Input #3, image2, from '.\023.jpg':
 Duration: 00:00:00.04, start: 0.000000, bitrate: 298403 kb/s
 Stream #3:0: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1080x2340, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 (png) -> overlay:main
 Stream #1:0 (mjpeg) -> scale
 Stream #2:0 (mjpeg) -> scale
 Stream #3:0 (mjpeg) -> scale
 overlay -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[swscaler @ 000001cd0b24d000] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000001cd0b286080] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000001cd0b2c9c40] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 000001cd0a848500] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001cd0a848500] profile High, level 5.0, 4:2:0, 8-bit
[libx264 @ 000001cd0a848500] 264 - core 161 r3027 4121277 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - 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=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 'outImageOverlay.mp4':
 Metadata:
 encoder : Lavf58.45.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1080x2340, q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
 Metadata:
 encoder : Lavc58.91.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 200 fps= 43 q=-1.0 Lsize= 208kB time=00:00:07.88 bitrate= 216.6kbits/s speed= 1.7x
video:205kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.538915%
[libx264 @ 000001cd0a848500] frame I:1 Avg QP:10.61 size: 68492
[libx264 @ 000001cd0a848500] frame P:50 Avg QP:16.79 size: 2508
[libx264 @ 000001cd0a848500] frame B:149 Avg QP:29.02 size: 104
[libx264 @ 000001cd0a848500] consecutive B-frames: 0.5% 0.0% 1.5% 98.0%
[libx264 @ 000001cd0a848500] mb I I16..4: 82.0% 10.1% 7.9%
[libx264 @ 000001cd0a848500] mb P I16..4: 0.0% 0.5% 0.1% P16..4: 1.0% 0.0% 0.1% 0.0% 0.0% skip:98.2%
[libx264 @ 000001cd0a848500] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.3% 0.0% 0.0% direct: 0.0% skip:99.7% L0:39.1% L1:60.9% BI: 0.0%
[libx264 @ 000001cd0a848500] 8x8 transform intra:28.0% inter:98.0%
[libx264 @ 000001cd0a848500] coded y,uvDC,uvAC intra: 35.8% 31.1% 23.2% inter: 0.0% 0.1% 0.0%
[libx264 @ 000001cd0a848500] i16 v,h,dc,p: 98% 1% 0% 1%
[libx264 @ 000001cd0a848500] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 17% 15% 7% 7% 9% 8% 8% 11%
[libx264 @ 000001cd0a848500] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 21% 9% 7% 10% 9% 11% 6% 9%
[libx264 @ 000001cd0a848500] i8c dc,h,v,p: 76% 10% 10% 4%
[libx264 @ 000001cd0a848500] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001cd0a848500] ref P L0: 90.9% 0.7% 7.0% 1.3%
[libx264 @ 000001cd0a848500] ref B L0: 57.1% 42.0% 0.9%
[libx264 @ 000001cd0a848500] ref B L1: 93.2% 6.8%
[libx264 @ 000001cd0a848500] kb/s:209.46



Overlay Video on Image Command


ffmpeg -y -i love.mp4 -i .\1080.png -i .\021.jpg -i .\022.jpg -i .\023.jpg -loop 1 -i .\020.jpg -filter_complex " [2:v]scale=534:810[a]; [3:v]scale=534:810[b]; [4:v]scale=534:810[c]; [5:v]scale=8000:4000,zoompan=z='min(zoom+0.0020,1.5)':d=417:s=1080x2340,setsar=1[d]; [0:v]scale=1080x2340,setdar=1080:2340,colorkey=0x1CD51A:0.3:0.2[ckout]; [1:v][a] overlay=10:8:enable='between(t,0,8)'[o1]; [o1][b] overlay=264:778:enable='between(t,1,8)'[o2]; [o2][c]overlay=534:1524:enable='between(t,2,8)'[o3]; [d][o3]overlay[o4]; [o4][ckout]overlay[o5]" -map "[o5]" -pix_fmt yuvj422p -t 8 outvideoOverlayInImage.mp4



Log


ffmpeg version 4.3.1-2021-01-01-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'love.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 creation_time : 2021-08-17T05:35:07.000000Z
 com.android.version: 11
 Duration: 00:00:06.93, start: 0.000000, bitrate: 538 kb/s
 Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 196 kb/s (default)
 Metadata:
 creation_time : 2021-08-17T05:35:07.000000Z
 handler_name : SoundHandle
 Stream #0:1(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt470bg/smpte170m), 1080x2340, 334 kb/s, SAR 1:1 DAR 6:13, 25 fps, 25 tbr, 90k tbn, 180k tbc (default)
 Metadata:
 creation_time : 2021-08-17T05:35:07.000000Z
 handler_name : VideoHandle
Input #1, png_pipe, from '.\1080.png':
 Duration: N/A, bitrate: N/A
 Stream #1:0: Video: png, rgba(pc), 1080x2340, 25 tbr, 25 tbn, 25 tbc
Input #2, image2, from '.\021.jpg':
 Duration: 00:00:00.04, start: 0.000000, bitrate: 286665 kb/s
 Stream #2:0: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1080x2340, 25 tbr, 25 tbn, 25 tbc
Input #3, image2, from '.\022.jpg':
 Duration: 00:00:00.04, start: 0.000000, bitrate: 337493 kb/s
 Stream #3:0: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1080x2340, 25 tbr, 25 tbn, 25 tbc
Input #4, image2, from '.\023.jpg':
 Duration: 00:00:00.04, start: 0.000000, bitrate: 298403 kb/s
 Stream #4:0: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1080x2340, 25 tbr, 25 tbn, 25 tbc
Input #5, image2, from '.\020.jpg':
 Duration: 00:00:00.04, start: 0.000000, bitrate: 184663 kb/s
 Stream #5:0: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1080x2340, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:1 (h264) -> scale
 Stream #1:0 (png) -> overlay:main
 Stream #2:0 (mjpeg) -> scale
 Stream #3:0 (mjpeg) -> scale
 Stream #4:0 (mjpeg) -> scale
 Stream #5:0 (mjpeg) -> scale
 overlay -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[swscaler @ 00000230595cff40] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0000023059727e80] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 00000230597768c0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 00000230597c3c80] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 00000230597faec0] No accelerated colorspace conversion found from yuv420p to argb.
[swscaler @ 0000023059884cc0] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 00000230536e2900] using SAR=1/1
[libx264 @ 00000230536e2900] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 00000230536e2900] profile High 4:2:2, level 5.0, 4:2:2, 8-bit
[libx264 @ 00000230536e2900] 264 - core 161 r3027 4121277 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - 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=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 'outvideoOverlayInImage.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 com.android.version: 11
 encoder : Lavf58.45.100
 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuvj422p(pc), 1080x2340 [SAR 1:1 DAR 6:13], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)
 Metadata:
 encoder : Lavc58.91.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 200 fps= 11 q=-1.0 Lsize= 1411kB time=00:00:07.88 bitrate=1467.1kbits/s speed=0.435x
video:1408kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.226583%
[libx264 @ 00000230536e2900] frame I:1 Avg QP:20.68 size:121139
[libx264 @ 00000230536e2900] frame P:50 Avg QP:20.09 size: 15622
[libx264 @ 00000230536e2900] frame B:149 Avg QP:24.04 size: 3617
[libx264 @ 00000230536e2900] consecutive B-frames: 0.5% 0.0% 1.5% 98.0%
[libx264 @ 00000230536e2900] mb I I16..4: 8.9% 81.4% 9.7%
[libx264 @ 00000230536e2900] mb P I16..4: 1.5% 1.9% 0.3% P16..4: 21.8% 8.1% 4.7% 0.0% 0.0% skip:61.6%
[libx264 @ 00000230536e2900] mb B I16..4: 0.1% 0.1% 0.0% B16..8: 26.8% 0.7% 0.1% direct: 0.3% skip:72.1% L0:46.3% L1:53.3% BI: 0.3%
[libx264 @ 00000230536e2900] 8x8 transform intra:59.8% inter:84.9%
[libx264 @ 00000230536e2900] coded y,uvDC,uvAC intra: 30.0% 30.8% 13.5% inter: 3.0% 2.2% 0.1%
[libx264 @ 00000230536e2900] i16 v,h,dc,p: 66% 30% 2% 2%
[libx264 @ 00000230536e2900] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 12% 43% 3% 3% 3% 3% 2% 3%
[libx264 @ 00000230536e2900] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 39% 19% 11% 5% 6% 5% 6% 4% 5%
[libx264 @ 00000230536e2900] i8c dc,h,v,p: 57% 19% 21% 3%
[libx264 @ 00000230536e2900] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 00000230536e2900] ref P L0: 73.3% 11.4% 8.9% 6.4%
[libx264 @ 00000230536e2900] ref B L0: 96.2% 3.1% 0.7%
[libx264 @ 00000230536e2900] ref B L1: 95.5% 4.5%
[libx264 @ 00000230536e2900] kb/s:1441.17



Input images and output videos


- 

- 020.jpg
- 021.jpg
- 022.jpg
- 023.jpg
- 1080.png
- outImageOverlay
- outvideoOverlayInImage.mp4
- love.mp4


















image on image overlay is working by enable given time but when video overlay into image is not working correctly


-
Why is the filesize different when swapping audio tracks using ffmeg ?
20 août 2021, par BrianI have a movie that I have encoded using Handbrake on a Mac a long time ago. When I encoded the movie, I put the stereo audio as track 1 and the 5.1 audio as track 2. The starting filesize is 853,320,914 bytes. Below is the data from ffprobe.


ffprobe version 4.2.1-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2007-2019 the FFmpeg developers
 built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
 configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Annabelle - Comes Home (2019).m4v':
 Metadata:
 major_brand : mp42
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 creation_time : 2020-04-06T22:40:36.000000Z
 encoder : HandBrake 1.1.2 2018090500
 Duration: 01:46:04.86, start: 0.000000, bitrate: 1072 kb/s
 Chapter #0:0: start 0.000000, end 476.986000
 Metadata:
 title : Chapter 1
 Chapter #0:1: start 476.986000, end 933.608000
 Metadata:
 title : Chapter 2
 Chapter #0:2: start 933.608000, end 1441.449000
 Metadata:
 title : Chapter 3
 Chapter #0:3: start 1441.449000, end 1976.358000
 Metadata:
 title : Chapter 4
 Chapter #0:4: start 1976.358000, end 2579.753000
 Metadata:
 title : Chapter 5
 Chapter #0:5: start 2579.753000, end 3149.030000
 Metadata:
 title : Chapter 6
 Chapter #0:6: start 3149.030000, end 3726.941000
 Metadata:
 title : Chapter 7
 Chapter #0:7: start 3726.941000, end 3973.520000
 Metadata:
 title : Chapter 8
 Chapter #0:8: start 3973.520000, end 4504.676000
 Metadata:
 title : Chapter 9
 Chapter #0:9: start 4504.676000, end 4904.409000
 Metadata:
 title : Chapter 10
 Chapter #0:10: start 4904.409000, end 5421.592000
 Metadata:
 title : Chapter 11
 Chapter #0:11: start 5421.592000, end 5998.001000
 Metadata:
 title : Chapter 12
 Chapter #0:12: start 5998.001000, end 6364.075000
 Metadata:
 title : Chapter 13
 Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 720x360 [SAR 32:27 DAR 64:27], 519 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 180k tbc (default)
 Metadata:
 creation_time : 2020-04-06T22:40:36.000000Z
 handler_name : VideoHandler
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 162 kb/s (default)
 Metadata:
 creation_time : 2020-04-06T22:40:36.000000Z
 handler_name : Stereo
 Stream #0:2(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s
 Metadata:
 creation_time : 2020-04-06T22:40:36.000000Z
 handler_name : Surround
 Side data:
 audio service type: main
 Stream #0:3(eng): Data: bin_data (text / 0x74786574)
 Metadata:
 creation_time : 2020-04-06T22:40:36.000000Z
 handler_name : SubtitleHandler
Unsupported codec with id 100359 for input stream 3



My goal is to swap the stereo audio track with the 5.1 audio track and make the 5.1 audio track the default without having to reencode. To do this, I used the following command :


ffmpeg -i "Annabelle - Comes Home (2019)/Annabelle - Comes Home (2019)_old.m4v" -map 0:v:0 -map 0:a:1 -map 0:a:0 -disposition:a:0 default -disposition:a:1 none -c copy "Annabelle - Comes Home (2019)/Annabelle - Comes Home (2019).m4v"


Everything works as it should, I think anyways as I didn't get any errors...


ffmpeg version 4.2.1-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers
 built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
 configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Annabelle - Comes Home (2019)/Annabelle - Comes Home (2019)_old.m4v':
 Metadata:
 major_brand : mp42
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 creation_time : 2020-04-06T22:40:36.000000Z
 encoder : HandBrake 1.1.2 2018090500
 Duration: 01:46:04.86, start: 0.000000, bitrate: 1072 kb/s
 Chapter #0:0: start 0.000000, end 476.986000
 Metadata:
 title : Chapter 1
 Chapter #0:1: start 476.986000, end 933.608000
 Metadata:
 title : Chapter 2
 Chapter #0:2: start 933.608000, end 1441.449000
 Metadata:
 title : Chapter 3
 Chapter #0:3: start 1441.449000, end 1976.358000
 Metadata:
 title : Chapter 4
 Chapter #0:4: start 1976.358000, end 2579.753000
 Metadata:
 title : Chapter 5
 Chapter #0:5: start 2579.753000, end 3149.030000
 Metadata:
 title : Chapter 6
 Chapter #0:6: start 3149.030000, end 3726.941000
 Metadata:
 title : Chapter 7
 Chapter #0:7: start 3726.941000, end 3973.520000
 Metadata:
 title : Chapter 8
 Chapter #0:8: start 3973.520000, end 4504.676000
 Metadata:
 title : Chapter 9
 Chapter #0:9: start 4504.676000, end 4904.409000
 Metadata:
 title : Chapter 10
 Chapter #0:10: start 4904.409000, end 5421.592000
 Metadata:
 title : Chapter 11
 Chapter #0:11: start 5421.592000, end 5998.001000
 Metadata:
 title : Chapter 12
 Chapter #0:12: start 5998.001000, end 6364.075000
 Metadata:
 title : Chapter 13
 Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 720x360 [SAR 32:27 DAR 64:27], 519 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 180k tbc (default)
 Metadata:
 creation_time : 2020-04-06T22:40:36.000000Z
 handler_name : VideoHandler
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 162 kb/s (default)
 Metadata:
 creation_time : 2020-04-06T22:40:36.000000Z
 handler_name : Stereo
 Stream #0:2(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s
 Metadata:
 creation_time : 2020-04-06T22:40:36.000000Z
 handler_name : Surround
 Side data:
 audio service type: main
 Stream #0:3(eng): Data: bin_data (text / 0x74786574)
 Metadata:
 creation_time : 2020-04-06T22:40:36.000000Z
 handler_name : SubtitleHandler
[ipod @ 0x7faff0014000] track 1: codec frame size is not set
Output #0, ipod, to 'Annabelle - Comes Home (2019)/Annabelle - Comes Home (2019).m4v':
 Metadata:
 major_brand : mp42
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.29.100
 Chapter #0:0: start 0.000000, end 476.986000
 Metadata:
 title : Chapter 1
 Chapter #0:1: start 476.986000, end 933.608000
 Metadata:
 title : Chapter 2
 Chapter #0:2: start 933.608000, end 1441.449000
 Metadata:
 title : Chapter 3
 Chapter #0:3: start 1441.449000, end 1976.358000
 Metadata:
 title : Chapter 4
 Chapter #0:4: start 1976.358000, end 2579.753000
 Metadata:
 title : Chapter 5
 Chapter #0:5: start 2579.753000, end 3149.030000
 Metadata:
 title : Chapter 6
 Chapter #0:6: start 3149.030000, end 3726.941000
 Metadata:
 title : Chapter 7
 Chapter #0:7: start 3726.941000, end 3973.520000
 Metadata:
 title : Chapter 8
 Chapter #0:8: start 3973.520000, end 4504.676000
 Metadata:
 title : Chapter 9
 Chapter #0:9: start 4504.676000, end 4904.409000
 Metadata:
 title : Chapter 10
 Chapter #0:10: start 4904.409000, end 5421.592000
 Metadata:
 title : Chapter 11
 Chapter #0:11: start 5421.592000, end 5998.001000
 Metadata:
 title : Chapter 12
 Chapter #0:12: start 5998.001000, end 6364.075000
 Metadata:
 title : Chapter 13
 Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 720x360 [SAR 32:27 DAR 64:27], q=2-31, 519 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 90k tbc (default)
 Metadata:
 creation_time : 2020-04-06T22:40:36.000000Z
 handler_name : VideoHandler
 Stream #0:1(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
 Metadata:
 creation_time : 2020-04-06T22:40:36.000000Z
 handler_name : Surround
 Side data:
 audio service type: main
 Stream #0:2(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 162 kb/s
 Metadata:
 creation_time : 2020-04-06T22:40:36.000000Z
 handler_name : Stereo
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:2 -> #0:1 (copy)
 Stream #0:1 -> #0:2 (copy)
Press [q] to stop, [?] for help
frame=152602 fps=12872 q=-1.0 Lsize= 834270kB time=01:46:04.79 bitrate=1073.8kbits/s speed= 537x 
video:403702kB audio:424714kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.706676%



Here is the resulting ffprobe of the new file showing it swapped the audio tracks :


ffprobe version 4.2.1-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2007-2019 the FFmpeg developers
 built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
 configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Annabelle - Comes Home (2019).m4v':
 Metadata:
 major_brand : M4V 
 minor_version : 512
 compatible_brands: isomiso2avc1
 encoder : Lavf58.29.100
 Duration: 01:46:04.86, start: 0.000000, bitrate: 1073 kb/s
 Chapter #0:0: start 0.000000, end 476.986000
 Metadata:
 title : Chapter 1
 Chapter #0:1: start 476.986000, end 933.608000
 Metadata:
 title : Chapter 2
 Chapter #0:2: start 933.608000, end 1441.449000
 Metadata:
 title : Chapter 3
 Chapter #0:3: start 1441.449000, end 1976.358000
 Metadata:
 title : Chapter 4
 Chapter #0:4: start 1976.358000, end 2579.753000
 Metadata:
 title : Chapter 5
 Chapter #0:5: start 2579.753000, end 3149.030000
 Metadata:
 title : Chapter 6
 Chapter #0:6: start 3149.030000, end 3726.941000
 Metadata:
 title : Chapter 7
 Chapter #0:7: start 3726.941000, end 3973.520000
 Metadata:
 title : Chapter 8
 Chapter #0:8: start 3973.520000, end 4504.676000
 Metadata:
 title : Chapter 9
 Chapter #0:9: start 4504.676000, end 4904.409000
 Metadata:
 title : Chapter 10
 Chapter #0:10: start 4904.409000, end 5421.592000
 Metadata:
 title : Chapter 11
 Chapter #0:11: start 5421.592000, end 5998.001000
 Metadata:
 title : Chapter 12
 Chapter #0:12: start 5998.001000, end 6364.075000
 Metadata:
 title : Chapter 13
 Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 720x360 [SAR 32:27 DAR 64:27], 519 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 180k tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
 Metadata:
 handler_name : Surround
 Side data:
 audio service type: main
 Stream #0:2(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 162 kb/s
 Metadata:
 handler_name : Stereo
 Stream #0:3(eng): Data: bin_data (text / 0x74786574)
 Metadata:
 handler_name : SubtitleHandler
Unsupported codec with id 100359 for input stream 3



What I don't understand is why is the file size different ? The resulting file is larger at 854,292,790 bytes. Shouldn't the file sizes be the same since I literally just swapped tracks 0 and 1 ?