[FFmpeg-user] Creat mosaic without loose quality

Marco De Angelis marcod71 at yahoo.com
Thu Nov 23 13:52:45 EET 2017


This is the command
C:\S7\ffmpeg\bin\ffmpeg -i C:\S7\FTP_video\1.mp4 -i C:\S7\FTP_video\2.mp4 -i C:\S7\FTP_video\3.mp4 -i C:\S7\FTP_video\4.mp4 -filter_complex "nullsrc=size=1920x1080 [base]; [0:v] setpts=PTS-STARTPTS, scale=960x540 [upperleft]; [1:v] setpts=PTS-STARTPTS, scale=960x540 [upperright]; [2:v] setpts=PTS-STARTPTS, scale=960x540 [lowerleft]; [3:v] setpts=PTS-STARTPTS, scale=960x540 [lowerright]; [base][upperleft] overlay=shortest=1 [tmp1]; [tmp1][upperright] overlay=shortest=1:x=960 [tmp2]; [tmp2][lowerleft] overlay=shortest=1:y=540 [tmp3]; [tmp3][lowerright] overlay=shortest=1:x=960:y=540" -c:v libx264 -crf 0 C:\S7\FTP_video\output.mp4



This is the output

ffmpeg version N-89041-g91a565e20f Copyright (c) 2000-2017 the FFmpeg developers  built with gcc 7.2.0 (GCC)  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx  libavutil      56.  0.100 / 56.  0.100  libavcodec     58.  3.101 / 58.  3.101  libavformat    58.  2.100 / 58.  2.100  libavdevice    58.  0.100 / 58.  0.100  libavfilter     7.  0.101 /  7.  0.101  libswscale      5.  0.101 /  5.  0.101  libswresample   3.  0.101 /  3.  0.101  libpostproc    55.  0.100 / 55.  0.100Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\S7\FTP_video\1.mp4':  Metadata:    major_brand     : mp42    minor_version   : 0    compatible_brands: isommp42    creation_time   : 2017-11-20T17:31:56.000000Z    com.android.version: 7.0  Duration: 00:00:03.14, start: 0.000000, bitrate: 28442 kb/s    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 28357 kb/s, SAR 1:1 DAR 16:9, 60.02 fps, 60 tbr, 90k tbn, 180k tbc (default)    Metadata:      creation_time   : 2017-11-20T17:31:56.000000Z      handler_name    : VideoHandle    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 255 kb/s (default)    Metadata:      creation_time   : 2017-11-20T17:31:56.000000Z      handler_name    : SoundHandleInput #1, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\S7\FTP_video\2.mp4':  Metadata:    major_brand     : mp42    minor_version   : 0    compatible_brands: isommp42    creation_time   : 2017-11-20T17:31:56.000000Z    com.android.version: 7.0  Duration: 00:00:03.26, start: 0.000000, bitrate: 28341 kb/s    Stream #1:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 28200 kb/s, SAR 1:1 DAR 16:9, 60.01 fps, 60 tbr, 90k tbn, 180k tbc (default)    Metadata:      creation_time   : 2017-11-20T17:31:56.000000Z      handler_name    : VideoHandle    Stream #1:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)    Metadata:      creation_time   : 2017-11-20T17:31:56.000000Z      handler_name    : SoundHandleInput #2, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\S7\FTP_video\3.mp4':  Metadata:    major_brand     : mp42    minor_version   : 0    compatible_brands: isommp42    creation_time   : 2017-11-20T17:31:56.000000Z    com.android.version: 7.0  Duration: 00:00:03.26, start: 0.000000, bitrate: 28231 kb/s    Stream #2:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 28232 kb/s, SAR 1:1 DAR 16:9, 60.01 fps, 60 tbr, 90k tbn, 180k tbc (default)    Metadata:      creation_time   : 2017-11-20T17:31:56.000000Z      handler_name    : VideoHandle    Stream #2:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 255 kb/s (default)    Metadata:      creation_time   : 2017-11-20T17:31:56.000000Z      handler_name    : SoundHandleInput #3, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\S7\FTP_video\4.mp4':  Metadata:    major_brand     : mp42    minor_version   : 0    compatible_brands: isommp42    creation_time   : 2017-11-20T17:31:56.000000Z    com.android.version: 7.0  Duration: 00:00:03.20, start: 0.000000, bitrate: 28081 kb/s    Stream #3:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 28012 kb/s, SAR 1:1 DAR 16:9, 59.80 fps, 59.94 tbr, 90k tbn, 180k tbc (default)    Metadata:      creation_time   : 2017-11-20T17:31:56.000000Z      handler_name    : VideoHandle    Stream #3:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)    Metadata:      creation_time   : 2017-11-20T17:31:56.000000Z      handler_name    : SoundHandleFile 'C:\S7\FTP_video\output.mp4' already exists. Overwrite ? [y/N] yStream mapping:  Stream #0:0 (h264) -> setpts (graph 0)  Stream #1:0 (h264) -> setpts (graph 0)  Stream #2:0 (h264) -> setpts (graph 0)  Stream #3:0 (h264) -> setpts (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 @ 0000014723dc1840] using SAR=1/1[libx264 @ 0000014723dc1840] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2[libx264 @ 0000014723dc1840] profile High 4:4:4 Predictive, level 4.0, 4:2:0 8-bit[libx264 @ 0000014723dc1840] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=0 mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc=cqp mbtree=0 qp=0Output #0, mp4, to 'C:\S7\FTP_video\output.mp4':577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A  Metadata:    major_brand     : mp42    minor_version   : 0    compatible_brands: isommp42    com.android.version: 7.0    encoder         : Lavf58.2.100    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 12800 tbn, 25 tbc (default)    Metadata:      encoder         : Lavc58.3.101 libx264    Side data:      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)    Metadata:      creation_time   : 2017-11-20T17:31:56.000000Z      handler_name    : SoundHandle      encoder         : Lavc58.3.101 aacframe=   78 fps=4.8 q=-1.0 Lsize=   38555kB time=00:00:03.13 bitrate=100622.3kbits/s speed=0.193xvideo:38501kB audio:51kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.007967%[libx264 @ 0000014723dc1840] frame I:1     Avg QP: 0.00  size:596503[libx264 @ 0000014723dc1840] frame P:77    Avg QP: 0.00  size:504254[libx264 @ 0000014723dc1840] mb I  I16..4: 56.7%  0.0% 43.3%[libx264 @ 0000014723dc1840] mb P  I16..4: 32.9%  0.0%  5.9%  P16..4: 34.8% 10.4% 14.3%  0.0%  0.0%    skip: 1.7%[libx264 @ 0000014723dc1840] 8x8 transform intra:0.0% inter:33.2%[libx264 @ 0000014723dc1840] coded y,uvDC,uvAC intra: 98.9% 79.2% 79.1% inter: 88.2% 72.8% 72.1%[libx264 @ 0000014723dc1840] i16 v,h,dc,p: 54% 33% 13%  1%[libx264 @ 0000014723dc1840] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 55%  7%  1%  2%  1%  2%  1%  1%[libx264 @ 0000014723dc1840] i8c dc,h,v,p: 21% 50% 28%  0%[libx264 @ 0000014723dc1840] Weighted P-Frames: Y:0.0% UV:0.0%[libx264 @ 0000014723dc1840] ref P L0: 81.1%  6.9%  8.5%  3.5%[libx264 @ 0000014723dc1840] kb/s:101087.27[aac @ 0000014723dbfa20] Qavg: 1909.973


More information about the ffmpeg-user mailing list