Body: <p>I have several H.264 encoded MP4 files, as well as still images. From these I want to generate a single video stream that I can broadcast. The stream will be composed of alternating still images and video clips.</p>
  
  <p>Here is what I think could work:</p>
  
  <ul>
  <li><p>At any time, simultaneously play back two video streams using <code>ffmpeg -re</code> (one of
   the video streams is actually a looping still image).</p></li>
  <li><p>Use a H.264 video mixer to switch from one stream to another. The mixer is 
   controlled by a Unix command line script. A playlist wouldn't work since the
   order of streams is not known in advance.</p></li>
  <li><p>Pipe the resulting (mixed) H.264 stream into broadcasting software such as Wowza.</p></li>
  </ul>
  
  <p><em>Is that the correct approach? Is there actually a H.264 video mixer that runs on Linux and that can be controlled from the command line?</em></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-26T16:17:12.237Z
Comments.Text: The question is definitely on-topic here but you might get more answers on Stackoverflow.
Comments.UserDisplayName: timonsku
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-27T12:10:50.877Z
Comments.Text: @ProfessorSparkles Thanks for the suggestion. I am also discussing the issue on one of the GStreamer mailing lists. Furthermore, I discovered [FreeJ](http://freej.org/), which seems to be able to do what I want with Ogg Theora, i.e. re-encoding would be required.
Comments.UserDisplayName: feklee
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-28T08:25:31.710Z
Comments.Text: there are som GStreamer based vision mixers: see [here](https://github.com/voc/voctomix) or [here](https://github.com/timvideos/gst-switch)
Comments.UserDisplayName: jwacalex
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-18T22:50:21.520Z
Comments.Text: Just created a [question](http://stackoverflow.com/questions/27005612) on StackOverflow, asking if it can be done with GStreamer.
Comments.UserDisplayName: feklee
Tags: <ffmpeg><mp4><linux><mixer><h.264>
Title: Switching between H.264 video streams on the fly?
UserDisplayName: feklee
ThreadText: # Switching between H.264 video streams on the fly?
  
  (Asked by: username_0 on 2014-10-26)
  
  I have several H.264 encoded MP4 files, as well as still images. From these I want to generate a single video stream that I can broadcast. The stream will be composed of alternating still images and video clips.
  
  Here is what I think could work:
  
  * At any time, simultaneously play back two video streams using `ffmpeg -re` (one of
    the video streams is actually a looping still image).
  * Use a H.264 video mixer to switch from one stream to another. The mixer is
    controlled by a Unix command line script. A playlist wouldn't work since the
    order of streams is not known in advance.
  * Pipe the resulting (mixed) H.264 stream into broadcasting software such as Wowza.
  
  *Is that the correct approach? Is there actually a H.264 video mixer that runs on Linux and that can be controlled from the command line?*
  
  **Tags:** ffmpeg, mp4, linux, mixer, h.264
  
  > **Comments:**
  > **username_1**: The question is definitely on-topic here but you might get more answers on Stackoverflow.  
  > **username_0**: @ProfessorSparkles Thanks for the suggestion. I am also discussing the issue on one of the GStreamer mailing lists. Furthermore, I discovered [FreeJ](http://freej.org/), which seems to be able to do what I want with Ogg Theora, i.e. re-encoding would be required.  
  > **username_2**: there are som GStreamer based vision mixers: see [here](https://github.com/voc/voctomix) or [here](https://github.com/timvideos/gst-switch)  
  > **username_0**: Just created a [question](http://stackoverflow.com/questions/27005612) on StackOverflow, asking if it can be done with GStreamer.  
  
  ---
  
  ## 0 answers
  
  