0

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.

--Nico

  • Would it be worth looking into continuously piping the files into a .FFM file in real-time with one instance of FFmpeg and reading from it and pushing to your encoder with another? .FFM files are designed for 'infinite' video segments... :) – Callum McLean Sep 12 '14 at 14:51
  • It seems only FFserver is able to write in a FFM file, so you suggests to drop the UDP thing and just put a FFserver between my FFmpegs? I will give it a try tonight but I don't think I will have a true concatenation, I'll tell you :) . Thanks anyway :) . – Nikkau Sep 12 '14 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.