]> git.parisson.com Git - telecaster-client.git/commitdiff
add gst scripts
authoryomguy <yomguy@parisson.com>
Fri, 2 Dec 2011 10:14:12 +0000 (11:14 +0100)
committeryomguy <yomguy@parisson.com>
Fri, 2 Dec 2011 10:14:12 +0000 (11:14 +0100)
example/settings.py
telecaster/tools/scripts/ffmpeg_dv_jack_fifo_shout [new file with mode: 0755]
telecaster/tools/scripts/ffmpeg_usb_jack_fifo_shout [new file with mode: 0755]
telecaster/tools/scripts/gst_dv_jack_shout [new file with mode: 0755]
telecaster/tools/scripts/gst_video_double_shout [new file with mode: 0755]
telecaster/tools/scripts/gst_video_jack_fifo_shout [new file with mode: 0755]
telecaster/tools/scripts/gst_video_jack_shout [new file with mode: 0755]
telecaster/tools/scripts/gst_video_simple_ogg [new file with mode: 0755]
telecaster/tools/scripts/gst_video_simple_ogg_jack [new file with mode: 0755]
telecaster/tools/scripts/gst_video_triple_shout [new file with mode: 0755]

index 633f19696e99c12d9ea1a7ebd123e3f71892bc37..a1f0fb37ed5869bff42cc076043a971c5aea6bab 100644 (file)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 # Django settings for sandbox project.
 
 DEBUG = True
@@ -27,11 +28,11 @@ DATABASES = {
 # timezone as the operating system.
 # If running in a Windows environment this must be set to the same as your
 # system time zone.
-TIME_ZONE = 'America/Chicago'
+TIME_ZONE = 'Europe/Paris'
 
 # Language code for this installation. All choices can be found here:
 # http://www.i18nguy.com/unicode/language-identifiers.html
-LANGUAGE_CODE = 'en-us'
+LANGUAGE_CODE = 'fr-fr'
 
 SITE_ID = 1
 
diff --git a/telecaster/tools/scripts/ffmpeg_dv_jack_fifo_shout b/telecaster/tools/scripts/ffmpeg_dv_jack_fifo_shout
new file mode 100755 (executable)
index 0000000..07075a1
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+set -e
+
+case "$1" in
+ start)
+   fifo=/tmp/video_fifo
+   if [ ! -e $fifo ]; then
+   mkfifo $fifo
+   fi
+
+   dir=/mnt/data1/video_tests
+   now=`date -R`
+
+   dvgrab -buffers 1 - | ffmpeg -f dv -i - -f jack -i ffmpeg -vcodec libtheora -s 480x320 -aspect 16:9 -acodec libvorbis -b 300k -f ogg -y $fifo -map 0.0 -map 1.0 &
+
+   sleep 5
+   jack_connect jack_rack:out_1 ffmpeg:input_1
+   jack_connect jack_rack:out_2 ffmpeg:input_2
+   #jack_connect jack_rack:out_1 ffmpeg:input_1
+   #jack_connect jack_rack:out_2 ffmpeg:input_2
+
+   sleep 1
+   cat $fifo | tee "$dir/Pre-Barreau_-_Augustins_-_Video_Live_-_$now.ogg" | oggfwd -d "pb_video_live" -g "Teaching"  -n "pb_video_live" localhost 8000 source2parisson /pb_video_live.ogg &
+   ;;
+ stop)
+   jack_disconnect jack_rack:out_1 ffmpeg:input_1
+   jack_disconnect jack_rack:out_2 ffmpeg:input_2
+   pkill ffmpeg
+   ;;
+esac
+
+
+
+
+
diff --git a/telecaster/tools/scripts/ffmpeg_usb_jack_fifo_shout b/telecaster/tools/scripts/ffmpeg_usb_jack_fifo_shout
new file mode 100755 (executable)
index 0000000..47fe2ed
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+    set -e
+
+case "$1" in
+ start)
+   fifo=/tmp/video_fifo2
+   if [ ! -e $fifo ]; then
+   mkfifo $fifo
+   fi
+
+   dir=$HOME/archives/2011
+   now=`date -R`
+   file=$dir/video_test2.ogg
+
+   ffmpeg -f video4linux2 -i /dev/video0 -f jack -i ffmpeg -itsoffset 00:00:00.8 -r 20 -f ogg -vcodec libtheora -s 320x240 -b 380k -acodec libvorbis -ab 64k -ar 44100 -ac 1 -y $file -map 0.0 -map 1.0 &
+
+   sleep 3
+   jack_connect jack_rack:out_1 ffmpeg:input_1
+   #jack_connect jack_rack:out_1 ffmpeg:input_2
+
+   sleep 2
+   cat $file | tee $file.ogg | oggfwd -d "TeleCaster Live Video Services" -g "Vocal"  -n "TeleCaster Live Video" localhost 8000 source2parisson /telecaster_live_video.ogg &
+   ;;
+ stop)
+   jack_disconnect jack_rack:out_1 ffmpeg:input_1
+#   jack_disconnect jack_rack:out_1 ffmpeg:input_2
+   pkill -9 ffmpeg
+   ;;
+esac
+
+
+
+
+
+# http://www.kkoncepts.net/node/69
\ No newline at end of file
diff --git a/telecaster/tools/scripts/gst_dv_jack_shout b/telecaster/tools/scripts/gst_dv_jack_shout
new file mode 100755 (executable)
index 0000000..ef59dfc
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+gst-launch-0.10 dv1394src ! queue ! dvdemux name=d ! queue ! dvdec  \
+       ! queue ! videoscale ! video/x-raw-yuv, width=480, height=368 \
+       ! queue ! ffmpegcolorspace ! theoraenc bitrate=500 ! muxout. \
+        oggmux name=muxout \
+       ! queue ! shout2send mount=/telecaster_live_video.ogg port=8000 password=source2parisson ip=127.0.0.1 \
diff --git a/telecaster/tools/scripts/gst_video_double_shout b/telecaster/tools/scripts/gst_video_double_shout
new file mode 100755 (executable)
index 0000000..246d01e
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+gst-launch v4l2src device=/dev/video0 ! videoscale ! video/x-raw-yuv, width=160, height=120 ! videomixer name=mix sink_1::xpos=20 sink_1::ypos=20 sink_1::alpha=0.9  ! queue ! ffmpegcolorspace ! theoraenc quality=40 ! muxout. jackaudiosrc connect=1 ! audioconvert ! audio/x-raw-int,rate=44100,channels=1,width=16 ! queue ! audioconvert ! vorbisenc ! queue ! muxout. oggmux name=muxout ! tee name=t ! queue ! filesink location="video_test.ogg" t. ! queue ! shout2send mount=/telecaster_live_video.ogg port=8000 password=source2parisson ip=127.0.0.1 v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv, width=480, height=270 ! mix.
diff --git a/telecaster/tools/scripts/gst_video_jack_fifo_shout b/telecaster/tools/scripts/gst_video_jack_fifo_shout
new file mode 100755 (executable)
index 0000000..1c19e27
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -e
+
+case "$1" in
+ start)
+   dir=/home/$USER/trash
+   dat=`date '+%y-%m-%d-%H:%M:%S'`
+   file=$dir/video_test_$dat.ogg
+
+   gst-launch-0.10 v4l2src device=/dev/video0 ! queue ! videorate ! video/x-raw-yuv,width=320 ! queue  ! theoraenc quality=60 ! queue ! muxout. jackaudiosrc connect=1 ! audioconvert ! audio/x-raw-int,rate=44100,channels=1,width=16 ! queue ! audioconvert ! vorbisenc ! queue ! muxout. oggmux name=muxout ! filesink location=$file sync=true &
+   
+#    gst-launch v4l2src ! queue ! videorate ! video/x-raw-yuv,fps=30,width=320 ! queue  ! theoraenc quality=60 ! queue ! muxout. jackaudiosrc connect=1 ! audioconvert ! audio/x-raw-int,rate=44100,channels=1,width=16 ! queue ! audioconvert ! vorbisenc ! queue ! muxout. oggmux name=muxout ! shout2send mount=/telecaster_live_video.ogg port=8000 password=source2parisson ip=127.0.0.1 &
+   
+#    
+    sleep 10
+    cat $file | oggfwd -d "TeleCaster Live Video Services" -g "Vocal"  -n "TeleCaster Live Video" localhost 8000 source2parisson /telecaster_live_video.ogg &
+   ;;
+ stop)
+   pkill -9 oggfwd
+   pkill -9 gst-launch-0.10
+   ;;
+esac
diff --git a/telecaster/tools/scripts/gst_video_jack_shout b/telecaster/tools/scripts/gst_video_jack_shout
new file mode 100755 (executable)
index 0000000..f5d25ba
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -e
+
+case "$1" in
+ start)
+   dir=/home/$USER/trash
+   dat=`date '+%y-%m-%d-%H:%M:%S'`
+   file=$dir/video_test_$dat.ogg
+
+#   gst-launch-0.10 v4l2src device=/dev/video0 ! queue ! videorate ! video/x-raw-yuv,width=320 ! queue  ! theoraenc quality=60 ! queue ! muxout. jackaudiosrc connect=1 ! audioconvert ! audio/x-raw-int,rate=44100,channels=1,width=16 ! queue ! audioconvert ! vorbisenc ! queue ! muxout. oggmux name=muxout ! filesink location=$file sync=true &
+   
+    gst-launch-0.10 v4l2src ! queue ! videorate ! video/x-raw-yuv,fps=30,width=320 ! queue  ! theoraenc quality=60 ! queue ! muxout. jackaudiosrc connect=1 ! audioconvert ! audio/x-raw-int,rate=44100,channels=1,width=16 ! queue ! audioconvert ! vorbisenc ! queue ! muxout. oggmux name=muxout ! shout2send mount=/telecaster_live_video.ogg port=8000 password=source2parisson ip=127.0.0.1 &
+   
+#    
+#    sleep 10
+#    cat $file | oggfwd -d "TeleCaster Live Video Services" -g "Vocal"  -n "TeleCaster Live Video" localhost 8000 source2parisson /telecaster_live_video.ogg &
+   ;;
+ stop)
+   pkill -9 oggfwd
+   pkill -9 gst-launch-0.10
+   ;;
+esac
diff --git a/telecaster/tools/scripts/gst_video_simple_ogg b/telecaster/tools/scripts/gst_video_simple_ogg
new file mode 100755 (executable)
index 0000000..af63af4
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+gst-launch v4l2src device=/dev/video0 ! video/x-raw-yuv,width=640, height=480 \
+       ! queue ! ffmpegcolorspace \
+       ! queue ! theoraenc quality=20 ! mux. \
+       alsasrc device=hw:0,0 ! audio/x-raw-int,rate=44100,channels=2,depth=16 \
+       !  queue ! audioconvert ! audio/x-raw-float,rate=44100,channels=2,depth=16 ! queue ! vorbisenc ! mux. \
+       oggmux name=mux ! filesink location=/var/www/test/test.ogg \
+
+# ! queue ! videorate ! video/x-raw-yuv, framerate=25/1 \
+#jackaudiosrc connect=1 ! queue ! audioconvert ! audio/x-raw-int,rate=44100,channels=1,width=16
\ No newline at end of file
diff --git a/telecaster/tools/scripts/gst_video_simple_ogg_jack b/telecaster/tools/scripts/gst_video_simple_ogg_jack
new file mode 100755 (executable)
index 0000000..69d2091
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+gst-launch v4l2src device=/dev/video0 ! video/x-raw-yuv,width=640, height=480 \
+       ! queue ! ffmpegcolorspace \
+       ! queue ! theoraenc quality=25 ! mux. \
+       jackaudiosrc connect=1 ! queue ! audioconvert ! queue ! vorbisenc ! mux. \
+       oggmux name=mux ! filesink location=/var/www/test/test.ogg \
+
+# ! queue ! videorate ! video/x-raw-yuv, framerate=25/1 \
diff --git a/telecaster/tools/scripts/gst_video_triple_shout b/telecaster/tools/scripts/gst_video_triple_shout
new file mode 100755 (executable)
index 0000000..d6aeec8
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+gst-launch v4l2src device=/dev/video0 ! queue ! videoscale ! video/x-raw-yuv, width=160, height=120 \
+       ! queue ! ffmpegcolorspace ! video/x-raw-rgb \
+       ! queue ! videomixer name=mix \
+               sink_1::xpos=40 sink_1::ypos=60 sink_1::alpha=0.9 sink_2::xpos=40 sink_2::ypos=180 sink_2::alpha=0.9 \
+       ! queue ! videoscale ! video/x-raw-rgb, width=480, height=270 \
+       ! queue ! ffmpegcolorspace ! theoraenc quality=10 ! oggmux name=muxout \
+       ! queue ! shout2send mount=/telecaster_live_video.ogg port=8000 password=source2parisson ip=127.0.0.1 \
+       ximagesrc ! queue ! videorate ! video/x-raw-rgb, framerate=30/1 ! videoscale ! video/x-raw-rgb, width=160, height=120 ! mix. \
+    v4l2src device=/dev/video1 ! queue ! ffmpegcolorspace ! video/x-raw-rgb ! videoscale ! video/x-raw-rgb, width=640, height=360 ! mix. \
\ No newline at end of file