Use flvstreamer and ffserver.
flvstreamer does what it sounds like, and ffserver comes with ffmpeg, and it lets you stream live video from anything you can feed into ffmpeg like this:
flvstreamer url | ffmpeg -i - http://127.0.0.1:8090/feed1.ffm
ffserver can "output" a flash stream- a url that you'd visit like http://site/video.swf or you can offer other formats (like asf or mpg) and ffmpeg can transcode it- if your computer is fast enough- in real time.
Then your "playlist" is essentially a list of flvserver|ffmpeg...
commands, and it's very easy to add more, or add more streams.
Below is a configuration file that I use. Some things to note: the feed1.ffm is a "buffer", and the "max size" is essentially how lagged things can get. Removing the FileMaxSize
records everything, allowing you to time-shift your video as well.
Port 8090
BindAddress 0.0.0.0
MaxClients 200
MaxBandwidth 4000000
<Feed feed1.ffm>
File tmp/feed1.ffm
FileMaxSize 10M
ACL allow 127.0.0.1
</Feed>
<Stream video.swf>
Feed feed1.ffm
VideoBitRate 500
VideoBufferSize 40
VideoGopSize 10
Format swf
VideoSize 640x480
VideoFrameRate 10
VideoQMin 1
VideoQMax 4
VideoHighQuality
NoAudio
PreRoll 0
StartSendOnKey
</Stream>