I have 2 live streams, currently two still images streamed by ffmpeg. I have compiled this example and made the small modification to get switches between the 2 live streams every 10 seconds.
My problem is that even though I am seeing the switches accurately logged every 10 seconds, in my player (using the test players on this site) I am seeing unpredictable switch times. It is sometimes 70s, sometimes 30s, sometimes just a quick blink for 1s, and so on. I assume this is related to the chunking and player buffering, however I would like to get a solution which allows me to switch from one live stream to an other in a precisely timed way.
Is there any way to fix this approach?
What does "setStartOnPreviousKeyFrame" mean, the term "previous" refers to what point in time?
Why is it necessary that this example keeps calling "provider.play(publisher)" in the loop?
Any help is appreciated, thanks!