|
@@ -77,13 +77,19 @@ VIDEOFORMAT=$VIDEOBGRA', width='$feed_width', height='$feed_height
|
|
|
|
|
|
|
|
rm -f $feed_control_pipe
|
|
rm -f $feed_control_pipe
|
|
|
|
|
|
|
|
|
|
+str_duration=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$source");
|
|
|
|
|
+str_duration=${str_duration/.*};
|
|
|
|
|
+duration=$((str_duration+3)) #Just in case, add 3 secs after truncating
|
|
|
|
|
+echo "Duration of $source is $duration"
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
if [ X$feed_rate != X -a X$feed_channels != X ] ; then
|
|
if [ X$feed_rate != X -a X$feed_channels != X ] ; then
|
|
|
(
|
|
(
|
|
|
- echo 'audio feed ctr isaudio '$audio_feed_id
|
|
|
|
|
- $gstlaunch -e $SRC ! \
|
|
|
|
|
|
|
+ echo "audio feed ctr isaudio $audio_feed_id"
|
|
|
|
|
+ timeout $duration $gstlaunch $SRC ! \
|
|
|
videorate ! $SCALE ! $VIDEOFORMAT ! $SHMSINK1 decoder. \
|
|
videorate ! $SCALE ! $VIDEOFORMAT ! $SHMSINK1 decoder. \
|
|
|
! queue ! audioconvert ! audioresample ! $AUDIOFORMAT ! fdsink fd=3 sync=true 3>&1 1>&2
|
|
! queue ! audioconvert ! audioresample ! $AUDIOFORMAT ! fdsink fd=3 sync=true 3>&1 1>&2
|
|
|
- ) | nc $SNOWMIX_IP $SNOWMIX_PORT
|
|
|
|
|
|
|
+ ) | nc -q 1 $SNOWMIX_IP $SNOWMIX_PORT
|
|
|
else
|
|
else
|
|
|
$gstlaunch -e -q $SRC ! \
|
|
$gstlaunch -e -q $SRC ! \
|
|
|
$SCALE ! \
|
|
$SCALE ! \
|