summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-04-01 18:05:45 +0200
committerTheTroll <trolldev@gmail.com>2010-04-01 18:05:45 +0200
commit7bb40c3e21fa067dee9997bcd580113e63d1ff08 (patch)
tree3787a12dac6dffc09ccc2dc02848a31b479cb487 /bin
parent443a8db28327ad59f75c83c44f45b00dcd0b74ee (diff)
downloadistreamdev-7bb40c3e21fa067dee9997bcd580113e63d1ff08.tar.gz
istreamdev-7bb40c3e21fa067dee9997bcd580113e63d1ff08.tar.bz2
Get the rights pids
Diffstat (limited to 'bin')
-rwxr-xr-xbin/istream.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/istream.sh b/bin/istream.sh
index 1e843e0..88508d6 100755
--- a/bin/istream.sh
+++ b/bin/istream.sh
@@ -51,11 +51,13 @@ cd ../ram/$SESSION
-qmin 10 -qmax 51 -qdiff 4 -level 30 -g 30 -async 2 -threads 4 - 2>$FFMPEGLOG > ./fifo) &
# Store ffmpeg pid
-2>/dev/null echo $! > ./ffmpeg.pid
+PID=$!
+2>/dev/null echo `\ps ax --format pid,ppid | grep "$PID$" | awk {'print $1'}` > ./ffmpeg.pid
# Now start segmenter
(trap "rm -f ./segmenter.pid" EXIT HUP INT TERM ABRT; 2>/dev/null $SEGMENTERPATH ./fifo $SEGDUR stream stream.m3u8 $HTTP_PATH$SESSION/ $SEGWIN) &
# Store segmenter pid
-2>/dev/null echo $! > ./segmenter.pid
+PID=$!
+2>/dev/null echo `\ps ax --format pid,ppid | grep "$PID$" | awk {'print $1'}` > ./segmenter.pid