From 605f4f4d71358773f00e0351e158e5465d5adfbb Mon Sep 17 00:00:00 2001 From: yomguy Date: Fri, 6 Jan 2012 13:21:07 +0100 Subject: [PATCH] tee webm stream to disk (test), add suspend and resume rules (not tested) --- conf/etc/pm/sleep.d/telecaster_suspend | 25 +++++++++++++++++++ .../telecaster/tc_video_simple_webm_stream.sh | 7 ++++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100755 conf/etc/pm/sleep.d/telecaster_suspend diff --git a/conf/etc/pm/sleep.d/telecaster_suspend b/conf/etc/pm/sleep.d/telecaster_suspend new file mode 100755 index 0000000..8acdd6d --- /dev/null +++ b/conf/etc/pm/sleep.d/telecaster_suspend @@ -0,0 +1,25 @@ +#! /bin/sh + +# This script puts the TeleCaster services to +# suspend before going to sleep. Otherwise it may be in a weird state +# after wakeup, namely everything looks fine from various AT commands, +# the modem is registered to the cell network and reports a suitable +# signal strength, but attempting to dial out by atdt*99# or, it seems, +# any other number and the modem just responds instantly with NO CARRIER. + + +#if [ ! -x /sys/bus/usb/devices/${BUS}-${DEVICE}/power/level ]; then +# exit 0 +#fi + +case $1 in + suspend|suspend_hybrid|hibernate) + /etc/init.d/vncserver stop + sleep 1 + /etc/init.d/jackd stop + ;; + resume|thaw) + /etc/init.d/jackd start + /etc/init.d/vncserver start + ;; +esac diff --git a/scripts/telecaster/tc_video_simple_webm_stream.sh b/scripts/telecaster/tc_video_simple_webm_stream.sh index 348bf02..6656775 100755 --- a/scripts/telecaster/tc_video_simple_webm_stream.sh +++ b/scripts/telecaster/tc_video_simple_webm_stream.sh @@ -8,11 +8,14 @@ HEIGHT=360 #HEIGHT=576 gst-launch v4l2src device=/dev/video0 ! video/x-raw-yuv, width=$WIDTH, height=$HEIGHT \ + ! queue ! videoflip method=rotate-180 \ ! queue ! ffmpegcolorspace \ - ! queue ! vp8enc speed=2 threads=2 quality=3 ! queue ! muxout. \ + ! queue ! vp8enc speed=2 threads=2 quality=5 ! queue ! muxout. \ jackaudiosrc connect=1 \ ! queue ! audioconvert ! queue ! vorbisenc quality=3 ! queue ! muxout. \ - webmmux streamable=true name=muxout ! souphttpclientsink location=/home/telecaster/archives/test.webm \ + webmmux streamable=true name=muxout \ + ! tee name=t ! queue ! tcpserversink host=127.0.0.1 port=9000 \ + t. ! queue ! filesink location=/home/telecaster/trash/test.webm \ > /dev/null & sleep 2 -- 2.39.5