ReLive - Generating Streamdumps from our HTTP Live Stream
This is a follow-up on the article deploying apples http live streaming in a gnu linux environment.
After rolling out HTTP Live stream for the podcast project Bitsundso we decided it would be nice to have the latest episode available after recording (read: stream dump). Since all files are already available in theory one only has to create a corresponding playlist (m3u8) file containing all these little files.
Following my principle of letting computers do repeating stuff I created two perl scripts doing this for me.
lastepisodemagic.pl generates a playlist file for a given range. The range must be specified as startindex (the first .ts file) and endindex. The matching files are copied to another directory, any old files in this directory are deleted and then finally .m3u8 files are created for the available qualities.
lastepisodeeventcatcher.pl is a cron scheduled script that determines the corresponding start- and end-indexes for lastepisodemagic.pl. Unfortunately I think this is highly customized to our environment. The script monitors our nicecast logfile to find start and end timestamps.
Please note that both scripts are without any warranty. Please understand what they do before using them.
