]> git.parisson.com Git - telecaster-cgi.git/commitdiff
tee webm stream to disk (test), add suspend and resume rules (not tested)
authoryomguy <yomguy@parisson.com>
Fri, 6 Jan 2012 12:21:07 +0000 (13:21 +0100)
committeryomguy <yomguy@parisson.com>
Fri, 6 Jan 2012 12:21:07 +0000 (13:21 +0100)
conf/etc/pm/sleep.d/telecaster_suspend [new file with mode: 0755]
scripts/telecaster/tc_video_simple_webm_stream.sh

diff --git a/conf/etc/pm/sleep.d/telecaster_suspend b/conf/etc/pm/sleep.d/telecaster_suspend
new file mode 100755 (executable)
index 0000000..8acdd6d
--- /dev/null
@@ -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
index 348bf022bd5d9155b5c151d0cedcefa59d1f6dda..665677564db77307ee8af8063f50fc55c2c791a8 100755 (executable)
@@ -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