My goal is to stream a dynamic playlist of video to Twitch.
The problem is while I stream a file, I don't know which will be the next until the end of the current one.
My playlist is a very simple queue in Redis.
My architecture is basically (pseudo code):
loop $current = get_next_video_from_redis_queue() ffmpeg $current > twitch end
It works but my stream player stop/start/buffer between each video so I can't use it, I need to concat videos before streaming them but FFmpeg seems to not be able to do that.
My new idea is to cheat:
ffmpeg udp://127.0.0.1 > Twitch & loop $current = get_next_video_from_redis_queue() ffmpeg $current > udp://127.0.0.1 end
It's seems to work but now I need a tons of tests and tunning to have something good.
Before I do that, there is a better way? Maybe with another software? My only prerequisite is to create a software headless solution.