Syncing two streams from HLS source

Hi, I have two streams(coming from a unmuxed HLS stream): a video-only stream and an audio stream. Screenshot shows the beginning of my pipeline. From the kino_membrane graphs, it looks like they are producing buffers at very different rates(screenshots are of output pad). demuxer2 is the audio stream which seems to produce buffers at a much lower rate. The cmaf_muxer downstream takes a while to start outputting its first buffer, and the resulting muxed video is out of sync with the audio. Could someone help me understand what I need to do to sync these two streams? Would placing a membrane_realtimer_plugin element after each demuxer help here?
No description
No description
No description
1 Reply
bartkrak
bartkrak3w ago
Adding a realtimer plugin on each stream will make them real-time but won't synchronize them. Perhaps you could make a custom filter element that would take both streams as separate inputs, and buffer one of them until the second one is ready, and then release both also then you could add cmaf_muxer to your custom filter and wait untill it's ready bo start outputting both signals at the same time
Want results from more Discord servers?
Add your server