Using RAW FFMPEG, instead of Jibri. Any handy script?

hi,

What we are planning to achieve
We want to use FFMPEG command to broadcast the webrtc to RTMP endpoint of AWS media live. We are thinking this will give us more control on the broadcast (example, i read that FFMPEG can do simulcast; mixing etc)

So, I will be greatful if anybody of you can share a working script where FFMPEG; loads our UI on the FFMPEG and broadcasts the layout to custom RTMP url. This will save me a lot of time also.

What I had done? so far
On my MAC, the FFMPEG is not recording the screen capture.

ffmpeg -f avfoundation -i "1:0" screen-rec.mkv

1 → index corresponds to Screen capture (in above command)

So, on Debian 10 buster, AWS EC2, we installed VLC server, got the remote desktop working. Started Youtube using Firefox. Now, over shell we ran the FFMPEG command (via ssh client connected from mac) The resultant m4v file doesnt have audio / video recorded (please remember that on this machine Jibri runs fine; does recording or transmission to RTMP url)

ffmpeg -video_size 1024x768 -framerate 25 -f x11grab -i :0.0+100,200 -f alsa -ac 2 -i hw:0 output-2.mkv

Am I missing something … this is exactly what jibri does…

I don’t think this is correct …

You are using the wrong devices I guess … if you have jibri running and recording you can see from the process list which devices it uses and check the .asoundrc file that it installs.