diff options
Diffstat (limited to 'contrib/hls')
-rwxr-xr-x | contrib/hls/create-runit-conf.sh | 48 | ||||
-rwxr-xr-x | contrib/hls/install.sh | 18 | ||||
-rw-r--r-- | contrib/hls/m3u8-segmenter-git-repo | 1 | ||||
-rwxr-xr-x | contrib/hls/start-hls.sh | 53 |
4 files changed, 0 insertions, 120 deletions
diff --git a/contrib/hls/create-runit-conf.sh b/contrib/hls/create-runit-conf.sh deleted file mode 100755 index a5f2f46..0000000 --- a/contrib/hls/create-runit-conf.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -SOURCES="av-orig av-en" -PROFILES="mini low medium high" - -if [ -z "$1" ]; then - echo "Usage $0 <name>" - exit 1 -fi - -name=$1 -OUT_D=runit - -rm -rf "$OUT_D" -mkdir -p "$OUT_D" - -for src in $SOURCES; do - for profile in $PROFILES; do - echo "creating runit instance for $src - $profile" - DIR="$OUT_D/hls-$name-$src-$profile" - mkdir -p "$DIR/log" -cat >> "$DIR/run" <<EOF -#!/bin/sh -set -e - -exec 2>&1 -exec chpst -u flumotion:flumotion /usr/local/bin/start-hls.sh "$name" "$src" "$profile" -EOF - chmod +x "$DIR/run" - -cat >> "$DIR/log/run" <<EOF -#!/bin/sh -set -e - -LOG_D="/var/log/hls-$name/$src-$profile/" -if [ ! -d "\$LOG_D" ]; then - mkdir -p -m0750 "\$LOG_D" -fi -chown root:adm "\$LOG_D" -exec chpst -u root:adm svlogd -tt "\$LOG_D" -EOF - chmod +x "$DIR/log/run" - - ln -s "/var/run/sv.hls-$name-$src-$profile" "$DIR/supervise" - ln -s "/var/run/sv.hls-$name-$src-$profile.log" "$DIR/log/supervise" - - done -done diff --git a/contrib/hls/install.sh b/contrib/hls/install.sh deleted file mode 100755 index b6561cb..0000000 --- a/contrib/hls/install.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -set -e - -sudo aptitude install git build-essential ffmpeg pkg-config libavformat-dev runit -git clone `cat m3u8-segmenter-git-repo` -cd m3u8-segmenter -./configure -make -sudo cp m3u8-segmenter /usr/local/bin -cd .. -sudo cp start-hls.sh /usr/local/bin - -echo "******* finished ********" -echo "" -echo "For improved performance add following to /etc/fstab" -echo "tmpfs /var/www/live tmpfs size=1G,mode=755,uid=flumotion,gid=flumotion 0 0" - diff --git a/contrib/hls/m3u8-segmenter-git-repo b/contrib/hls/m3u8-segmenter-git-repo deleted file mode 100644 index df7218d..0000000 --- a/contrib/hls/m3u8-segmenter-git-repo +++ /dev/null @@ -1 +0,0 @@ -git://github.com/johnf/m3u8-segmenter.git diff --git a/contrib/hls/start-hls.sh b/contrib/hls/start-hls.sh deleted file mode 100755 index 44c5f05..0000000 --- a/contrib/hls/start-hls.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# -# Installation: -# -# $ git clone git://github.com/johnf/m3u8-segmenter.git -# $ cd m3u8-segmenter -# $ ./confiugure -# $ make -# $ sudo cp m3u8-segmenter /usr/local/bin -# $ copy start-hls.sh /usr/local/bin -# -# add following to /etc/fstab -# tmpfs /var/www/live tmpfs size=1G,mode=755,uid=flumotion,gid=flumotion 0 0 -# - -if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then - echo "Usage: $0 <name> <src> (high|medium|low|mini)" - exit 1 -fi - -name=$1 -quality=$3 -stream_name="$name/$2-hls-$quality" -src="http://localhost:8000/$2-flash-$quality.flv" -segmenter="/usr/local/bin/m3u8-segmenter" -len=3 -num=3 -url="http://live.spreadspace.org/" - -case "$3" in - high) - arate=160k - ;; - medium) - arate=128k - ;; - low) - arate=96k - ;; - mini) - arate=64k - ;; - *) - arate=128k - ;; -esac - -cd /var/www -ffmpeg -y -i "$src" -f mpegts -acodec libmp3lame -ar 44100 -ab "$arate" -vcodec copy -vbsf h264_mp4toannexb -async 2 - | $segmenter -i - -d $len -n $num -p "$stream_name" -m "$stream_name.m3u8" -u "$url" -rm -f "$stream_name"-*.ts -rm -f "$stream_name".m3u8 - -exit 0 |