ffmpeg -y -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0+0,0 -f pulse -i default -f v4l2 -timestamps abs -input_format mjpeg -framerate 30 -video_size 1920x1080 -i /dev/video0 -map 0 -map 1 -map 2 -preset ultrafast output.mkv ffmpeg version n4.2.2 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 9.2.0 (GCC) configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3 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 [x11grab @ 0x5614629d7440] Stream #0: not enough frames to estimate rate; consider increasing probesize Input #0, x11grab, from ':0.0+0,0': Duration: N/A, start: 1580251498.050920, bitrate: N/A Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 30 fps, 1000k tbr, 1000k tbn, 1000k tbc Guessed Channel Layout for Input Stream #1.0 : stereo Input #1, pulse, from 'default': Duration: N/A, start: 1580251498.225094, bitrate: 1536 kb/s Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s [video4linux2,v4l2 @ 0x561462a13200] Detected monotonic timestamps, converting Input #2, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 1580251499.793198, bitrate: N/A Stream #2:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 1920x1080, 30 fps, 30 tbr, 1000k tbn, 1000k tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Stream #1:0 -> #0:1 (pcm_s16le (native) -> vorbis (libvorbis)) Stream #2:0 -> #0:2 (mjpeg (native) -> h264 (libx264)) Press [q] to stop, [?] for help [libx264 @ 0x561462a19400] using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX XOP FMA4 [libx264 @ 0x561462a19400] profile High 4:4:4 Predictive, level 4.0, 4:4:4, 8-bit [libx264 @ 0x561462a19400] 264 - core 159 r2991 1771b55 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=6 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0 [pulse @ 0x5614629e1f80] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) [libx264 @ 0x561462a1d580] using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX XOP FMA4 [libx264 @ 0x561462a1d580] profile High 4:2:2, level 4.0, 4:2:2, 8-bit [libx264 @ 0x561462a1d580] 264 - core 159 r2991 1771b55 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0 Output #0, matroska, to 'output.mkv': Metadata: encoder : Lavf58.29.100 Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv444p(progressive), 1920x1080, q=-1--1, 30 fps, 1k tbn, 30 tbc Metadata: encoder : Lavc58.54.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 Stream #0:1: Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 48000 Hz, stereo, fltp Metadata: encoder : Lavc58.54.100 libvorbis Stream #0:2: Video: h264 (libx264) (H264 / 0x34363248), yuvj422p(pc), 1920x1080, q=-1--1, 30 fps, 1k tbn, 30 tbc Metadata: encoder : Lavc58.54.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 [x11grab @ 0x5614629d7440] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) [video4linux2,v4l2 @ 0x561462a13200] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) frame= 14 fps=0.0 q=13.0 q=0.0 size= 5kB time=00:00:00.08 bitrate= 466.8kbits/s dup=0 drop=19 speed=0.172x frame= 15 fps= 15 q=13.0 q=24.0 size= 298kB time=00:00:01.76 bitrate=1380.7kbits/s dup=0 drop=21 speed=1.74x frame= 15 fps=9.9 q=13.0 q=23.0 size= 298kB time=00:00:01.76 bitrate=1380.7kbits/s dup=0 drop=21 speed=1.16x frame= 15 fps=7.4 q=13.0 q=24.0 size= 298kB time=00:00:01.76 bitrate=1380.7kbits/s dup=0 drop=21 speed=0.873x frame= 21 fps=8.3 q=13.0 q=23.0 size= 298kB time=00:00:02.00 bitrate=1219.9kbits/s dup=0 drop=25 speed=0.79x frame= 32 fps= 11 q=13.0 q=23.0 size= 5455kB time=00:00:02.50 bitrate=17867.9kbits/s dup=0 drop=30 speed=0.823x frame= 34 fps=9.6 q=13.0 q=24.0 size= 5455kB time=00:00:04.10 bitrate=10896.8kbits/s dup=0 drop=31 speed=1.16x frame= 34 fps=8.4 q=13.0 q=24.0 size= 5455kB time=00:00:04.10 bitrate=10896.8kbits/s dup=0 drop=31 speed=1.01x frame= 34 fps=7.5 q=13.0 q=23.0 size= 5455kB time=00:00:04.16 bitrate=10742.2kbits/s dup=0 drop=31 speed=0.914x frame= 46 fps=9.1 q=12.0 q=24.0 size= 5455kB time=00:00:04.50 bitrate=9928.4kbits/s dup=0 drop=34 speed=0.891x frame= 55 fps=9.9 q=13.0 q=24.0 size= 10578kB time=00:00:06.40 bitrate=13538.2kbits/s dup=0 drop=37 speed=1.15x frame= 55 fps=9.1 q=13.0 q=24.0 size= 10578kB time=00:00:06.40 bitrate=13538.2kbits/s dup=0 drop=37 speed=1.06x frame= 55 fps=8.4 q=13.0 q=24.0 size= 10578kB time=00:00:06.40 bitrate=13538.2kbits/s dup=0 drop=37 speed=0.976x frame= 57 fps=8.1 q=13.0 q=24.0 size= 10578kB time=00:00:06.53 bitrate=13262.6kbits/s dup=0 drop=37 speed=0.925x frame= 71 fps=9.4 q=14.0 q=23.0 size= 10578kB time=00:00:07.03 bitrate=12319.8kbits/s dup=0 drop=38 speed=0.929x frame= 77 fps=9.5 q=13.0 q=23.0 size= 15739kB time=00:00:08.70 bitrate=14818.5kbits/s dup=0 drop=38 speed=1.08x frame= 77 fps=9.0 q=13.0 q=23.0 size= 15739kB time=00:00:08.70 bitrate=14818.5kbits/s dup=0 drop=38 speed=1.01x frame= 77 fps=8.5 q=13.0 q=23.0 size= 15739kB time=00:00:08.70 bitrate=14818.5kbits/s dup=0 drop=38 speed=0.958x frame= 83 fps=8.7 q=13.0 q=23.0 size= 15739kB time=00:00:09.03 bitrate=14272.3kbits/s dup=0 drop=38 speed=0.942x frame= 98 fps=9.7 q=13.0 q=23.0 size= 15739kB time=00:00:09.54 bitrate=13508.2kbits/s dup=0 drop=38 speed=0.946x frame= 100 fps=9.4 q=13.0 q=24.0 size= 20913kB time=00:00:11.00 bitrate=15572.8kbits/s dup=0 drop=39 speed=1.04x frame= 100 fps=9.0 q=13.0 q=23.0 size= 22194kB time=00:00:11.00 bitrate=16527.1kbits/s dup=0 drop=39 speed=0.991x frame= 101 fps=8.7 q=13.0 q=23.0 size= 22194kB time=00:00:11.20 bitrate=16232.0kbits/s dup=0 drop=39 speed=0.965x frame= 112 fps=9.3 q=10.0 q=23.0 size= 22194kB time=00:00:11.69 bitrate=15546.3kbits/s dup=0 drop=39 speed=0.966x frame= 123 fps=9.8 q=13.0 q=24.0 size= 22194kB time=00:00:13.33 bitrate=13635.4kbits/s dup=0 drop=39 speed=1.06x frame= 123 fps=9.4 q=13.0 q=24.0 size= 22194kB time=00:00:13.33 bitrate=13635.4kbits/s dup=0 drop=39 speed=1.02x frame= 123 fps=9.0 q=13.0 q=24.0 size= 27386kB time=00:00:13.33 bitrate=16824.9kbits/s dup=0 drop=39 speed=0.978x frame= 127 fps=9.0 q=13.0 q=24.0 size= 27386kB time=00:00:13.68 bitrate=16388.5kbits/s dup=0 drop=40 speed=0.969x frame= 140 fps=9.6 q=13.0 q=24.0 size= 27386kB time=00:00:14.13 bitrate=15872.6kbits/s dup=0 drop=40 speed=0.966x frame= 144 fps=9.6 q=-1.0 Lq=-1.0 size= 31365kB time=00:00:16.20 bitrate=15859.5kbits/s dup=0 drop=40 speed=1.08x video:31174kB audio:175kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 0.049973% [libx264 @ 0x561462a19400] frame I:1 Avg QP:20.00 size:299369 [libx264 @ 0x561462a19400] frame P:143 Avg QP:12.80 size: 2854 [libx264 @ 0x561462a19400] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0x561462a19400] mb P I16..4: 0.3% 0.0% 0.0% P16..4: 2.4% 0.0% 0.0% 0.0% 0.0% skip:97.2% [libx264 @ 0x561462a19400] coded y,u,v intra: 24.1% 2.5% 2.6% inter: 1.2% 0.2% 0.2% [libx264 @ 0x561462a19400] i16 v,h,dc,p: 65% 30% 3% 3% [libx264 @ 0x561462a19400] kb/s:348.64 [libx264 @ 0x561462a1d580] frame I:2 Avg QP:20.50 size:224612 [libx264 @ 0x561462a1d580] frame P:354 Avg QP:23.82 size: 86904 [libx264 @ 0x561462a1d580] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0x561462a1d580] mb P I16..4: 34.4% 0.0% 0.0% P16..4: 65.2% 0.0% 0.0% 0.0% 0.0% skip: 0.4% [libx264 @ 0x561462a1d580] coded y,uvDC,uvAC intra: 11.5% 99.3% 86.4% inter: 25.5% 98.7% 62.6% [libx264 @ 0x561462a1d580] i16 v,h,dc,p: 25% 31% 26% 18% [libx264 @ 0x561462a1d580] i8c dc,h,v,p: 47% 13% 23% 17% [libx264 @ 0x561462a1d580] kb/s:16872.01 Exiting normally, received signal 2.