[FFmpeg-user] Switching live streams without interruption?

DopeLabs dopelabs at dubstep.fm
Sun Oct 26 01:26:52 CEST 2014

i have the publisher/controller/loop until live all setup/automated with ffmpeg providing 4 live streams which rotate  

this allows me to have a ‘main stream’ in which the wowza server rotates content on a time based schedule. the cut between streams is very subtle.

the 2 modules im using are stream publisher and loop until live

in wowza/conf/live/Application.xml


<!-- This property is the name of the dj stream or streams that will be published to your application. -->
<!-- This property is the name of the server-side stream or streams that the live stream(s) will be inserted into. -->
<!--  Reload the entire stream playlist when switching back to the filler video. -->
<!--  Handle MediaCasters properly by only switching the stream when the MediaCaster is ready. -->

in wowza/content/streamschedule.smil

<stream name=“dubstepfm"></stream>
<playlist name=“audioviz" playOnStream=“dubstepfm" repeat="true" scheduled="2014-01-01 12:59:59">
	<video src="spectrum1.stream" start="-2" length="86400"/>
	<video src="spectrum2.stream" start="-2" length="86400"/>
	<video src="wavesline.stream" start="-2" length="86400"/>
	<video src="wavespoint.stream" start="-2" length="86400"/>

in wowza/content/wavespoint.stream

in wowza/content/wavesline.stream

in wowza/content/spectrum2.stream

in wowza/content/spectrum1.stream

and finally the ffmpeg instances that create the audio viz

ffmpeg -i http://stream.dubstep.fm:5000 -filter_complex showwaves=s=1280x720:mode=point,drawtext=fontfile=d3.ttf:fontsize=28:fontcolor=white:textfile=dsfm.tv.txt:y=10:x=10 -c:v libx264 -b:v 3000k -pix_fmt yuv420p -c:a copy -preset ultrafast -bsf h264_mp4toannexb -f mpegts udp://

ffmpeg -i http://stream.dubstep.fm:5000 -filter_complex showwaves=s=1280x720:mode=line,drawtext=fontfile=/d3.ttf:fontsize=28:fontcolor=white:textfile=dsfm.tv.txt:y=10:x=10 -c:v libx264 -preset ultrafast -b:v 3000k -pix_fmt yuv420p -c:a copy -bsf h264_mp4toannexb -f mpegts udp://

ffmpeg -i http://stream.dubstep.fm:5000 -filter_complex showspectrum=mode=separate:s=1280x720,drawtext=fontfile=d3.ttf:fontsize=28:fontcolor=white:textfile=dsfm.tv.txt:y=10:x=10 -c:v libx264 -b:v 3000k -pix_fmt yuv420p -c:a copy -preset ultrafast -bsf h264_mp4toannexb -f mpegts udp://

ffmpeg -i http://stream.dubstep.fm:5000 -filter_complex showspectrum=s=1280x720,drawtext=fontfile=d3.ttf:fontsize=28:fontcolor=white:textfile=dsfm.tv.txt:y=10:x=10 -c:v libx264 -preset ultrafast -b:v 3000k -pix_fmt yuv420p -c:a copy -bsf h264_mp4toannexb -f mpegts udp://

to sum it all up im generating 2 spectrograms and 2 waveforms using the audio from a shoutcast server. each one plays for 24 hours before switching to the next one in the list. if a stream is published with the name djstream, it will immediately switch to that content… once djstream is finished it goes back to the schedule again, rotating once every 24 hours to the next stream… the single

i believe the app type has to be ‘live’ for most of this stuff to work, and i dont think you can switch to a stream published to a different app.

results -> http://dsfm.tv

ok enough wowza on the ffmpeg list.. let me know if you have any q’s, etc


> On Oct 25, 2014, at 1:54 PM, Felix E. Klee <felix.klee at inka.de> wrote:
> Thanks Luke! Hm, I thought it was standard feature. But being not, I
> guess I'll first look at Wowza which seems to be scriptable with
> ActionScript. Fortunately, I've used ActionScript before: Many years
> ago, I wrote a streaming video player, based on AMS.
> Anyhow, there must be a smooth solution.  l just can't believe that
> it's not possible to run something akin to a TV station on the
> Internet.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user

More information about the ffmpeg-user mailing list