<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>

CC BY-SA 3.0
2014-10-26T16:17:12.237Z
The question is definitely on-topic here but you might get more answers on Stackoverflow.
timonsku
CC BY-SA 3.0
2014-10-27T12:10:50.877Z
@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.
feklee
CC BY-SA 3.0
2014-10-28T08:25:31.710Z
there are som GStreamer based vision mixers: see [here](https://github.com/voc/voctomix) or [here](https://github.com/timvideos/gst-switch)
jwacalex
CC BY-SA 3.0
2014-11-18T22:50:21.520Z
Just created a [question](http://stackoverflow.com/questions/27005612) on StackOverflow, asking if it can be done with GStreamer.
feklee
<ffmpeg><mp4><linux><mixer><h.264>
Switching between H.264 video streams on the fly?
feklee
# 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

