So I have a weird use case that I'm struggling with. Here's the situation:
I have 2 video files, each 1 hour long. I want to stream the first file to twitch in a process, and when that file ends, the ffmpeg process will end and then I want to pickup the other video and continue the stream with that one.
Why should the process end? because after the first video ends, I need to check via code if the 2nd video is available to be streamed, otherwise I'll re-stream the first video again.
I understand that this can be done via concatenating the two videos, but again, the 2nd video might not be available just yet so we need to end the process right after the 1st video ends streaming and check if it's there.
This works great on YouTube, but the issue I'm facing is that Twitch specifically, when we start streaming the 2nd video, thinks that it's a totally new live stream and resets the live duration counter.
Here's the million dollar question: How can we make twitch think that the data being sent from the 2nd video is the remainder of the first video? I think it has something to do with the timestamps being sent? any pointers or other way to look at this?
Tried updating the pts to be the previous video length + current pts