Body: <p>My goal is to stream a dynamic playlist of video to Twitch.</p>
  
  <p>The problem is while I stream a file, I don't know which will be the next until the end of the current one.</p>
  
  <p>My playlist is a very simple queue in Redis.</p>
  
  <p>My architecture is basically (pseudo code):</p>
  
  <pre><code>loop
      $current = get_next_video_from_redis_queue()
      ffmpeg $current &gt; twitch
  end
  </code></pre>
  
  <p>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.</p>
  
  <p>My new idea is to cheat:</p>
  
  <pre><code>ffmpeg udp://127.0.0.1 &gt; Twitch &amp;
  
  loop
      $current = get_next_video_from_redis_queue()
      ffmpeg $current &gt; udp://127.0.0.1
  end
  </code></pre>
  
  <p>It's seems to work but now I need a tons of tests and tunning to have something good.</p>
  
  <p>Before I do that, there is a better way? Maybe with another software?
  My only prerequisite is to create a software headless solution.</p>
  
  <p>--Nico</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-09-12T14:51:12.170Z
Comments.Text: 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... :)
Comments.UserDisplayName: Cal McLean
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-09-12T16:32:42.517Z
Comments.Text: 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 :) .
Comments.UserDisplayName: Nikkau
Tags: <ffmpeg><streaming><rtmp><playlist>
Title: Stream a dynamic playlist to a RTMP server
UserDisplayName: Nikkau
ThreadText: # Stream a dynamic playlist to a RTMP server
  
  (Asked by: username_0 on 2014-09-12)
  
  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
  
  **Tags:** ffmpeg, streaming, rtmp, playlist
  
  > **Comments:**
  > **username_1**: 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... :)  
  > **username_0**: 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 :) .  
  
  ---
  
  ## 0 answers
  
  