[FFmpeg-user] change inputs or mapping while recording

Stephan Monecke stephanmonecke at gmail.com
Mon Apr 27 21:49:59 EEST 2020


That looks really interesting! Thanks a lot, I'll have a look at it!

Besides daily checking, I managed to overlook ALL the replies ... sorry for my late answer and thanks a lot for yours!

OBS is not an option since everything is done automatically / from command-line (and afaik OBS transcodes what would additionally overburden the small machine).

It needs to be light and reliable.

For now, I came up with the nginx rtmp plugin that, used as a local loopback device, now acts as a multiplexer.

Two mutually exclusive systemd services forward the respective rtsp stream to the nginx server and ffmpeg records from it.

That way, by starting one or the other service, I switch the stream.

The starting of the two services is bound to the two corresponding arrow keys of a simple Logitech R400 presenter via xbindkeys (the remaining two keys toggle a recording and a YouTube live-stream).
They are present in abundance at the institute and the setup is practically free of cpu usage even on this weak machine.

That way, the lecturer can switch between blackboards / cameras and fully control the procedure just via the presenter. 
Best regards,
Stephan Monecke
-- 
Sent from my mobile device. Please excuse my brevity.

Am 24. April 2020 21:56:12 MESZ schrieb Edward Park <kumowoon1025 at gmail.com>:
>Hi,
>
>> How can this be done with FFmpeg? Do you have an example? I know how
>commands / sendcmd works. The opacity could be toggled, or the
>streamselect filter could be used. But where does the switching signal
>come from, while FFmpeg is running?
>
>
>The specific messaging protocol/method would depend on a variety of
>factors including personal preference, but to parrot an example given
>in the manual using zmq, 
>
>% ffmpeg -i INPUT -filter_complex
>'null[main];movie=INPUT2,zmq,lumakey at toggle=tolerance=1,[main]overlay,realtime'
>OUTPUT
>
>and sending commands to the named lumakey filter would mimic toggling
>between the two streams if they were the same size and position. 
>i.e. using the zmqsend example program,
>
>% zmqsend <<<"lumakey at toggle tolerance 0"
>
>Regards,
>Ted Park
>
>_______________________________________________
>ffmpeg-user mailing list
>ffmpeg-user at ffmpeg.org
>https://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