]> git.parisson.com Git - telecaster-cgi.git/commitdiff
hacking usb video streaming
authoryomguy <yomguy@parisson.com>
Thu, 10 Mar 2011 16:10:29 +0000 (16:10 +0000)
committeryomguy <yomguy@parisson.com>
Thu, 10 Mar 2011 16:10:29 +0000 (16:10 +0000)
tools/ffmpeg_dv_jack_fifo_usb

index f8da11b6bf6a6c6f1db9969cc910c65119f27587..a04f7713c243c532a87fcf110f56659e31fe4ead 100755 (executable)
@@ -1,25 +1,26 @@
 #!/bin/bash
 
-set -e
+    set -e
 
 case "$1" in
  start)
-   fifo=/tmp/video_fifo
+   fifo=/tmp/video_fifo2
    if [ ! -e $fifo ]; then
    mkfifo $fifo
    fi
 
-   dir=$HOME/archives/2010/VIDEOS/
+   dir=$HOME/archives/2011
    now=`date -R`
+   file=$dir/video_test2.ogg
 
-   ffmpeg -f video4linux2 -i /dev/video1 -f jack -i ffmpeg -f ogg -r 20 -s 320x240 -vcodec libtheora -b 364k -acodec libvorbis -ab 64k -y $fifo -map 0.0 -map 1.0 &
+   ffmpeg -f video4linux2 -i /dev/video0 -f jack -i ffmpeg -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 5
+   sleep 3
    jack_connect jack_rack:out_1 ffmpeg:input_1
    #jack_connect jack_rack:out_1 ffmpeg:input_2
 
-   sleep 1
-   cat $fifo | tee "$dir/video_test-$now.ogg" | oggfwd -d "TeleCaster Live Video Services" -g "Vocal"  -n "TeleCaster Live Video" localhost 8000 source2parisson /telecaster_live_video.ogg &
+   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)