From: yomguy Date: Fri, 17 Feb 2012 10:47:59 +0000 (+0100) Subject: merge cgi changes X-Git-Tag: 1.0~64 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=99f5afa3fe81db0a79dbe1dcd0506d907cd2536c;p=telecaster-server.git merge cgi changes bugfix --- diff --git a/conf/etc/apache2/sites-available/telecaster.conf b/conf/etc/apache2/sites-available/telecaster.conf index 4859b3e..0a1c6fc 100644 --- a/conf/etc/apache2/sites-available/telecaster.conf +++ b/conf/etc/apache2/sites-available/telecaster.conf @@ -4,13 +4,13 @@ SuexecUserGroup telecaster telecaster - ErrorLog /var/log/apache2/error.log + ErrorLog /var/log/apache2/telecaster_error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn - CustomLog /var/log/apache2/access.log combined + CustomLog /var/log/apache2/telecaster_access.log combined ServerSignature On diff --git a/conf/etc/default/jackd b/conf/etc/default/jackd index 45509b2..3f50b45 100644 --- a/conf/etc/default/jackd +++ b/conf/etc/default/jackd @@ -5,5 +5,5 @@ START_DAEMON=yes USER=telecaster # Options to pass to jackd -OPTIONS="-dalsa -r44100 -p4096 -n3 -D -Chw:1,1 -Phw:1,0" +OPTIONS="-dalsa -r44100 -p1024 -n3 -Chw:3,1 -Phw:3,0" diff --git a/conf/etc/default/stream-m b/conf/etc/default/stream-m new file mode 100644 index 0000000..7b2c28a --- /dev/null +++ b/conf/etc/default/stream-m @@ -0,0 +1,9 @@ +# Set to "yes" to start stream-m at boot +START_DAEMON=yes + +# The jackd process will run under this user +USER=telecaster + +# Options to pass to jackd +OPTIONS="/etc/stream-m/server.conf" + diff --git a/conf/etc/icecast2/icecast.xml b/conf/etc/icecast2/icecast.xml new file mode 100644 index 0000000..7859b0f --- /dev/null +++ b/conf/etc/icecast2/icecast.xml @@ -0,0 +1,174 @@ + + + 100 + 20 + 16 + 524288 + 30 + 15 + 10 + + 1 + + 65536 + + + + + source2parisson + + hackme + + + admin + hackme + + + + + + + + + 127.0.0.1 + + + + 8000 + + + + + + + + + + + + + + + + + + 1 + + + + /usr/share/icecast2 + + + /var/log/icecast2 + /usr/share/icecast2/web + /usr/share/icecast2/admin + + + + + + + + + + access.log + error.log + + 3 + 10000 + + + + + + 0 + + + diff --git a/conf/etc/init.d/jackd b/conf/etc/init.d/jackd index 1c5f6f5..4c2aa07 100755 --- a/conf/etc/init.d/jackd +++ b/conf/etc/init.d/jackd @@ -10,7 +10,7 @@ DAEMON=/usr/bin/jackd -USER= +USER="" OPTIONS="" LOG=/var/log/jackd.log PIDFILE=/var/run/jackd.pid diff --git a/conf/etc/init.d/stream-m b/conf/etc/init.d/stream-m new file mode 100755 index 0000000..c693bd7 --- /dev/null +++ b/conf/etc/init.d/stream-m @@ -0,0 +1,83 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: stream-m +# Required-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: init-Script for system wide fetchmail daemon +### END INIT INFO + +DAEMON=/usr/local/bin/stream-m +USER="" +CONF="/etc/stream-m/server.conf" +LOG=/var/log/stream-m.log +PIDFILE=/var/run/stream-m.pid + +test -f /etc/default/stream-m || exit 0 +. /etc/default/stream-m + +STREAMMHOME=/home/$USER + +if [ ! "x$START_DAEMON" = "xyes" -a ! "$1" = "stop" ]; then + echo "Edit /etc/default/stream-m to start stream-m" + exit 0 +fi + +test -f $DAEMON || exit 0 + +. /lib/lsb/init-functions + +case "$1" in + start) + log_begin_msg "Starting stream-m video server:" "stream-m" + echo $DAEMON $CONF ' &' > $STREAMMHOME/.stream-m-init + chmod +x $STREAMMHOME/.stream-m-init + su -c $STREAMMHOME/.stream-m-init $USER > ${LOG} + sleep 2 + pid=`pgrep -u ${USER} stream-m` + if [ pid = '' ]; then + log_failure_msg "Stream-m daemon can't be started! Check logfile: ${LOG}" + else + echo $pid > $PIDFILE + fi + + ;; + stop) + log_begin_msg "Stopping stream-m video server:" "stream-m" + pid=`cat $PIDFILE | sed -e 's/\s.*//'|head -n1` + if [ ! pid = '' ]; then + kill -9 $pid + pkill -9 -f 'stream-m' + log_end_msg 0 + else + log_end_msg 1 + exit 1 + fi + rm $PIDFILE + ;; + try-restart) + if test -e $PIDFILE ; then + pid=`cat $PIDFILE | sed -e 's/\s.*//'|head -n1` + PIDDIR=/proc/$pid + if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then + $0 restart + exit 0 + fi + fi + test -f /etc/rc`/sbin/runlevel | cut -d' ' -f2`.d/S*stream-m* && $0 start + ;; + + *) + log_warning_msg "Usage: /etc/init.d/stream-m {start|stop|restart|force-reload|awaken|debug-run}" + log_warning_msg " start - starts system-wide stream-m service" + log_warning_msg " stop - stops system-wide stream-m service" + log_warning_msg " restart, force-reload - starts a new system-wide stream-m service" + log_warning_msg " awaken - tell system-wide stream-m to start a poll cycle immediately" + log_warning_msg " debug-run [strace [strace options...]] - start a debug run of the" + log_warning_msg " system-wide stream-m service, optionally running it under strace" + exit 1 + ;; +esac + +exit 0 diff --git a/conf/etc/init.d/vncserver b/conf/etc/init.d/vncserver index 9411a01..f087c80 100755 --- a/conf/etc/init.d/vncserver +++ b/conf/etc/init.d/vncserver @@ -49,8 +49,10 @@ case "$1" in log_begin_msg "Stopping vncserver audio server:" "vncserver" pid=`cat $PIDFILE | sed -e 's/\s.*//'|head -n1` if [ ! pid = '' ]; then - su -c "pkill -9 -f \"deefuzzer /etc/telecaster/deefuzzer_safe.xml\" " - su -c "pkill -9 edcast_jack" $USER + su -c "pkill -9 -f \"deefuzzer /etc/telecaster/deefuzzer_audio_safe.xml\" " + su -c "pkill -9 -f \"deefuzzer /etc/telecaster/deefuzzer_video_safe.xml\" " + su -c "pkill -9 edcast_jack" $USER + su -c "pkill -9 gst-launch-0.10" $USER sleep 1 su -c "vncserver -kill :$PORT" $USER log_end_msg 0 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/conf/etc/stream-m/server.conf b/conf/etc/stream-m/server.conf new file mode 100644 index 0000000..94bdbce --- /dev/null +++ b/conf/etc/stream-m/server.conf @@ -0,0 +1,22 @@ +# +# Sample configuration file +# Empty lines and lines starting with # and ; are ignored. +# Format: = +# Syntactic elements (words) can be separated by linear whitepace. +# + +# server.port +# listening port +server.port = 8080 + +# stream. +# if defined then a stream can be started with this name +streams.safe = true + +# stream..password +# determines the password to accept the stream +streams.safe.password = source2parisson + +# stream..limit +# maximum number of clients for this stream +streams.safe.limit = 10 diff --git a/conf/etc/telecaster/deefuzzer.xml b/conf/etc/telecaster/deefuzzer.xml index 746f8dd..3df370d 100644 --- a/conf/etc/telecaster/deefuzzer.xml +++ b/conf/etc/telecaster/deefuzzer.xml @@ -1,29 +1,30 @@ - /var/log/deefuzzer/telecaster.log - /var/www/m3u/telecaster.m3u + /var/log/deefuzzer/telecaster_safe.log + /var/www/m3u/telecaster_safe.m3u - telecaster_local - TeleCaster Localhost - TeleCaster local audio streaming + telecaster_live_safe + TeleCaster Localhost Live Safe Recorder + TeleCaster safe local live audio record http://parisson.com Vocal + icecast 127.0.0.1 8000 source2parisson 0 - /path/to/ogg - ogg - 64 - 4 + /home/telecaster/media/mp3 + mp3 + 96 + 7 44100 - 1 - 0 + 2 + 1 /var/www/rss @@ -46,38 +47,38 @@ 1 - http://127.0.0.1:8000/telecaster_live.ogg + http://127.0.0.1:8000/telecaster_live.mp3 Parisson 1 - /path/to/archives + /home/telecaster/trash - - telecaster - TeleCaster Remote - TeleCaster Remote + telecaster_live_safe + TeleCaster Localhost Live Safe Recorder + TeleCaster safe local live audio record http://parisson.com - School + Vocal - stream.parisson.com + icecast + parisson.com 8000 source2parisson 0 - /path/to/ogg - ogg + /home/telecaster/media/mp3 + mp3 96 - 4 + 7 44100 - 1 - 0 + 2 + 1 /var/www/rss @@ -95,20 +96,21 @@ 1 - 0 + 1 1235 1 - http://127.0.0.1:8000/telecaster_live.ogg + http://127.0.0.1:8000/telecaster_live.mp3 Parisson 0 - /path/to/archives + /home/telecaster/trash + diff --git a/conf/etc/telecaster/deefuzzer_audio_safe.xml b/conf/etc/telecaster/deefuzzer_audio_safe.xml new file mode 100644 index 0000000..23c8e2e --- /dev/null +++ b/conf/etc/telecaster/deefuzzer_audio_safe.xml @@ -0,0 +1,62 @@ + + /var/log/deefuzzer/telecaster_audio_safe.log + /var/www/m3u/telecaster_audio_safe.m3u + + + + 0 + 1236 + + + http://127.0.0.1:8000/telecaster_live.mp3 + 1 + Inconnu + + + 0 + mp3 + 1 + 4 + 48000 + 64 + /home/telecaster/media/mp3 + + + 4egZs1dSM37XVY8zXa016Yueku2fleXF2bx8k25V4 + 0 + 76728330-OjKgbHtn4II86Ad7pNUGEzfNAkGTW5Wvw38qUmLE + bla bla + + + icecast + 127.0.0.1 + 8000 + source2parisson + 0 + + + 1 + /home/telecaster/trash/mp3 + + + 1 + 0 + /path/to/jingles + + + http://parisson.com.com + Vocal + telecaster_audio_safe + telecaster_audio_safe + TeleCaster safe audio stream + + + 0 + /var/www/rss + http://my.domain.com/rss/ + + + + + + diff --git a/conf/etc/telecaster/deefuzzer_mp3.xml b/conf/etc/telecaster/deefuzzer_mp3.xml index 26d02eb..8e2be66 100644 --- a/conf/etc/telecaster/deefuzzer_mp3.xml +++ b/conf/etc/telecaster/deefuzzer_mp3.xml @@ -85,8 +85,8 @@ 0 - my_twitter_user - my_twitter_password + my_twitter_user + my_twitter_password bla bla diff --git a/conf/etc/telecaster/deefuzzer_ogg.xml b/conf/etc/telecaster/deefuzzer_ogg.xml index 2a774fb..522cfc3 100644 --- a/conf/etc/telecaster/deefuzzer_ogg.xml +++ b/conf/etc/telecaster/deefuzzer_ogg.xml @@ -85,8 +85,8 @@ 0 - my_twitter_user - my_twitter_password + my_twitter_user + my_twitter_password bla bla diff --git a/conf/etc/telecaster/deefuzzer_video.xml b/conf/etc/telecaster/deefuzzer_video.xml new file mode 100644 index 0000000..bd0db95 --- /dev/null +++ b/conf/etc/telecaster/deefuzzer_video.xml @@ -0,0 +1,329 @@ + + /var/log/deefuzzer/telecaster.log + /var/www/m3u/telecaster.m3u + + + + telecaster_local + TeleCaster Localhost + TeleCaster local audio streaming + http://parisson.com + Vocal + + + 127.0.0.1 + 8000 + source2parisson + 0 + + + /path/to/ogg + ogg + 64 + 4 + 44100 + 1 + 0 + + + /var/www/rss + 0 + + + 0 + 76728330-OjKgbHtn4II86Ad7pNUGEzfNAkGTW5Wvw38qUmLE + 4egZs1dSM37XVY8zXa016Yueku2fleXF2bx8k25V4 + bla bla + + + 0 + /path/to/jingles + 1 + + + 1 + 1234 + + + 1 + http://127.0.0.1:8000/telecaster_live.ogg + Parisson + + + 1 + /path/to/archives + + + + + + + telecaster + TeleCaster Remote + TeleCaster Remote + http://parisson.com + School + + + stream.parisson.com + 8000 + source2parisson + 0 + + + /path/to/ogg + ogg + 96 + 4 + 44100 + 1 + 0 + + + /var/www/rss + 0 + + + 0 + 76728330-OjKgbHtn4II86Ad7pNUGEzfNAkGTW5Wvw38qUmLE + 4egZs1dSM37XVY8zXa016Yueku2fleXF2bx8k25V4 + bla bla + + + 0 + /path/to/jingles + 1 + + + 0 + 1235 + + + 1 + http://127.0.0.1:8000/telecaster_live.ogg + Parisson + + + 0 + /path/to/archives + + + + + + + telecaster + TeleCaster Remote + TeleCaster Remote + http://parisson.com + School + + + stream.parisson.com + 8000 + source2parisson + 0 + + + /path/to/ogg + ogg + 96 + 4 + 44100 + 1 + 0 + + + /var/www/rss + 0 + + + 0 + 76728330-OjKgbHtn4II86Ad7pNUGEzfNAkGTW5Wvw38qUmLE + 4egZs1dSM37XVY8zXa016Yueku2fleXF2bx8k25V4 + bla bla + + + 0 + /path/to/jingles + 1 + + + 0 + 1235 + + + 1 + http://127.0.0.1:8000/telecaster_live.ogg + Parisson + + + 0 + /path/to/archives + + + + + + telecaster_video + TeleCaster Video Localhost + TeleCaster local video streaming + http://parisson.com + Vocal + + + 127.0.0.1 + 8000 + source2parisson + 0 + + + /path/to/ogg + ogg + 64 + 4 + 44100 + 1 + 0 + + + /var/www/rss + 0 + + + 0 + 76728330-OjKgbHtn4II86Ad7pNUGEzfNAkGTW5Wvw38qUmLE + 4egZs1dSM37XVY8zXa016Yueku2fleXF2bx8k25V4 + bla bla + + + 0 + /path/to/jingles + 1 + + + 1 + 1235 + + + 1 + http://127.0.0.1:8000/telecaster_live_video.ogg + Parisson + + + 1 + /path/to/archives + + + + + + + telecaster_video + TeleCaster Video Remote + TeleCaster Video Remote + http://parisson.com + School + + + stream.parisson.com + 8000 + source2parisson + 0 + + + /path/to/ogg + ogg + 96 + 4 + 44100 + 1 + 0 + + + /var/www/rss + 0 + + + 0 + 76728330-OjKgbHtn4II86Ad7pNUGEzfNAkGTW5Wvw38qUmLE + 4egZs1dSM37XVY8zXa016Yueku2fleXF2bx8k25V4 + bla bla + + + 0 + /path/to/jingles + 1 + + + 0 + 1235 + + + 1 + http://127.0.0.1:8000/telecaster_live_video.ogg + Parisson + + + 0 + /path/to/archives + + + + + + + telecaster + TeleCaster Remote + TeleCaster Remote + http://parisson.com + School + + + stream.parisson.com + 8000 + source2parisson + 0 + + + /path/to/ogg + ogg + 96 + 4 + 44100 + 1 + 0 + + + /var/www/rss + 0 + + + 0 + 76728330-OjKgbHtn4II86Ad7pNUGEzfNAkGTW5Wvw38qUmLE + 4egZs1dSM37XVY8zXa016Yueku2fleXF2bx8k25V4 + bla bla + + + 0 + /path/to/jingles + 1 + + + 0 + 1235 + + + 1 + http://127.0.0.1:8000/telecaster_live_video.ogg + Parisson + + + 0 + /path/to/archives + + + + + + diff --git a/conf/etc/telecaster/deefuzzer_video_local.xml b/conf/etc/telecaster/deefuzzer_video_local.xml new file mode 100644 index 0000000..30bf444 --- /dev/null +++ b/conf/etc/telecaster/deefuzzer_video_local.xml @@ -0,0 +1,113 @@ + + /var/log/deefuzzer/telecaster.log + /var/www/m3u/telecaster.m3u + + + + telecaster_video + TeleCaster Video Localhost + TeleCaster local video streaming + http://parisson.com + Vocal + + + 127.0.0.1 + 8000 + source2parisson + 0 + + + /home/telecaster/media/ogg + ogg + 64 + 4 + 44100 + 1 + 0 + + + /var/www/rss + 0 + + + 0 + 76728330-OjKgbHtn4II86Ad7pNUGEzfNAkGTW5Wvw38qUmLE + 4egZs1dSM37XVY8zXa016Yueku2fleXF2bx8k25V4 + bla bla + + + 0 + /path/to/jingles + 1 + + + 1 + 1234 + + + 1 + http://127.0.0.1:8000/telecaster_live_video.ogg + Parisson + + + 1 + /path/to/archives + + + + + + telecaster_video + TeleCaster Video Localhost + TeleCaster local video streaming + http://parisson.com + Vocal + + + stream.parisson.com + 8000 + source2parisson + 0 + + + /home/telecaster/media/ogg + ogg + 64 + 4 + 44100 + 1 + 0 + + + /var/www/rss + 0 + + + 0 + 76728330-OjKgbHtn4II86Ad7pNUGEzfNAkGTW5Wvw38qUmLE + 4egZs1dSM37XVY8zXa016Yueku2fleXF2bx8k25V4 + bla bla + + + 0 + /path/to/jingles + 1 + + + 0 + 1234 + + + 1 + http://127.0.0.1:8000/telecaster_live_video.ogg + Parisson + + + 0 + /path/to/archives + + + + + + diff --git a/conf/etc/telecaster/deefuzzer_video_safe.xml b/conf/etc/telecaster/deefuzzer_video_safe.xml new file mode 100644 index 0000000..d1bc791 --- /dev/null +++ b/conf/etc/telecaster/deefuzzer_video_safe.xml @@ -0,0 +1,62 @@ + + /var/log/deefuzzer/telecaster_video_safe.log + /var/www/m3u/telecaster_video_safe.m3u + + + + 0 + 1235 + + + http://127.0.0.1:9000/ + 1 + TeleCaster + + + 0 + webm + 1 + 4 + 48000 + 64 + /home/telecaster/media/webm + + + 4egZs1dSM37XVY8zXa016Yueku2fleXF2bx8k25V4 + 0 + 76728330-OjKgbHtn4II86Ad7pNUGEzfNAkGTW5Wvw38qUmLE + bla bla + + + stream-m + 127.0.0.1 + 8080 + source2parisson + 0 + + + 1 + /home/telecaster/trash/webm + + + 1 + 0 + /path/to/jingles + + + http://parisson.com.com + Vocal + safe + safe + TeleCaster safe video stream + + + 0 + /var/www/rss + http://my.domain.com/rss/ + + + + + + diff --git a/conf/etc/telecaster/edcast_jack_local.cfg b/conf/etc/telecaster/edcast_jack_local.cfg index 0cfe09d..16db86a 100644 --- a/conf/etc/telecaster/edcast_jack_local.cfg +++ b/conf/etc/telecaster/edcast_jack_local.cfg @@ -3,7 +3,7 @@ ServerType=Icecast2 Server=localhost Port=8000 ServerPassword=source2parisson -ServerMountpoint=/telecaster_live.ogg +ServerMountpoint=/telecaster_live.mp3 # YP (Stream Directory) Settings ServerPublic=0 ServerIRC= @@ -16,10 +16,10 @@ ServerGenre=Vocal AutomaticReconnectSecs=10 AutoConnect=1 # Output codec selection (Valid selections : MP3, OggVorbis, Ogg FLAC, AAC, AAC Plus) -Encode=OggVorbis +Encode=MP3 # General settings (non-codec related). Note : NumberChannels = 1 for MONO, 2 for STEREO NumberChannels=1 -Samplerate=44100 +Samplerate=48000 BitrateNominal=64 BitrateMin=32 BitrateMax=96 @@ -30,7 +30,7 @@ SaveDirectory=/home/telecaster/trash SaveAsWAV=0 # # Ogg Vorbis specific settings. Note: Valid settings for BitrateQuality flag are (Quality, Bitrate Management) -OggQuality=4 +OggQuality=3 OggBitrateQualityFlag=Quality # LAME specific settings. Note: Setting the low/highpass freq to 0 will disable them. LameCBRFlag=0 diff --git a/conf/etc/telecaster/telecaster.xml b/conf/etc/telecaster/telecaster.xml index 456fcc7..b6061f1 100644 --- a/conf/etc/telecaster/telecaster.xml +++ b/conf/etc/telecaster/telecaster.xml @@ -12,13 +12,13 @@ true - /home/telecaster/media/ogg + /home/telecaster/media/mp3 /home/telecaster/archives - ogg + mp3 64 1 4 - 44100 + 48000 diff --git a/conf/etc/telecaster/telecaster_pb.xml b/conf/etc/telecaster/telecaster_pb.xml index 08c3712..f76043c 100644 --- a/conf/etc/telecaster/telecaster_pb.xml +++ b/conf/etc/telecaster/telecaster_pb.xml @@ -3,22 +3,22 @@ Pre-Barreau Pre-Barreau La preparation au Barreau de Paris - telecaster-04.parisson.com + augustins.pre-barreau.com Vocal - /tmp/telecaster.log + /var/log/telecaster/telecaster.log /etc/telecaster/deefuzzer.xml true - /home/prebarreau/media - /home/prebarreau/archives + /home/pre-barreau/media/mp3 + /home/pre-barreau/archives mp3 96 1 3 - 44100 + 48000 @@ -26,7 +26,7 @@ - + CRFPA @@ -128,7 +128,7 @@ Oral-Procedures_communautaires - + Oral-Voies_d_ex @@ -137,6 +137,9 @@ Oral-Finances_publiques + + Conference-actualisation-septembre + TEST @@ -327,6 +330,7 @@ 13e_sem 14e_sem 15e_sem - 16e_sem + 16e_sem + diff --git a/conf/home/fluxbox/autostart.sh b/conf/home/fluxbox/autostart.sh index e67f098..6965012 100755 --- a/conf/home/fluxbox/autostart.sh +++ b/conf/home/fluxbox/autostart.sh @@ -1,34 +1,4 @@ #!/bin/sh -pid=`pgrep jack-rack` - -if [ ! $pid = "" ]; then - sleep 1 -else - jack-rack -n /etc/telecaster/eq_comp_limit_02.rack > /dev/null & - sleep 10 - jack_connect system:capture_1 jack_rack:in_1 - jack_connect system:capture_2 jack_rack:in_2 -fi - -qjackctl & - -edcast_jack -c /etc/telecaster/edcast_jack_local.cfg -n LIVE -p jack_rack > /dev/null & -sleep 3 - -# MONO setup -jack_disconnect jack_rack:out_2 LIVE:in_2 -jack_connect jack_rack:out_1 LIVE:in_1 -jack_connect jack_rack:out_1 LIVE:in_2 -jack_connect jack_rack:out_1 system:playback_1 -jack_connect jack_rack:out_1 system:playback_2 - - -# STEREO setup -#jack_connect jack_rack:out_1 LIVE:in_1 -#jack_connect jack_rack:out_2 LIVE:in_2 -#jack_connect jack_rack:out_1 system:playback_1 -#jack_connect jack_rack:out_2 system:playback_2 - -# Start safe DeeFuzzer -deefuzzer /etc/telecaster/deefuzzer_safe.xml > /dev/null & +sh ~/.fluxbox/tc_audio_start.sh & +sh ~/.fluxbox/tc_video_start.sh & diff --git a/conf/home/fluxbox/init b/conf/home/fluxbox/init index 25769d1..a47c424 100644 --- a/conf/home/fluxbox/init +++ b/conf/home/fluxbox/init @@ -1,37 +1,3 @@ -session.screen0.iconbar.mode: {static groups} (workspace) -session.screen0.tab.placement: Top -session.screen0.tab.width: 64 -session.screen0.tab.height: 16 -session.screen0.tabs.usePixmap: false -session.screen0.toolbar.onTop: False -session.screen0.toolbar.autoHide: False -session.screen0.toolbar.placement: BottomCenter -session.screen0.toolbar.widthPercent: 66 -session.screen0.slit.placement: RightBottom -session.screen0.slit.direction: Vertical -session.screen0.slit.onTop: False -session.screen0.slit.autoHide: False -session.screen0.edgeSnapThreshold: 0 -session.screen0.strftimeFormat: %k:%M -session.screen0.colPlacementDirection: TopToBottom -session.screen0.showwindowposition: true -session.screen0.rowPlacementDirection: LeftToRight -session.screen0.focusNewWindows: True -session.screen0.windowPlacement: RowSmartPlacement -session.screen0.rootCommand: sh ~/.fluxbox/autostart.sh -session.screen0.workspaces: 4 -session.screen0.focusModel: ClickToFocus -session.screen0.focusLastWindow: True -session.screen0.workspaceNames: one,two,three,four -session.screen0.fullMaximization: False -session.colorsPerChannel: 4 session.menuFile: ~/.fluxbox/menu -session.configVersion: 10 -session.doubleClickInterval: 250 -session.cacheLife: 5 -session.cacheMax: 200 -session.opaqueMove: False -session.styleFile: /usr/share/fluxbox/styles/BlueNight session.keyFile: ~/.fluxbox/keys -session.autoRaiseDelay: 250 -session.imageDither: True +session.configVersion: 13 diff --git a/conf/home/fluxbox/startup.ubuntu b/conf/home/fluxbox/startup.ubuntu index bd1a913..af2145a 100644 --- a/conf/home/fluxbox/startup.ubuntu +++ b/conf/home/fluxbox/startup.ubuntu @@ -27,33 +27,8 @@ fbpid=$! sleep 1 { -pid=`pgrep jack-rack` -if [ ! $pid = "" ]; then - sleep 1 -else - jack-rack -n /etc/telecaster/eq_comp_limit_02.rack > /dev/null & - sleep 10 - jack_connect system:capture_1 jack_rack:in_1 - jack_connect system:capture_2 jack_rack:in_2 -fi - -qjackctl & - -edcast_jack -c /etc/telecaster/edcast_jack_local.cfg -n LIVE -p jack_rack > /dev/null & -sleep 3 - -# MONO setup -jack_disconnect jack_rack:out_2 LIVE:in_2 -jack_connect jack_rack:out_1 LIVE:in_1 -jack_connect jack_rack:out_1 LIVE:in_2 - -# STEREO setup -#jack_connect jack_rack:out_1 LIVE:in_1 -#jack_connect jack_rack:out_2 LIVE:in_2 - -# Start safe DeeFuzzer -deefuzzer /etc/telecaster/deefuzzer_safe.xml > /dev/null & +sh ~/.fluxbox/autostart.sh } & diff --git a/conf/home/fluxbox/tc_audio_start.sh b/conf/home/fluxbox/tc_audio_start.sh new file mode 100755 index 0000000..b1fde28 --- /dev/null +++ b/conf/home/fluxbox/tc_audio_start.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +pid=`pgrep jack-rack` + +# Audio channel + +if [ ! $pid = "" ]; then + sleep 1 +else + jack-rack -n /etc/telecaster/eq_comp_limit_02.rack > /dev/null & + sleep 6 + jack_connect system:capture_1 jack_rack:in_1 + jack_connect system:capture_2 jack_rack:in_2 +fi + +qjackctl & + +edcast_jack -c /etc/telecaster/edcast_jack_local.cfg -n LIVE -p jack_rack > /dev/null & + +sleep 3 + +# MONO setup +jack_disconnect jack_rack:out_2 LIVE:in_2 +jack_connect jack_rack:out_1 LIVE:in_1 +jack_connect jack_rack:out_1 LIVE:in_2 +#jack_connect jack_rack:out_1 system:playback_1 +#jack_connect jack_rack:out_1 system:playback_2 + +# STEREO setup +#jack_connect jack_rack:out_1 LIVE:in_1 +#jack_connect jack_rack:out_2 LIVE:in_2 +#jack_connect jack_rack:out_1 system:playback_1 +#jack_connect jack_rack:out_2 system:playback_2 + +# Start safe DeeFuzzer +deefuzzer /etc/telecaster/deefuzzer_audio_safe.xml > /dev/null & diff --git a/conf/home/fluxbox/tc_video_start.sh b/conf/home/fluxbox/tc_video_start.sh new file mode 100755 index 0000000..07783ee --- /dev/null +++ b/conf/home/fluxbox/tc_video_start.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Start TeleCaster video channel + +/home/telecaster/.fluxbox/telecaster/tc_video_simple_webm_stream.sh > /dev/null & + +sleep 3 + +jack_disconnect system:capture_1 gst-launch-0.10:in_jackaudiosrc0_1 +jack_connect jack_rack:out_1 gst-launch-0.10:in_jackaudiosrc0_1 + +deefuzzer /etc/telecaster/deefuzzer_video_safe.xml > /dev/null & diff --git a/conf/home/fluxbox/telecaster/ffmpeg_dv_jack_fifo_shout b/conf/home/fluxbox/telecaster/ffmpeg_dv_jack_fifo_shout new file mode 100755 index 0000000..07075a1 --- /dev/null +++ b/conf/home/fluxbox/telecaster/ffmpeg_dv_jack_fifo_shout @@ -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/conf/home/fluxbox/telecaster/ffmpeg_usb_jack_fifo_shout b/conf/home/fluxbox/telecaster/ffmpeg_usb_jack_fifo_shout new file mode 100755 index 0000000..47fe2ed --- /dev/null +++ b/conf/home/fluxbox/telecaster/ffmpeg_usb_jack_fifo_shout @@ -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/conf/home/fluxbox/telecaster/gst_dv_jack_shout b/conf/home/fluxbox/telecaster/gst_dv_jack_shout new file mode 100755 index 0000000..ef59dfc --- /dev/null +++ b/conf/home/fluxbox/telecaster/gst_dv_jack_shout @@ -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/conf/home/fluxbox/telecaster/gst_video_double_shout b/conf/home/fluxbox/telecaster/gst_video_double_shout new file mode 100755 index 0000000..246d01e --- /dev/null +++ b/conf/home/fluxbox/telecaster/gst_video_double_shout @@ -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/conf/home/fluxbox/telecaster/gst_video_double_shout2.sh b/conf/home/fluxbox/telecaster/gst_video_double_shout2.sh new file mode 100755 index 0000000..cd25b51 --- /dev/null +++ b/conf/home/fluxbox/telecaster/gst_video_double_shout2.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# Start TeleCaster video channel + +WIDTH=480 +HEIGHT=270 + +gst-launch v4l2src device=/dev/video0 ! queue ! videoscale ! video/x-raw-yuv, width=160, height=120 \ + ! queue ! videorate ! video/x-raw-yuv,framerate=25/1 \ + ! queue ! videomixer name=mix sink_1::xpos=0 sink_1::ypos=0 sink_1::alpha=0.9 \ + ! queue ! ffmpegcolorspace ! queue ! theoraenc quality=25 ! muxout. \ + jackaudiosrc connect=1 ! audioconvert ! audio/x-raw-int,rate=44100,channels=1,width=16 \ + ! queue ! audioconvert ! vorbisenc ! queue ! muxout. \ + oggmux name=muxout ! queue ! shout2send mount=/telecaster_live_video.ogg port=8000 password=source2parisson ip=127.0.0.1 \ + v4l2src device=/dev/video1 ! queue ! videoscale ! video/x-raw-yuv, width=$WIDTH, height=$HEIGHT \ + ! queue ! videorate ! video/x-raw-yuv,framerate=25/1 ! mix. \ + > /dev/null & + +sleep 2 + +jack_disconnect system:capture_1 gst-launch-0.10:in_jackaudiosrc0_1 +jack_connect jack_rack:out_1 gst-launch-0.10:in_jackaudiosrc0_1 + diff --git a/conf/home/fluxbox/telecaster/gst_video_jack_fifo_shout b/conf/home/fluxbox/telecaster/gst_video_jack_fifo_shout new file mode 100755 index 0000000..1c19e27 --- /dev/null +++ b/conf/home/fluxbox/telecaster/gst_video_jack_fifo_shout @@ -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/conf/home/fluxbox/telecaster/gst_video_jack_shout b/conf/home/fluxbox/telecaster/gst_video_jack_shout new file mode 100755 index 0000000..f5d25ba --- /dev/null +++ b/conf/home/fluxbox/telecaster/gst_video_jack_shout @@ -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/conf/home/fluxbox/telecaster/gst_video_simple_ogg b/conf/home/fluxbox/telecaster/gst_video_simple_ogg new file mode 100755 index 0000000..af63af4 --- /dev/null +++ b/conf/home/fluxbox/telecaster/gst_video_simple_ogg @@ -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/conf/home/fluxbox/telecaster/gst_video_simple_ogg_jack b/conf/home/fluxbox/telecaster/gst_video_simple_ogg_jack new file mode 100755 index 0000000..69d2091 --- /dev/null +++ b/conf/home/fluxbox/telecaster/gst_video_simple_ogg_jack @@ -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/conf/home/fluxbox/telecaster/gst_video_triple_shout b/conf/home/fluxbox/telecaster/gst_video_triple_shout new file mode 100755 index 0000000..d6aeec8 --- /dev/null +++ b/conf/home/fluxbox/telecaster/gst_video_triple_shout @@ -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 diff --git a/conf/home/fluxbox/telecaster/tc_flu_simple_webm.sh b/conf/home/fluxbox/telecaster/tc_flu_simple_webm.sh new file mode 100755 index 0000000..e86ca98 --- /dev/null +++ b/conf/home/fluxbox/telecaster/tc_flu_simple_webm.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# Start TeleCaster video channel + +WIDTH=640 +HEIGHT=360 +#WIDTH=1024 +#HEIGHT=576 + + +pipe="v4l2src device=/dev/video0 \ + ! vp8-encoder ! muxout. \ + jackaudiosrc ! vorbis-encoder ! muxout. \ + webmmux streamable=true name=muxout" + +flumotion-launch pipeline-producer pipeline=$pipe ! http-streamer port=8800 + +sleep 2 + +jack_disconnect system:capture_1 flumotion-launch:in_jackaudiosrc0_1 +jack_connect jack_rack:out_1 flumotion-launch:in_jackaudiosrc0_1 + diff --git a/conf/home/fluxbox/telecaster/tc_video_simple_file.sh b/conf/home/fluxbox/telecaster/tc_video_simple_file.sh new file mode 100755 index 0000000..181dd2f --- /dev/null +++ b/conf/home/fluxbox/telecaster/tc_video_simple_file.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# Start TeleCaster video channel + +WIDTH=432 +HEIGHT=240 + +gst-launch v4l2src device=/dev/video0 ! video/x-raw-yuv, width=$WIDTH, height=$HEIGHT \ + ! queue ! ffmpegcolorspace \ + ! queue ! theoraenc bitrate=400 speed-level=0 ! queue ! muxout. \ + jackaudiosrc connect=1 \ + ! queue ! audioconvert ! queue ! vorbisenc ! queue ! muxout. \ + oggmux name=muxout ! filesink location=/home/telecaster/archives/test.ogg \ + > /dev/null & + +sleep 2 + +jack_disconnect system:capture_1 gst-launch-0.10:in_jackaudiosrc0_1 +jack_connect jack_rack:out_1 gst-launch-0.10:in_jackaudiosrc0_1 + diff --git a/conf/home/fluxbox/telecaster/tc_video_simple_file_webm.sh b/conf/home/fluxbox/telecaster/tc_video_simple_file_webm.sh new file mode 100755 index 0000000..d08dc06 --- /dev/null +++ b/conf/home/fluxbox/telecaster/tc_video_simple_file_webm.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# Start TeleCaster video channel + +WIDTH=640 +HEIGHT=360 +#WIDTH=1024 +#HEIGHT=576 + +gst-launch v4l2src device=/dev/video1 ! video/x-raw-yuv, width=$WIDTH, height=$HEIGHT \ + ! queue ! videoflip method=rotate-180 \ + ! queue ! ffmpegcolorspace \ + ! 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 ! filesink location=/home/telecaster/trash/test.webm \ + > /dev/null & + +sleep 2 + +jack_disconnect system:capture_1 gst-launch-0.10:in_jackaudiosrc0_1 +jack_connect jack_rack:out_1 gst-launch-0.10:in_jackaudiosrc0_1 + diff --git a/conf/home/fluxbox/telecaster/tc_video_simple_start.sh b/conf/home/fluxbox/telecaster/tc_video_simple_start.sh new file mode 100755 index 0000000..061e290 --- /dev/null +++ b/conf/home/fluxbox/telecaster/tc_video_simple_start.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# Start TeleCaster video channel + +WIDTH=432 +HEIGHT=240 + +gst-launch v4l2src device=/dev/video0 ! video/x-raw-yuv, width=$WIDTH, height=$HEIGHT \ + ! queue ! ffmpegcolorspace \ + ! queue ! theoraenc quality=10 ! queue ! muxout. \ + jackaudiosrc connect=1 \ + ! queue ! audioconvert ! queue ! vorbisenc quality=3 ! queue ! muxout. \ + oggmux name=muxout ! shout2send mount=/telecaster_live_video.ogg port=8000 password=source2parisson ip=127.0.0.1 \ + > /dev/null & + +sleep 2 + +jack_disconnect system:capture_1 gst-launch-0.10:in_jackaudiosrc0_1 +jack_connect jack_rack:out_1 gst-launch-0.10:in_jackaudiosrc0_1 + diff --git a/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream.sh b/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream.sh new file mode 100755 index 0000000..17bb6ea --- /dev/null +++ b/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# Start TeleCaster video channel + +WIDTH=320 +HEIGHT=240 +#WIDTH=1024 +#HEIGHT=576 + +gst-launch v4l2src device=/dev/video0 ! video/x-raw-yuv, width=$WIDTH, height=$HEIGHT \ + ! queue ! ffmpegcolorspace \ + ! queue ! vp8enc speed=2 threads=2 quality=9.0 ! queue ! muxout. \ + jackaudiosrc connect=1 \ + ! queue ! audioconvert ! queue ! vorbisenc quality=0.3 ! queue ! muxout. \ + webmmux streamable=true name=muxout \ + ! queue ! tcpserversink host=127.0.0.1 port=9000 protocol=none \ + > /dev/null + diff --git a/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_hd.sh b/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_hd.sh new file mode 100755 index 0000000..7afd26c --- /dev/null +++ b/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_hd.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# Start TeleCaster video channel + +WIDTH=1024 +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=5 ! queue ! muxout. \ + jackaudiosrc connect=1 \ + ! queue ! audioconvert ! queue ! vorbisenc quality=3 ! queue ! muxout. \ + 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 & + diff --git a/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_hd_alsa_test.sh b/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_hd_alsa_test.sh new file mode 100755 index 0000000..3894ae2 --- /dev/null +++ b/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_hd_alsa_test.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# Start TeleCaster video channel + +WIDTH=1280 +HEIGHT=720 + +gst-launch v4l2src device=/dev/video0 ! video/x-raw-yuv, width=$WIDTH, height=$HEIGHT \ + ! queue ! ffmpegcolorspace \ + ! queue ! vp8enc speed=2 threads=1 quality=9.0 ! queue ! muxout. \ + alsasrc \ + ! queue ! audioconvert ! queue ! vorbisenc quality=0.3 ! queue ! muxout. \ + webmmux streamable=true name=muxout \ + ! queue ! tcpserversink host=127.0.0.1 port=9000 protocol=none + + + diff --git a/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_hd_jack_test.sh b/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_hd_jack_test.sh new file mode 100755 index 0000000..0cfb252 --- /dev/null +++ b/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_hd_jack_test.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# Start TeleCaster video channel + +WIDTH=1280 +HEIGHT=720 + +gst-launch v4l2src device=/dev/video0 ! video/x-raw-yuv, width=$WIDTH, height=$HEIGHT \ + ! queue ! ffmpegcolorspace \ + ! queue ! vp8enc speed=2 threads=4 quality=9.0 ! queue ! muxout. \ + jackaudiosrc connect=1 \ + ! queue ! audioconvert ! queue ! vorbisenc quality=0.3 ! queue ! muxout. \ + webmmux streamable=true name=muxout \ + ! queue ! tcpserversink host=127.0.0.1 port=9000 protocol=none + + + diff --git a/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_hd_test.sh b/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_hd_test.sh new file mode 100755 index 0000000..8522473 --- /dev/null +++ b/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_hd_test.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Start TeleCaster video channel + +WIDTH=1280 +HEIGHT=720 + +gst-launch v4l2src device=/dev/video0 ! video/x-raw-yuv, width=$WIDTH, height=$HEIGHT \ + ! queue ! ffmpegcolorspace \ + ! queue ! vp8enc speed=2 threads=4 quality=9.0 \ + ! queue ! webmmux streamable=true name=muxout \ + ! queue ! tcpserversink host=127.0.0.1 port=9000 protocol=none + diff --git a/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_m.sh b/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_m.sh new file mode 100755 index 0000000..b4d8403 --- /dev/null +++ b/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_m.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +# Start TeleCaster video channel + +WIDTH=640 +HEIGHT=360 +#WIDTH=1024 +#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=5 ! queue ! muxout. \ + jackaudiosrc connect=1 \ + ! queue ! audioconvert ! queue ! vorbisenc quality=3 ! queue ! muxout. \ + webmmux streamable=true name=muxout \ + ! tee name=t ! queue ! multifdsink name=sink sync=false recover-policy=3 \ + t. ! queue ! filesink location=/home/telecaster/trash/test.webm \ + > /dev/null & + +sleep 2 + +jack_disconnect system:capture_1 gst-launch-0.10:in_jackaudiosrc0_1 +jack_connect jack_rack:out_1 gst-launch-0.10:in_jackaudiosrc0_1 + diff --git a/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_sd_test.sh b/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_sd_test.sh new file mode 100755 index 0000000..0fb2ce0 --- /dev/null +++ b/conf/home/fluxbox/telecaster/tc_video_simple_webm_stream_sd_test.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Start TeleCaster video channel + +WIDTH=800 +HEIGHT=600 + +gst-launch v4l2src device=/dev/video0 ! video/x-raw-yuv, width=$WIDTH, height=$HEIGHT \ + ! queue ! ffmpegcolorspace \ + ! queue ! vp8enc speed=2 threads=4 quality=9.0 \ + ! queue ! webmmux streamable=true name=muxout \ + ! queue ! tcpserversink host=127.0.0.1 port=9000 protocol=none + diff --git a/conf/home/fluxbox/telecaster/tc_video_simple_webm_tee.sh b/conf/home/fluxbox/telecaster/tc_video_simple_webm_tee.sh new file mode 100755 index 0000000..d006917 --- /dev/null +++ b/conf/home/fluxbox/telecaster/tc_video_simple_webm_tee.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +# Start TeleCaster video channel + +WIDTH=640 +HEIGHT=360 +#WIDTH=1024 +#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=9.0 ! queue ! muxout. \ + jackaudiosrc connect=1 \ + ! queue ! audioconvert ! queue ! vorbisenc quality=0.3 ! queue ! muxout. \ + webmmux streamable=true name=muxout \ + ! tee name=t ! queue ! tcpserversink host=127.0.0.1 port=9000 protocol=none \ + t. ! queue ! filesink location=/home/telecaster/trash/test.webm \ + > /dev/null & + +sleep 4 + +jack_disconnect system:capture_1 gst-launch-0.10:in_jackaudiosrc0_1 +jack_connect jack_rack:out_1 gst-launch-0.10:in_jackaudiosrc0_1 + diff --git a/conf/home/fluxbox/telecaster/x_jack_webm.sh b/conf/home/fluxbox/telecaster/x_jack_webm.sh new file mode 100755 index 0000000..8abeab6 --- /dev/null +++ b/conf/home/fluxbox/telecaster/x_jack_webm.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Start TeleCaster video channel + +gst-launch ximagesrc ! video/x-raw-rgb,framerate=30/1 \ + ! queue ! ffmpegcolorspace \ + ! queue ! vp8enc speed=2 threads=2 quality=9.0 ! queue ! muxout. \ + jackaudiosrc connect=1 \ + ! queue ! audioconvert ! queue ! vorbisenc quality=0.3 ! queue ! muxout. \ + webmmux streamable=true name=muxout \ + ! queue ! filesink location=/home/momo/tmp/desktop.webm + + diff --git a/conf/home/telecaster/media/mp3/silence.mp3 b/conf/home/telecaster/media/mp3/silence.mp3 new file mode 100644 index 0000000..17538c9 Binary files /dev/null and b/conf/home/telecaster/media/mp3/silence.mp3 differ diff --git a/conf/home/telecaster/media/ogg/silence.ogg b/conf/home/telecaster/media/ogg/silence.ogg new file mode 100644 index 0000000..5cfaddf Binary files /dev/null and b/conf/home/telecaster/media/ogg/silence.ogg differ diff --git a/conf/usr/local/bin/rotate_desktop b/conf/usr/local/bin/rotate_desktop new file mode 100755 index 0000000..3e6abf8 --- /dev/null +++ b/conf/usr/local/bin/rotate_desktop @@ -0,0 +1,12 @@ +#!/bin/bash + +xrandrout="$(xrandr)" + +case $xrandrout in + *1024x600+0+0\ inverted\ \(* ) rotate=0; invert=0;; + *1024x600+0+0\ \(* ) rotate=2; invert=1;; +esac + +xrandr -o $rotate +xinput --set-prop 11 "Evdev Axis Inversion" $invert, $invert + diff --git a/conf/usr/share/applications/rotate_desktop.desktop b/conf/usr/share/applications/rotate_desktop.desktop new file mode 100644 index 0000000..aa85a41 --- /dev/null +++ b/conf/usr/share/applications/rotate_desktop.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Rotate Desktop +Exec=/usr/local/bin/rotate_desktop +Icon=preferences-desktop-rotate +Type=Application +Comment=Rotate Desktop for 180 degrees with the touchscreen +GenericName=Rotate Desktop +Categories=Utility;Accessibility; +Terminal=false + diff --git a/conf/usr/share/icons/oxygen/128x128/apps/preferences-desktop-rotate.png b/conf/usr/share/icons/oxygen/128x128/apps/preferences-desktop-rotate.png new file mode 100644 index 0000000..bfb895a Binary files /dev/null and b/conf/usr/share/icons/oxygen/128x128/apps/preferences-desktop-rotate.png differ diff --git a/conf/usr/share/icons/oxygen/16x16/apps/preferences-desktop-rotate.png b/conf/usr/share/icons/oxygen/16x16/apps/preferences-desktop-rotate.png new file mode 100644 index 0000000..9462513 Binary files /dev/null and b/conf/usr/share/icons/oxygen/16x16/apps/preferences-desktop-rotate.png differ diff --git a/conf/usr/share/icons/oxygen/22x22/apps/preferences-desktop-rotate.png b/conf/usr/share/icons/oxygen/22x22/apps/preferences-desktop-rotate.png new file mode 100644 index 0000000..5fe835e Binary files /dev/null and b/conf/usr/share/icons/oxygen/22x22/apps/preferences-desktop-rotate.png differ diff --git a/conf/usr/share/icons/oxygen/32x32/apps/preferences-desktop-rotate.png b/conf/usr/share/icons/oxygen/32x32/apps/preferences-desktop-rotate.png new file mode 100644 index 0000000..a89a5fa Binary files /dev/null and b/conf/usr/share/icons/oxygen/32x32/apps/preferences-desktop-rotate.png differ diff --git a/conf/usr/share/icons/oxygen/48x48/apps/preferences-desktop-rotate.png b/conf/usr/share/icons/oxygen/48x48/apps/preferences-desktop-rotate.png new file mode 100644 index 0000000..5e909be Binary files /dev/null and b/conf/usr/share/icons/oxygen/48x48/apps/preferences-desktop-rotate.png differ diff --git a/conf/usr/share/icons/oxygen/64x64/apps/preferences-desktop-rotate.png b/conf/usr/share/icons/oxygen/64x64/apps/preferences-desktop-rotate.png new file mode 100644 index 0000000..0c96c53 Binary files /dev/null and b/conf/usr/share/icons/oxygen/64x64/apps/preferences-desktop-rotate.png differ diff --git a/conf/usr/share/icons/oxygen/8x8/apps/preferences-desktop-rotate.png b/conf/usr/share/icons/oxygen/8x8/apps/preferences-desktop-rotate.png new file mode 100644 index 0000000..e89cb80 Binary files /dev/null and b/conf/usr/share/icons/oxygen/8x8/apps/preferences-desktop-rotate.png differ diff --git a/telecaster/templates/telecaster/base.html b/telecaster/templates/telecaster/base.html index 6847a2e..5466147 100644 --- a/telecaster/templates/telecaster/base.html +++ b/telecaster/templates/telecaster/base.html @@ -32,8 +32,8 @@ function server_status_callback(){ refresh(); setInterval(refresh,d); } - catch(err){ - setInterval(refresh,d); + finally{ + } }; server_status_callback(); diff --git a/telecaster/tools/acpi.py b/telecaster/tools/acpi.py index 9d1b6ca..8d2fb06 100644 --- a/telecaster/tools/acpi.py +++ b/telecaster/tools/acpi.py @@ -6,7 +6,7 @@ ## Luc Sorgue and ## Rds and ## Guillaume Pellerin -## All rights reserved. +## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions @@ -18,7 +18,7 @@ ## notice, this list of conditions and the following disclaimer in the ## documentation and/or other materials provided with the distribution. ## 3. The name of the author may not be used to endorse or promote products -## derived from this software without specific prior written permission. +## derived from this software without specific prior written permission. ## ## THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR ## IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -86,7 +86,7 @@ class AcpiError(Exception): class Acpi: """Interface class for ACPI""" - + def __init__(self): res = sys.platform if res.find("freebsd4") > -1: @@ -96,28 +96,28 @@ class Acpi: elif res.find("netbsd1") > -1: self.acpi = None #throw exception raise AcpiError, ERR_NOT_IMPLEMENTED - + elif res.find("linux2") > -1: self.acpi = AcpiLinux() - + elif res.find("linux") > -1: #some systems return linux instead of linux2. We should #show a warning or check by ourselves for Linux2 self.acpi = AcpiLinux() - + else: self.acpi = None #throw exception (os unknown) raise AcpiError, ERR_NOT_IMPLEMENTED - + def identity(self): """Returns the identity of this module""" return "acpi.py" - + def version(self): """Returns the version of this module""" return VERSION - + def update(self): """Updates the ACPI state""" self.acpi.update() @@ -137,7 +137,7 @@ class Acpi: def charging_state(self): """Returns ac state (off-/online/charging)""" return self.acpi.charging_state() - + def estimated_lifetime(self): """Returns Estimated Lifetime as real number""" return self.acpi.estimated_lifetime() @@ -173,14 +173,17 @@ class AcpiLinux: """init ACPI class and check for any ACPI features in /proc/acpi/""" #we read all acpi stuff from here - self.proc_acpi_dir = "/proc/acpi" - #self.proc_acpi_dir = "/home/riemer/main/ACPI/proc/acpi" - + dirs = ['/proc/acpi/ibm'] + for dir in dirs: + if os.path.exists(dir): + self.proc_acpi_dir = dir + break + self.init_batteries() self.init_fans() #self.init_processors() self.init_temperatures() - + self.update() @@ -211,7 +214,7 @@ class AcpiLinux: except OSError: self.ac_line_state = ONLINE # no batteries: we assume that a cable is plugged in ;-) return #nothing more to do - + try: for i in battery_dir_entries: @@ -224,7 +227,7 @@ class AcpiLinux: # the batteries which we could stat # because the appended dirs should be okay we do not return here pass - + self.ac_line_state = OFFLINE #later: the newer acpi versions seems to generate always two BAT dirs... @@ -234,7 +237,7 @@ class AcpiLinux: #print self.proc_battery_dir + "/" + i + "/info" info_file = open(self.proc_battery_dir + "/" + i + "/info") line = info_file.readline() - + while len(line) != 0: if line.find("last full capacity:") == 0: cap = line.split(":")[1].strip() @@ -243,7 +246,7 @@ class AcpiLinux: except ValueError: #no value --> conversion to int failed self.design_capacity[i] = 0 - + line = info_file.readline() info_file.close() except IOError: @@ -291,21 +294,21 @@ class AcpiLinux: else: self.ac_line_state = ONLINE - # Read the present energy consumption to - # estimate life time + # Read the present energy consumption to + # estimate life time if line.find("present rate:") == 0: try: pr_rate = float(line.split(":")[1].strip().split("m")[0].strip()) except ValueError: pr_rate = 0 - + self.present_rate[i] = pr_rate line = state_file.readline() state_file.close() except IOError: - raise AcpiError, ERR_CONFIGURATION_CHANGED + raise AcpiError, ERR_CONFIGURATION_CHANGED # maybe we should restart init_batteries instead of generating an error ? # the user may have unplugged the battery. @@ -313,12 +316,12 @@ class AcpiLinux: # I prefer raising an exception because we would run into a recursion of # member funcs what is not a good idea. # the case that this error occurs should be very rare - + def init_temperatures(self): """Initializes temperature stuff""" - self.proc_thermal_dir = self.proc_acpi_dir + "/thermal_zone" + self.proc_thermal_dir = self.proc_acpi_dir # empty list implies no thermal feature supported self.temperatures = {} @@ -334,8 +337,7 @@ class AcpiLinux: try: for i in thermal_dir_entries: - mode = os.stat(self.proc_thermal_dir + "/" + i)[stat.ST_MODE] - if stat.S_ISDIR(mode): + if i == 'thermal': self.thermal_dir_entries.append(i) except OSError: # the thermal module is not correctly loaded, or is broken. @@ -348,17 +350,17 @@ class AcpiLinux: try: for i in self.thermal_dir_entries: - file = open(self.proc_thermal_dir + "/" + i + "/temperature") + file = open(self.proc_thermal_dir + "/" + i) line = file.readline() while len(line) != 0: if line.find("temperature") == 0: - self.temperatures[i] = line.split(":")[1].strip() + self.temperatures[i] = line.split(":")[1].strip().split(' ')[0] line = file.readline() file.close() except IOError: raise AcpiError,ERR_CONFIGURATION_CHANGED - + def init_fans(self): """Initialize fans""" @@ -383,11 +385,11 @@ class AcpiLinux: # the fan module is not correctly loaded, or is broken. # because the appended dirs should be okay we do not return here pass - + def update_fans(self): """Read current state of fans""" - + try: for i in self.fan_dir_entries: file = open(self.proc_fan_dir + "/" + i + "/state") @@ -445,7 +447,7 @@ class AcpiLinux: self.processor_dir_entries = [] self.perf_states = {} #reset list --> should we throw an exception? No! return - + def update_processors(self): """Read current state of processors""" @@ -475,7 +477,7 @@ class AcpiLinux: if design_capacity == 0: return 0 - + # should we use try catch instead of the check above? return (life_capacity * 100) / design_capacity @@ -490,11 +492,11 @@ class AcpiLinux: def nb_of_batteries(self): #returns the number of batteries - #if it returns 0, maybe ACPI is not available or + #if it returns 0, maybe ACPI is not available or #battery driver is not loaded return len(self.battery_dir_entries) - + def charging_state(self): return self.ac_line_state @@ -536,7 +538,7 @@ class AcpiLinux: # TODO: adapt it for multiple CPUs def set_frequency(self, f): #I think we should throw exceptions if someone goes wrong here - + if self.perf_states.has_key(f): state = self.perf_states[f] try: @@ -544,11 +546,11 @@ class AcpiLinux: except OSError: raise AcpiError, ERR_NOT_ALLOWED - try: + try: f = open("/proc/acpi/processor/"+pr+"/performance","w") except IOError: raise AcpiError, ERR_NOT_ALLOWED - + f.write(state) f.close() else: