This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -f x11grab -video_size 1920x1080 -framerate 30 -i :0.0+1920,0 \ | |
-f v4l2 -video_size 640x360 -framerate 30 -i /dev/video0 \ | |
-f alsa -ac 2 -i pulse -filter_complex \ | |
"[0:v]setpts=PTS-STARTPTS[bg]; \ | |
[1:v]setpts=PTS-STARTPTS[fg]; \ | |
[bg][fg]overlay=W-w-10:10,format=yuv420p[out]" \ | |
-map "[out]" -map 2:a -vcodec libx264 -preset veryfast \ | |
-maxrate 6000k -bufsize 12000k -acodec libmp3lame -ar 44100 -b:a 128k \ | |
-g 60 \ | |
-f flv rtmp://a.rtmp.youtube.com/live2/{YOUTUBE_KEY} |