Earn 10,000 ($100.00)
Rust Combination Code (FFMPEG.rs and WEBRTC.rs)
Bounty Description
Problem Description
I have a piece of rust code that is quite simple - it grabs frames from an RTP source and forwards them to a WebRTC.rs server. I use the following ffmpeg command to start the RTP server:
ffmpeg -video_size 1920x1080 -offset_x 1920 -offset_y 0 -framerate 30 -f gdigrab -i desktop -c:v libx264rgb -crf 0 -preset ultrafast -color_range 2 -an -f rtp rtp://10.0.0.2:6005 -sdp_file saved_sdp_file
However, I recently found out about FFMPEG.rs. It's much faster than starting an RTP server and fetching frames from another program. Hence, I would like the current program to use FFMPEG.rs instead of pulling frames from an RTP server.
Acceptance Criteria
I should be able to provide the video size, offset x, offset y, and framerate, as like the command above. Then the rust code will use FFMPEG.rs to create a WebRTC stream of the desktop. The current RTP -> WebRTC server implementation is from the WebRTC.rs docs: https://github.com/webrtc-rs/webrtc/blob/master/examples/examples/rtp-to-webrtc/rtp-to-webrtc.rs.