Ataman
New Member
Hello,
I'm trying to put two seperate RTMP streams together with ffmpeg but they're out of sync.
The first RTMP stream is my OBS broadcast and the second a audio only voice overlay from Teamspeak.
the ffmpeg command looks like this:
The first input is way earlier than the second. If I switch those it's the other way around.
obsproject is my standard OBS stream and teamspeak is another ffmpeg instance which fetches the audio from a VAC device and feeds it to rtmp://localhost/gaming/teamspeak.
From hours of googling I came to the conclusion the fault lies with keyframes or the fact that ffmpeg loads those streams not at the same time.
Any idea what I could do to get ffmpeg to load both streams at once or another method to sync them? Should I use another method? Maybe some of you guys tried something similar and solved the problem somehow.
Greetings
Ataman
I'm trying to put two seperate RTMP streams together with ffmpeg but they're out of sync.
The first RTMP stream is my OBS broadcast and the second a audio only voice overlay from Teamspeak.
the ffmpeg command looks like this:
Code:
ffmpeg -i rtmp://localhost/gaming/obsproject -i rtmp://localhost/gaming/teamspeak -filter_complex "[0:a][1:a]amerge,pan=stereo:c0<c0+c2:c1<c1+c3[aout]" -map 1:v -map "[aout]" -c:v copy -c:a mp3 -f rtmp://localhost/broadcast/live
The first input is way earlier than the second. If I switch those it's the other way around.
obsproject is my standard OBS stream and teamspeak is another ffmpeg instance which fetches the audio from a VAC device and feeds it to rtmp://localhost/gaming/teamspeak.
From hours of googling I came to the conclusion the fault lies with keyframes or the fact that ffmpeg loads those streams not at the same time.
Any idea what I could do to get ffmpeg to load both streams at once or another method to sync them? Should I use another method? Maybe some of you guys tried something similar and solved the problem somehow.
Greetings
Ataman