ffmpeg -y -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0+0,0 -f pulse -i default -f v4l2 -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 @ 0x55d584536480] Stream #0: not enough frames to estimate rate; consider increasing probesize Input #0, x11grab, from ':0.0+0,0': Duration: N/A, start: 1580248866.645909, 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: 1580248866.821895, bitrate: 1536 kb/s Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Input #2, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 108690.846475, 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 @ 0x55d584578080] using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX XOP FMA4 [libx264 @ 0x55d584578080] profile High 4:4:4 Predictive, level 4.0, 4:4:4, 8-bit [libx264 @ 0x55d584578080] 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 @ 0x55d584540f40] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) [libx264 @ 0x55d58457b400] using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX XOP FMA4 [libx264 @ 0x55d58457b400] profile High 4:2:2, level 4.0, 4:2:2, 8-bit [libx264 @ 0x55d58457b400] 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 [video4linux2,v4l2 @ 0x55d584572440] 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=14 speed=0.175x [x11grab @ 0x55d584536480] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8) frame= 15 fps= 15 q=13.0 q=24.0 size= 264kB time=00:00:01.76 bitrate=1225.1kbits/s dup=0 drop=16 speed=1.76x frame= 15 fps=9.9 q=13.0 q=24.0 size= 264kB time=00:00:01.76 bitrate=1225.1kbits/s dup=0 drop=16 speed=1.17x frame= 15 fps=7.4 q=13.0 q=24.0 size= 264kB time=00:00:01.76 bitrate=1225.1kbits/s dup=0 drop=16 speed=0.877x frame= 21 fps=8.3 q=13.0 q=24.0 size= 264kB time=00:00:02.11 bitrate=1022.2kbits/s dup=0 drop=20 speed=0.841x frame= 33 fps= 11 q=13.0 q=24.0 size= 5432kB time=00:00:02.46 bitrate=18030.3kbits/s dup=0 drop=26 speed=0.817x frame= 34 fps=9.7 q=13.0 q=23.0 size= 5432kB time=00:00:04.10 bitrate=10850.7kbits/s dup=0 drop=26 speed=1.16x frame= 34 fps=8.5 q=13.0 q=23.0 size= 5432kB time=00:00:04.10 bitrate=10850.7kbits/s dup=0 drop=26 speed=1.02x frame= 34 fps=8.1 q=-1.0 Lq=-1.0 size= 8950kB time=00:00:04.53 bitrate=16170.9kbits/s dup=0 drop=26 speed=1.08x video:8897kB audio:45kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 0.088394% [libx264 @ 0x55d584578080] frame I:1 Avg QP:20.00 size:264978 [libx264 @ 0x55d584578080] frame P:33 Avg QP:12.88 size: 6794 [libx264 @ 0x55d584578080] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0x55d584578080] mb P I16..4: 0.5% 0.0% 0.0% P16..4: 5.3% 0.0% 0.0% 0.0% 0.0% skip:94.1% [libx264 @ 0x55d584578080] coded y,u,v intra: 24.8% 1.5% 1.3% inter: 2.9% 0.2% 0.2% [libx264 @ 0x55d584578080] i16 v,h,dc,p: 71% 23% 3% 2% [libx264 @ 0x55d584578080] kb/s:856.94 [libx264 @ 0x55d58457b400] frame I:1 Avg QP:20.00 size:232984 [libx264 @ 0x55d58457b400] frame P:97 Avg QP:23.79 size: 86471 [libx264 @ 0x55d58457b400] mb I I16..4: 100.0% 0.0% 0.0% [libx264 @ 0x55d58457b400] mb P I16..4: 36.6% 0.0% 0.0% P16..4: 63.2% 0.0% 0.0% 0.0% 0.0% skip: 0.2% [libx264 @ 0x55d58457b400] coded y,uvDC,uvAC intra: 12.3% 99.5% 86.7% inter: 25.3% 99.1% 62.8% [libx264 @ 0x55d58457b400] i16 v,h,dc,p: 25% 33% 24% 19% [libx264 @ 0x55d58457b400] i8c dc,h,v,p: 47% 14% 22% 17% [libx264 @ 0x55d58457b400] kb/s:16958.61 Exiting normally, received signal 2.