David 10 tahun lalu
induk
melakukan
78982e0ba1
1 mengubah file dengan 5 tambahan dan 8 penghapusan
  1. 5 8
      server/play-video.sh

+ 5 - 8
server/play-video.sh

@@ -13,7 +13,7 @@ fi
 # Set video feed and audio feed id
 feed_id=2
 audio_feed_id=2
-source="$1"
+source="/home/nginx/videos/$1"
 
 if [ ! -f "$source" ]; then
 	echo "'$source' is not a file or whatever"
@@ -78,14 +78,11 @@ VIDEOFORMAT=$VIDEOBGRA', width='$feed_width', height='$feed_height
 rm -f $feed_control_pipe
 
 if [ X$feed_rate != X -a X$feed_channels != X ] ; then
-	echo $gstlaunch -q $SRC ! \
-	videorate ! $SCALE ! $VIDEOFORMAT ! $SHMSINK1 decoder. \
-	! queue ! audioconvert ! audioresample ! $AUDIOFORMAT ! fdsink fd=1 sync=true
 	  (
-	echo 'audio feed ctr isaudio '$audio_feed_id
-	$gstlaunch -v $SRC ! \
-	videorate ! $SCALE ! $VIDEOFORMAT ! $SHMSINK1 decoder. \
-	! queue ! audioconvert ! audioresample ! $AUDIOFORMAT ! fdsink fd=3 sync=true 3>&1 1>&2
+		echo 'audio feed ctr isaudio '$audio_feed_id
+		$gstlaunch -e $SRC ! \
+		videorate ! $SCALE ! $VIDEOFORMAT ! $SHMSINK1 decoder. \
+		! queue ! audioconvert ! audioresample ! $AUDIOFORMAT ! fdsink fd=3 sync=true 3>&1 1>&2
 	  ) | nc $SNOWMIX_IP $SNOWMIX_PORT
 else
 	$gstlaunch -e -q $SRC ! \