FFmpeg commands in python program (or shell script or whatever you want to use)
Budget: $30 – $250 USD
We want ffmpeg on ubuntu server to do the following:
Take video from usb camera and audio from mic attached to another usb port and combine/encode that into a audio-video stream to send it across to 2 rtmp servers (no overlays etc).
Server 1 should get the stream without any added delay
Server 2 should get the same stream with an added delay of X seconds. You can use tpad in ffmpeg to create the delay or you can use any other method. So the server 2 will receive X seconds of black video with silence before receiving the actual video stream (in order to implement the delay).
The above ffmpeg command should be implemented in a python program (or shell script or whatever you want to use) so that you can send get and post requests to api endpoints as mentioned below:
The rtmp server details and the delay (in seconds) for server 2 should be obtained by calling a rest api endpoint (get request) which will give these details in json format.
The get request should be sent before starting the above ffmpeg streams.
IN CASE OF ERRORS:
If there is any error then both server streams should stop. Under no circumstances should one server get the stream while the other server does not get the stream. Either both servers should get the stream or both servers should not get the stream in case of any error.
In case of error you must send the error via a post request to another rest api endpoint. The url of that endpoint will also be obtained when you send the earlier get request that you called before starting the streaming.
Take video from usb camera and audio from mic attached to another usb port and combine/encode that into a audio-video stream to send it across to 2 rtmp servers (no overlays etc).
Server 1 should get the stream without any added delay
Server 2 should get the same stream with an added delay of X seconds. You can use tpad in ffmpeg to create the delay or you can use any other method. So the server 2 will receive X seconds of black video with silence before receiving the actual video stream (in order to implement the delay).
The above ffmpeg command should be implemented in a python program (or shell script or whatever you want to use) so that you can send get and post requests to api endpoints as mentioned below:
The rtmp server details and the delay (in seconds) for server 2 should be obtained by calling a rest api endpoint (get request) which will give these details in json format.
The get request should be sent before starting the above ffmpeg streams.
IN CASE OF ERRORS:
If there is any error then both server streams should stop. Under no circumstances should one server get the stream while the other server does not get the stream. Either both servers should get the stream or both servers should not get the stream in case of any error.
In case of error you must send the error via a post request to another rest api endpoint. The url of that endpoint will also be obtained when you send the earlier get request that you called before starting the streaming.