#!/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)