Python FFMPEG Command for Stream Overlay

Job ID: 38804885

Budget: $30 – $250 AUD

I need a well-structured Python FFMPEG command capable of overlaying a secondary stream onto a primary one. The secondary stream, representing a scoreboard, needs to be positioned in the top left corner of the main stream. This command should be able to send the combined stream to RTMP endpoints such as Facebook.

Key Requirements:
- The command should accept two live RTMP streams. One as the main stream and the other as the scoreboard.
- The secondary stream should be small, for example, 420x270, and overlaid in the top left corner.
- The primary & secondary stream is in landscape orientation.
- Both audio streams need to be blended together, with an emphasis on the main stream audio.
- I need the command to be able to utilize both GPU and CPU. If this requires separate commands, please accommodate that.
- The code needs to be runnable in Python.

Skills and Experience:
- Extensive experience with FFMPEG and Python.
- Knowledge of live streaming protocols, particularly RTMP.
- Familiarity with audio mixing techniques.
- Experience with GPU programming, specifically with NVIDIA GPUs.

Please note that I use this URL for testing: https://stream-akamai.castr.com/5b9352dbda7b8c769937e459/live_2361c920455111ea85db6911fe397b9e/index.fmp4.m3u8
I have included a example image
Related categories: Python Video Streaming