[FFmpeg-user] Creat mosaic without loose quality
Marco De Angelis
marcod71 at yahoo.com
Sun Nov 26 09:51:23 EET 2017
Hi, thanks for yor help. Now the final video has the desired fps (60).
I'm analyzing the video using Quicktime since it is easy to move frame by frame using arrow keys, but sometime it take lot of time moving backward and forward and it stop.
I've tryed to change CRF from 0 to 18, but or the quality is very low (18) or it continue to stop during play.
Are there any setting to speed up playing?
Best Regards
----- COMMAND LINE
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=s=hd1080:r=60 [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" -pix_fmt yuv420p -crf 10 -r 60 C:\S7\FTP_video\output_10.mp4
----- OUTPUT
C:\S7\comandi>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=s=hd1080:r=60 [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" -pix_fmt yuv420p -crf 10 -r 60 C:\S7\FTP_video\output_10.mp4ffmpeg 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.26, start: 0.000000, bitrate: 28231 kb/s Stream #3: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 #3: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 : SoundHandleStream 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 @ 000001df09e10300] using SAR=1/1[libx264 @ 000001df09e10300] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2[libx264 @ 000001df09e10300] profile High, level 4.2[libx264 @ 000001df09e10300] 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=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=10.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00Output #0, mp4, to 'C:\S7\FTP_video\output_10.mp4':014: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, 60 fps, 15360 tbn, 60 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= 186 fps=5.0 q=-1.0 Lsize= 11785kB time=00:00:03.13 bitrate=30758.3kbits/s speed=0.0845xvideo:11728kB audio:51kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.052811%[libx264 @ 000001df09e10300] frame I:1 Avg QP:12.20 size:391715[libx264 @ 000001df09e10300] frame P:47 Avg QP:12.24 size:166353[libx264 @ 000001df09e10300] frame B:138 Avg QP:17.14 size: 27527[libx264 @ 000001df09e10300] consecutive B-frames: 1.1% 0.0% 0.0% 98.9%[libx264 @ 000001df09e10300] mb I I16..4: 8.9% 33.7% 57.5%[libx264 @ 000001df09e10300] mb P I16..4: 2.1% 4.4% 2.4% P16..4: 33.1% 28.6% 25.5% 0.0% 0.0% skip: 3.8%[libx264 @ 000001df09e10300] mb B I16..4: 0.1% 0.2% 0.2% B16..8: 31.9% 8.3% 3.5% direct:14.3% skip:41.4% L0:42.3% L1:44.1% BI:13.6%[libx264 @ 000001df09e10300] 8x8 transform intra:46.1% inter:34.6%[libx264 @ 000001df09e10300] coded y,uvDC,uvAC intra: 69.7% 96.4% 92.6% inter: 32.8% 29.3% 10.4%[libx264 @ 000001df09e10300] i16 v,h,dc,p: 42% 30% 17% 11%[libx264 @ 000001df09e10300] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 36% 26% 3% 2% 3% 4% 3% 6%[libx264 @ 000001df09e10300] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 37% 15% 3% 4% 4% 6% 3% 5%[libx264 @ 000001df09e10300] i8c dc,h,v,p: 45% 36% 14% 4%[libx264 @ 000001df09e10300] Weighted P-Frames: Y:0.0% UV:0.0%[libx264 @ 000001df09e10300] ref P L0: 49.3% 8.3% 32.7% 9.6%[libx264 @ 000001df09e10300] ref B L0: 82.6% 13.6% 3.9%[libx264 @ 000001df09e10300] ref B L1: 97.3% 2.7%[libx264 @ 000001df09e10300] kb/s:30991.07[aac @ 000001df09e10740] Qavg: 1909.973
On Thursday, November 23, 2017, 1:24:27 PM GMT+1, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
2017-11-23 12:52 GMT+01:00 Marco De Angelis <marcod71-at-yahoo.com at ffmpeg.org>:
> 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
This is your original source, the other videos are overlayed on top of it.
You can specify a frame-rate for the original source, in your case either
nullsrc=s=hd1080:r=60 or nullsrc=s=hd1080:r=60001/1001, your
input videos have different frame rates afaict.
It may be easier to use the vstack and hstack filters instead of
overlay.
Please do not top-post here, Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list