From a6116a895caad13f38fa9018af7e6ad8555ccbe5 Mon Sep 17 00:00:00 2001
From: yomguy <>
Date: Fri, 26 Nov 2010 13:04:53 +0000
Subject: [PATCH] add videos ffmpeg scripts, prepare OGG by default
---
...ck_local.cfg => edcast_jack_local_mp3.cfg} | 0
conf/etc/telecaster/telecaster_mp3.xml | 333 ++++++++++++++++++
conf/etc/telecaster/telecaster_ogg.xml | 333 ++++++++++++++++++
telecaster.py | 19 +-
tools/ffmpeg_dv_jack_fifo_fw | 37 ++
tools/ffmpeg_dv_jack_fifo_usb | 35 ++
6 files changed, 752 insertions(+), 5 deletions(-)
rename conf/etc/telecaster/{edcast_jack_local.cfg => edcast_jack_local_mp3.cfg} (100%)
create mode 100644 conf/etc/telecaster/telecaster_mp3.xml
create mode 100644 conf/etc/telecaster/telecaster_ogg.xml
create mode 100755 tools/ffmpeg_dv_jack_fifo_fw
create mode 100755 tools/ffmpeg_dv_jack_fifo_usb
diff --git a/conf/etc/telecaster/edcast_jack_local.cfg b/conf/etc/telecaster/edcast_jack_local_mp3.cfg
similarity index 100%
rename from conf/etc/telecaster/edcast_jack_local.cfg
rename to conf/etc/telecaster/edcast_jack_local_mp3.cfg
diff --git a/conf/etc/telecaster/telecaster_mp3.xml b/conf/etc/telecaster/telecaster_mp3.xml
new file mode 100644
index 0000000..1d0eeaf
--- /dev/null
+++ b/conf/etc/telecaster/telecaster_mp3.xml
@@ -0,0 +1,333 @@
+
+
+ Parisson
+ Parisson
+ TeleCaster Services
+ telecaster.parisson.com
+ Various
+
+ /var/log/telecaster/telecaster.log
+
+ /etc/telecaster/deefuzzer.xml
+
+
+ true
+ /home/telecaster/media/mp3
+ /home/telecaster/archives
+ mp3
+ 96
+ 1
+ 3
+ 44100
+
+
+
+ jack_rack:out_1
+
+
+
+
+ CRFPA
+
+
+ Droit_administratif_Corrections
+
+
+ Droit_administratif_Cours
+
+
+ Droit_des_obligations_Corrections
+
+
+ Droit_des_obligations_Cours
+
+
+ Droit_commercial_des_affaires_Corrections
+
+
+ Droit_commercial_des_affaires_Cours
+
+
+ Droit_communautaire_et_europeen_Corrections
+
+
+ Droit_communautaire_et_europeen_Cours
+
+
+ Droit_de_la_famille_et_des_personnes_Corrections
+
+
+ Droit_de_la_famille_et_des_personnes_Cours
+
+
+ Droit_du_travail_Corrections
+
+
+ Droit_du_travail_Cours
+
+
+ Droit_fiscal_Corrections
+
+
+ Droit_fiscal_Cours
+
+
+ Droit_international_prive_Corrections
+
+
+ Droit_international_prive_Cours
+
+
+ Droit_patrimonial_Corrections
+
+
+ Droit_patrimonial_Cours
+
+
+ Droit_public_des_activites_economiques_Corrections
+
+
+ Droit_public_des_activites_economiques_Cours
+
+
+ Droit_penal_Corrections
+
+
+ Droit_penal_Cours
+
+
+ Droit_Libertes_publiques_Cours
+
+
+ Note_de_synthese_Corrections
+
+
+ Procedure_administrative_et_contentieuse_Corrections
+
+
+ Procedure_administrative_et_contentieuse_Cours
+
+
+ Procedure_civile_Corrections
+
+
+ Procedure_civile_Cours
+
+
+ Procedures_collectives_et_suretes_Corrections
+
+
+ Procedures_collectives_et_suretes_Cours
+
+
+ Procedure_penale_Corrections
+
+
+ Procedure_penale_Cours
+
+
+ Oral-Procedures_communautaires
+
+
+ Oral-Voies_d_ex
+
+
+ Oral-Comptabilite_privee
+
+
+ Oral-Finances_publiques
+
+
+ TEST
+
+
+
+
+
+
+ AE
+
+
+ Administratif_Cours
+
+
+ Adm_Correction
+
+
+ Civil_Correction
+
+
+ Commercial_Correctio
+
+
+ Commercial_Cours
+
+
+ Deontologie_Cours
+
+
+ Droit civil - Cours
+
+
+ Methodo_Oraux
+
+
+ Penal_Correction
+
+
+ Penal_Cours
+
+
+ Procedures_Cours
+
+
+ Reunion_info
+
+
+ Social_Corrections
+
+
+ Social_Cours
+
+
+ REUNION
+
+
+ TEST
+
+
+
+
+
+ ENM
+
+
+ TEST
+
+
+ REUNION
+
+
+
+
+
+
+ FJP
+
+
+ Actualisation
+
+
+ TEST
+
+
+ REUNION
+
+
+
+
+
+ MARINHO A.
+
+
+ GIUSTINIANI G.
+
+
+ BOFFA R.
+
+
+ MEUNIER J.
+
+
+ THERY C.
+
+
+ JLB
+
+
+ AZZI T.
+
+
+ ETIENNEY A.
+
+
+ MARKUS J.
+
+
+ ANDREU L.
+
+
+ ROUMIER W.
+
+
+ HAIK R.
+
+
+ POISSON S.
+
+
+ CARTIER-BRESSON A.
+
+
+ MBONGO P.
+
+
+ MATHONNET P.
+
+
+ FOULQUIER N.
+
+
+ RILOV. F
+
+
+ JEANSEN E.
+
+
+ LA J.
+
+
+ MECARELLI G.
+
+
+ COLLET M.
+
+
+ GILBERT S.
+
+
+ VIAL C.
+
+
+ PAGNERRE E.
+
+
+ PANOU C.
+
+
+ GILBERT S.
+
+
+ ROBBE S.
+
+
+
+ 1ere_sem
+ 2e_sem
+ 3e_sem
+ 4e_sem
+ 5e_sem
+ 6e_sem
+ 7e_sem
+ 8e_sem
+ 9e_sem
+ 10e_sem
+ 11e_sem
+ 12e_sem
+ 13e_sem
+ 14e_sem
+ 15e_sem
+ 16e_sem
+
+
+
diff --git a/conf/etc/telecaster/telecaster_ogg.xml b/conf/etc/telecaster/telecaster_ogg.xml
new file mode 100644
index 0000000..1d0eeaf
--- /dev/null
+++ b/conf/etc/telecaster/telecaster_ogg.xml
@@ -0,0 +1,333 @@
+
+
+ Parisson
+ Parisson
+ TeleCaster Services
+ telecaster.parisson.com
+ Various
+
+ /var/log/telecaster/telecaster.log
+
+ /etc/telecaster/deefuzzer.xml
+
+
+ true
+ /home/telecaster/media/mp3
+ /home/telecaster/archives
+ mp3
+ 96
+ 1
+ 3
+ 44100
+
+
+
+ jack_rack:out_1
+
+
+
+
+ CRFPA
+
+
+ Droit_administratif_Corrections
+
+
+ Droit_administratif_Cours
+
+
+ Droit_des_obligations_Corrections
+
+
+ Droit_des_obligations_Cours
+
+
+ Droit_commercial_des_affaires_Corrections
+
+
+ Droit_commercial_des_affaires_Cours
+
+
+ Droit_communautaire_et_europeen_Corrections
+
+
+ Droit_communautaire_et_europeen_Cours
+
+
+ Droit_de_la_famille_et_des_personnes_Corrections
+
+
+ Droit_de_la_famille_et_des_personnes_Cours
+
+
+ Droit_du_travail_Corrections
+
+
+ Droit_du_travail_Cours
+
+
+ Droit_fiscal_Corrections
+
+
+ Droit_fiscal_Cours
+
+
+ Droit_international_prive_Corrections
+
+
+ Droit_international_prive_Cours
+
+
+ Droit_patrimonial_Corrections
+
+
+ Droit_patrimonial_Cours
+
+
+ Droit_public_des_activites_economiques_Corrections
+
+
+ Droit_public_des_activites_economiques_Cours
+
+
+ Droit_penal_Corrections
+
+
+ Droit_penal_Cours
+
+
+ Droit_Libertes_publiques_Cours
+
+
+ Note_de_synthese_Corrections
+
+
+ Procedure_administrative_et_contentieuse_Corrections
+
+
+ Procedure_administrative_et_contentieuse_Cours
+
+
+ Procedure_civile_Corrections
+
+
+ Procedure_civile_Cours
+
+
+ Procedures_collectives_et_suretes_Corrections
+
+
+ Procedures_collectives_et_suretes_Cours
+
+
+ Procedure_penale_Corrections
+
+
+ Procedure_penale_Cours
+
+
+ Oral-Procedures_communautaires
+
+
+ Oral-Voies_d_ex
+
+
+ Oral-Comptabilite_privee
+
+
+ Oral-Finances_publiques
+
+
+ TEST
+
+
+
+
+
+
+ AE
+
+
+ Administratif_Cours
+
+
+ Adm_Correction
+
+
+ Civil_Correction
+
+
+ Commercial_Correctio
+
+
+ Commercial_Cours
+
+
+ Deontologie_Cours
+
+
+ Droit civil - Cours
+
+
+ Methodo_Oraux
+
+
+ Penal_Correction
+
+
+ Penal_Cours
+
+
+ Procedures_Cours
+
+
+ Reunion_info
+
+
+ Social_Corrections
+
+
+ Social_Cours
+
+
+ REUNION
+
+
+ TEST
+
+
+
+
+
+ ENM
+
+
+ TEST
+
+
+ REUNION
+
+
+
+
+
+
+ FJP
+
+
+ Actualisation
+
+
+ TEST
+
+
+ REUNION
+
+
+
+
+
+ MARINHO A.
+
+
+ GIUSTINIANI G.
+
+
+ BOFFA R.
+
+
+ MEUNIER J.
+
+
+ THERY C.
+
+
+ JLB
+
+
+ AZZI T.
+
+
+ ETIENNEY A.
+
+
+ MARKUS J.
+
+
+ ANDREU L.
+
+
+ ROUMIER W.
+
+
+ HAIK R.
+
+
+ POISSON S.
+
+
+ CARTIER-BRESSON A.
+
+
+ MBONGO P.
+
+
+ MATHONNET P.
+
+
+ FOULQUIER N.
+
+
+ RILOV. F
+
+
+ JEANSEN E.
+
+
+ LA J.
+
+
+ MECARELLI G.
+
+
+ COLLET M.
+
+
+ GILBERT S.
+
+
+ VIAL C.
+
+
+ PAGNERRE E.
+
+
+ PANOU C.
+
+
+ GILBERT S.
+
+
+ ROBBE S.
+
+
+
+ 1ere_sem
+ 2e_sem
+ 3e_sem
+ 4e_sem
+ 5e_sem
+ 6e_sem
+ 7e_sem
+ 8e_sem
+ 9e_sem
+ 10e_sem
+ 11e_sem
+ 12e_sem
+ 13e_sem
+ 14e_sem
+ 15e_sem
+ 16e_sem
+
+
+
diff --git a/telecaster.py b/telecaster.py
index a95ea82..655097b 100755
--- a/telecaster.py
+++ b/telecaster.py
@@ -91,15 +91,24 @@ class TeleCaster:
if deefuzzer_pid == [] and form.has_key("action") and \
form.has_key("department") and form.has_key("conference") and \
- form.has_key("professor") and form.has_key("comment") and \
- form["action"].value == "start":
-
+ form.has_key("session") and form["action"].value == "start":
+
+ if not form.has_key("professsor"):
+ professor = 'Inconnu'
+ else:
+ professor = form.getfirst("professor")
+
+ if not form.has_key("comment"):
+ comment = 'Non'
+ else:
+ form.getfirst("comment")
+
self.conference_dict = {'title': self.title,
'department': form.getfirst("department"),
'conference': form.getfirst("conference"),
'session': form.getfirst("session"),
- 'professor': form.getfirst("professor"),
- 'comment': form.getfirst("comment")}
+ 'professor': professor,
+ 'comment': comment}
s = Station(self.conf_file, self.conference_dict, self.lock_file)
s.start()
diff --git a/tools/ffmpeg_dv_jack_fifo_fw b/tools/ffmpeg_dv_jack_fifo_fw
new file mode 100755
index 0000000..07075a1
--- /dev/null
+++ b/tools/ffmpeg_dv_jack_fifo_fw
@@ -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/tools/ffmpeg_dv_jack_fifo_usb b/tools/ffmpeg_dv_jack_fifo_usb
new file mode 100755
index 0000000..f8da11b
--- /dev/null
+++ b/tools/ffmpeg_dv_jack_fifo_usb
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+set -e
+
+case "$1" in
+ start)
+ fifo=/tmp/video_fifo
+ if [ ! -e $fifo ]; then
+ mkfifo $fifo
+ fi
+
+ dir=$HOME/archives/2010/VIDEOS/
+ now=`date -R`
+
+ 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 &
+
+ sleep 5
+ 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 &
+ ;;
+
+ stop)
+ jack_disconnect jack_rack:out_1 ffmpeg:input_1
+# jack_disconnect jack_rack:out_1 ffmpeg:input_2
+ pkill -9 ffmpeg
+ ;;
+esac
+
+
+
+
+
--
2.39.5