Glimesh / waveguide

A polyglot WebRTC media server.
GNU Affero General Public License v3.0
37 stars 8 forks source link

Combine saved H264 and Opus into a single playable file #12

Open clone1018 opened 1 year ago

clone1018 commented 1 year ago

Once we have #10 and #11 we can combine them into a singular playable file which is a recording of the entire stream. Likely wont be easy, lots to figure out!

Need to double check H264 and Opus is a good way to go for actual files...

nassah221 commented 1 year ago

I have some thoughts on how we could go about this.

  1. Write h264 (video) and opus (audio) files on to the disk. After the stream ends, combine them into playable container format.
  2. Write and combine video and audio as they are being written to disk.

With the former, there can be a trigger to the action of a stream "ending" that should start the process of packing the media into the desired container format. This warrants further discussion about whether we want decouple the "packing into container" process from the waveguide server, treating it as background job per stream. As far as I understand, this process is fallible/interruptable in which case there should be some retry/timeout mechanism to gracefully handle it.

On the other hand, I think there's going to be a lot of needless complexity with the latter approach with little upside unless there's a usecase to have the "packed" media available in real-time i.e. as soon as the stream ends.

wdyt @clone1018