cloudflare / cloudflare/moq-rs

dev/pub_multi: Pre-transrate multi-rendition tracks (ffmpeg script)

Open
#35 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
166
Forks
59
Avg merge
18h 21m
Merged PRs (30d)
22

Description

While working through setting up a live demo site for moq-rs and moq-js today I realized something that's not really surprising, but would be nice to fix. It turns out that ffmpeg can require a fair bit of CPU to produce 3 different renditions with burned-in text in realtime. On my laptop it's hardly noticeable, but on a tiny virtual machine in the cloud without the benefit of hardware acceleration, it's overwhelming. Since I'd like to continue running demos of track switching between multiple renditions, I think it would be a good idea to at least pre-encode each rendition we want. Burning in the timestamp text in realtime may still be feasible, but if we need to free up more resources on this tiny demo host, we could omit that or pre-render fixed timestamps, too.

Contributor guide

Open the contributing guide

Research direction

Start with the dev/pub_multi ffmpeg script and trace how the three renditions are produced for the live demo. Measure the current realtime CPU cost, then determine how pre-encoding each rendition affects track switching. Done means the demo still supports switching between renditions while reducing the processing load on a small cloud host; timestamp handling remains an open choice in the issue.

Written by the indexing model from the issue text.

Assessment

Domain
audio-video-rtc
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.