From: yomguy <> Date: Fri, 26 Nov 2010 13:04:53 +0000 (+0000) Subject: add videos ffmpeg scripts, prepare OGG by default X-Git-Tag: 0.9~163 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=a6116a895caad13f38fa9018af7e6ad8555ccbe5;p=telecaster-client.git add videos ffmpeg scripts, prepare OGG by default --- diff --git a/conf/etc/telecaster/edcast_jack_local.cfg b/conf/etc/telecaster/edcast_jack_local.cfg deleted file mode 100644 index 1638c6e..0000000 --- a/conf/etc/telecaster/edcast_jack_local.cfg +++ /dev/null @@ -1,53 +0,0 @@ -# Destination server details (to where you are encoding). Valid server types : Shoutcast, Icecast, Icecast2 -ServerType=Icecast2 -Server=localhost -Port=8000 -ServerPassword=source2parisson -ServerMountpoint=/telecaster_live.mp3 -# YP (Stream Directory) Settings -ServerPublic=0 -ServerIRC= -ServerAIM= -ServerICQ= -ServerStreamURL=http://parisson.com -ServerName=TeleCaster LIVE -ServerDescription=Local LIVE media streaming broadcast -ServerGenre=Vocal -AutomaticReconnectSecs=10 -AutoConnect=1 -# Output codec selection (Valid selections : MP3, OggVorbis, Ogg FLAC, AAC, AAC Plus) -Encode=MP3 -# General settings (non-codec related). Note : NumberChannels = 1 for MONO, 2 for STEREO -NumberChannels=1 -Samplerate=44100 -BitrateNominal=64 -BitrateMin=32 -BitrateMax=96 - -# -SaveDirectoryFlag=0 -SaveDirectory=/home/telecaster/trash -SaveAsWAV=0 -# -# Ogg Vorbis specific settings. Note: Valid settings for BitrateQuality flag are (Quality, Bitrate Management) -OggQuality=3 -OggBitrateQualityFlag=Quality -# LAME specific settings. Note: Setting the low/highpass freq to 0 will disable them. -LameCBRFlag=0 -LameQuality=5 -LameCopywrite=0 -LameOriginal=0 -LameStrictISO=0 -LameDisableReservior=0 -LameVBRMode=vbr_abr -LameLowpassfreq=0 -LameHighpassfreq=0 -LAMEPreset=0 -# AAC (FAAC) specific settings. -AACQuality=100 -AACCutoff= -# Log Level 1 = LOG_ERROR, 2 = LOG_ERROR+LOG_WARNING, 3 = LOG_ERROR+LOG_WARNING+LOG_DEBUG -LogLevel=1 -# Log File -LogFile=/tmp/telecaster_streamer_log - diff --git a/conf/etc/telecaster/edcast_jack_local_mp3.cfg b/conf/etc/telecaster/edcast_jack_local_mp3.cfg new file mode 100644 index 0000000..1638c6e --- /dev/null +++ b/conf/etc/telecaster/edcast_jack_local_mp3.cfg @@ -0,0 +1,53 @@ +# Destination server details (to where you are encoding). Valid server types : Shoutcast, Icecast, Icecast2 +ServerType=Icecast2 +Server=localhost +Port=8000 +ServerPassword=source2parisson +ServerMountpoint=/telecaster_live.mp3 +# YP (Stream Directory) Settings +ServerPublic=0 +ServerIRC= +ServerAIM= +ServerICQ= +ServerStreamURL=http://parisson.com +ServerName=TeleCaster LIVE +ServerDescription=Local LIVE media streaming broadcast +ServerGenre=Vocal +AutomaticReconnectSecs=10 +AutoConnect=1 +# Output codec selection (Valid selections : MP3, OggVorbis, Ogg FLAC, AAC, AAC Plus) +Encode=MP3 +# General settings (non-codec related). Note : NumberChannels = 1 for MONO, 2 for STEREO +NumberChannels=1 +Samplerate=44100 +BitrateNominal=64 +BitrateMin=32 +BitrateMax=96 + +# +SaveDirectoryFlag=0 +SaveDirectory=/home/telecaster/trash +SaveAsWAV=0 +# +# Ogg Vorbis specific settings. Note: Valid settings for BitrateQuality flag are (Quality, Bitrate Management) +OggQuality=3 +OggBitrateQualityFlag=Quality +# LAME specific settings. Note: Setting the low/highpass freq to 0 will disable them. +LameCBRFlag=0 +LameQuality=5 +LameCopywrite=0 +LameOriginal=0 +LameStrictISO=0 +LameDisableReservior=0 +LameVBRMode=vbr_abr +LameLowpassfreq=0 +LameHighpassfreq=0 +LAMEPreset=0 +# AAC (FAAC) specific settings. +AACQuality=100 +AACCutoff= +# Log Level 1 = LOG_ERROR, 2 = LOG_ERROR+LOG_WARNING, 3 = LOG_ERROR+LOG_WARNING+LOG_DEBUG +LogLevel=1 +# Log File +LogFile=/tmp/telecaster_streamer_log + 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 + + + + +