summaryrefslogtreecommitdiff
path: root/istream.sh
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-02-27 01:04:29 +0100
committerTheTroll <trolldev@gmail.com>2010-02-27 01:04:29 +0100
commit0c9414a9fecf2278d468acb1cf184e776b5a15c7 (patch)
tree4fd8140bb93e525976b3c7acde9cfb2ef3052961 /istream.sh
parent6d9cbb4df3b1aa89126069162dbf9f1e330b5fa6 (diff)
downloadistreamdev-0c9414a9fecf2278d468acb1cf184e776b5a15c7.tar.gz
istreamdev-0c9414a9fecf2278d468acb1cf184e776b5a15c7.tar.bz2
Multiple sessions support WIP
Diffstat (limited to 'istream.sh')
-rwxr-xr-xistream.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/istream.sh b/istream.sh
index e64b9ea..3327ad8 100755
--- a/istream.sh
+++ b/istream.sh
@@ -11,6 +11,7 @@ SEGDUR=10 # Length of Segments produced (between 10 and 30)
SEGWIN=$7 # Amount of Segments to produce
FFPATH=$8
SEGMENTERPATH=$9
+SESSION=$10
if [ $# -eq 0 ]
then
@@ -26,14 +27,14 @@ fi
test -L ram && (test -d /dev/shm/ram || mkdir /dev/shm/ram)
-cd ram
+cd ram/$SESSION
2> /dev/null rm stream*.ts
2> /dev/null $FFPATH -i "$STREAM" -deinterlace -f mpegts -acodec libmp3lame -ab $ARATE -ac $ACHANNELS -s $XY -vcodec libx264 -b $VRATE -flags +loop \
-cmp \+chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 \
-sc_threshold 40 -i_qfactor 0.71 -bt $VRATE -maxrate $VRATE -bufsize $VRATE -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 \
-qmin 10 -qmax 51 -qdiff 4 -level 30 -g 30 -async 2 -threads 4 - | \
-$SEGMENTERPATH - $SEGDUR stream stream.m3u8 $HTTP_PATH $SEGWIN &
+$SEGMENTERPATH - $SEGDUR stream stream.m3u8 $HTTP_PATH$SESSION $SEGWIN && rm streamsegmenterpid &
// Save segmenterpid
echo "$!" > streamsegmenterpid