--- /dev/null
+libmariadb-dev libcurl4-gnutls-dev liblo-dev cython python-pip libshout-dev
self.app_dir = os.getcwd()
self.user = 'telecaster'
self.home = '/home/' + self.user
- self.app_dir = os.path.dirname(__file__)
+ #self.app_dir = os.path.dirname(__file__)
self.rss_dir = '/var/www/rss'
self.m3u_dir = '/var/www/m3u'
self.stream_m_conf_dir = '/etc/stream-m'
self.init_dirs = ['/etc/init.d/', '/etc/default/']
self.daemons = ['jackd', 'telecaster', 'stream-m']
- self.apache_conf = '/etc/apache2/sites-available/telecaster.conf'
+ #self.apache_conf = '/etc/apache2/sites-available/telecaster.conf'
def create_user(self):
if not os.path.exists(self.home):
def install_deps(self):
os.system("""sudo aptitude install python python-dev python-xml python-libxml2 python-pip \
python-setuptools python-twitter python-liblo python-mutagen \
- icecast2 apache2 apache2-suexec jackd libjack-dev vorbis-tools procps meterbridge fluxbox \
+ icecast2 nginx uwsgi jackd libjack-dev vorbis-tools procps meterbridge fluxbox \
vnc4server vncviewer swh-plugins jack-rack libshout3 libshout3-dev libmad0-dev libogg-dev \
g++ python-yaml swatch""")
os.system('cp -r src/home/'+dir + '/* ' + home_dir)
self.chown(home_dir)
- shutil.copy('src'+self.apache_conf, self.apache_conf)
+ #shutil.copy('src'+self.apache_conf, self.apache_conf)
os.system('a2ensite telecaster.conf')
- os.system('/etc/init.d/apache2 reload')
+ #os.system('/etc/init.d/apache2 reload')
dir = '/etc/pm/'
os.system('cp -r src' + dir + '* ' + dir)
-def run():
+if __name__ == '__main__':
parser = OptionParser()
parser.add_option("-c", "--keepconf", dest="keepconf", default=False, action="store_true",
help="do NOT overwrite config files")
--- /dev/null
+# IMPORTANT: DO NOT COPY CONTENTS OF THIS FILE TO TEXT EDITOR IF VIEWING FROM WEB BROWSER, JUST SAVE THE FILE TO YOUR COMPUTER!!!
+# OR VIEW THIS FILE IN UNICODE (UTF-8) MODE IF YOU REALLY WANT TO COPY AND PASTE
+# OTHERWISE YOU WILL GET FORMATTING ERRORS AND THE FILE WILL NOT WORK
+#
+# The first configuration line will put the FastTrack Pro at device number 5 with 24bit mode, max. 48kHz sampling mode, 2 inputs and 4 outputs.
+#
+# The second configuration line will run the FastTrack pro also in 24 bit mode but with sampling rate above 48KHz (Only Playback mode works above this rates).
+# Probably good only for mastering at high resolution.
+#
+# Only uncomment one line (remove # at start of line) depending how you are going to use your FastTrack Pro
+# and remember to reboot your system for changes to take effect. Although the default setting should be good for recording and playback at the same time.
+#
+# Instead of rebooting you can also try unloading and reloading the snd-usb-audio module by doing the following in a terminal:
+#
+# MAKE SURE TO POWER OFF THE FAST TRACK PRO AND OTHER USB AUDIO DEVICES BEFORE RUNNING THE FOLLOWING COMMANDS
+# OR YOU WILL GET AN ERROR MESSAGE SAYING THAT THE SPECIFIC MODULE IS IN USE
+#
+# sudo modprobe -r snd-usb-audio
+# sudo modprobe snd-usb-audio
+#
+# If that doesn't work then just reboot to play it safe
+#
+# According to the patch, the possible values for the device_setup parameter are the sum of the following numbers:
+#
+# * 0×01 : use the device_setup parameter, always needed
+# * 0×02 : enable digital output (channels 3,4)
+# * 0×04 : use 48kHz-96kHz sampling rate, 8-48 kHz if not used
+# * 0×08 : 24bit sampling rate
+# * 0×10 : enable digital input (channels 3,4)
+
+#define MAUDIO_SET_24B_48K_DI 0x19 /* 24bits+48KHz+Digital Input */
+#define MAUDIO_SET_24B_48K_NOTDI 0x09 /* 24bits+48KHz+No Digital Input */
+#define MAUDIO_SET_16B_48K_DI 0x11 /* 16bits+48KHz+Digital Input */
+#define MAUDIO_SET_16B_48K_NOTDI 0x01 /* 16bits+48KHz+No Digital Input */
+#define MAUDIO_SET_COMPATIBLE 0x80 /* use only "win-compatible" interfaces */
+
+#===========================================================================================================================================
+#
+# CONFIGURATION LINES:
+
+#options snd-usb-audio index=3 vid=0x763 pid=0x2012 device_setup=0x12 enable=1
+#options snd-usb-audio index=2 vid=0x46d pid=0x81d enable=1
+#options snd-usb-audio index=3,2 vid=0x763,0x46d pid=0x2012,0x81d device_setup=0x09 enable=1
+#options snd_usb_audio vid=0x763 pid=0x2012 device_setup=0x5 index=5 enable=1
+
+options snd-hda-intel index=0
+
+# TC Audio card
+#options snd-usb-audio index=-2 nrpacks=1
+
+# M-Audio Fast Track Pro + Logitech C920 Pro
+#options snd-usb-audio index=3,2 vid=0x763,0x46d pid=0x2012,0x82d enable=1 nrpacks=1
+
+# Digigram UAX 220 Mic + Logitech
+#options snd-usb-audio index=3,2 vid=0x09ac,0x46d pid=0xd401,0x82d enable=1 nrpacks=1
+
+# Lexicon Omega + Logitech C920 Pro
+#options snd-usb-audio index=3,2 vid=0x1210,0x46d pid=0x0009,0x82d enable=1
+
+# Focusrite Scarlett 2i2 + Logitech C920 Pro
+options snd-usb-audio index=3,2 vid=0x1235,0x46d pid=0x8200,0x82d enable=1 nrpacks=1
# Audio channel
# ---------------------
-pid=`pgrep jack-rack`
-
-
-if [ ! $pid = "" ]; then
- sleep 1
-else
- jack-rack -n /etc/telecaster/jack-rack/eq_comp_limit_02.rack > /dev/null &
- sleep 3
-fi
-
-jack_connect system:capture_1 jack_rack:in_1
-jack_connect system:capture_2 jack_rack:in_2
-
qjackctl &
-/home/telecaster/.fluxbox/scripts/tc_audio_mp3_icecast.sh &
-#edcast_jack -c /etc/telecaster/edcast_jack_local.cfg -n lamemp3enc -p jack_rack > /dev/null &
-
-sleep 2
-
-jack_disconnect system:capture_1 gst-launch-0.10:in_jackaudiosrc0_1
-jack_disconnect system:capture_2 gst-launch-0.10:in_jackaudiosrc0_2
-
-jack_connect jack_rack:out_1 gst-launch-0.10:in_jackaudiosrc0_1
-jack_connect jack_rack:out_2 gst-launch-0.10:in_jackaudiosrc0_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 lamemp3enc:in_1
-#jack_connect jack_rack:out_2 lamemp3enc:in_2
-#jack_connect jack_rack:out_1 system:playback_1
-#jack_connect jack_rack:out_2 system:playback_2
-
- # 4 channels setup
- #jack_connect system:capture_1 jack_rack:in_1
- #jack_connect system:capture_1 jack_rack:in_2
- #jack_connect system:capture_2 jack_rack:in_1
- #jack_connect system:capture_2 jack_rack:in_2
- #jack_connect system:capture_3 jack_rack:in_1
- #jack_connect system:capture_4 jack_rack:in_2
-
-# ---------------------
-# Video channel
-# ---------------------
-
-/home/telecaster/.fluxbox/scripts/tc_video_simple_webm_stream.sh &
-
-sleep 2
-
-jack_disconnect system:capture_1 gst-launch-0.10-01:in_jackaudiosrc0_1
-jack_disconnect system:capture_2 gst-launch-0.10-01:in_jackaudiosrc0_2
+/home/telecaster/.fluxbox/scripts/tc_audio_mp3_icecast-gst1.sh &
-jack_connect jack_rack:out_1 gst-launch-0.10-01:in_jackaudiosrc0_1
-jack_connect jack_rack:out_2 gst-launch-0.10-01:in_jackaudiosrc0_2
+/home/telecaster/.fluxbox/scripts/tc_video_simple_webm_stream-gst1.sh &
sleep 8
#Video monitor
deefuzzer /etc/telecaster/deefuzzer/telecaster_webm_monitor.yaml &
-sleep 3
+#sleep 3
#Wathdog for trash
-/home/telecaster/.fluxbox/scripts/monitor_check.py 10 /home/telecaster/trash/webm/ smtp.icp.fr informatique@icp.fr alerts@parisson.com &
+#/home/telecaster/.fluxbox/scripts/monitor_check.py 10 /home/telecaster/trash/webm/ smtp.icp.fr informatique@icp.fr alerts@parisson.com &
--- /dev/null
+#!/bin/sh
+
+gst-launch-1.0 jackaudiosrc connect=1 ! audio/x-raw, format=F32LE, channels=1 \
+ ! queue ! audioconvert \
+ ! queue ! audiocheblimit mode=high-pass cutoff=120 poles=4 \
+ ! queue ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.25 ratio=4.0 \
+ ! queue ! audioconvert ! queue ! lamemp3enc quality=4.0 \
+ ! queue ! shout2send ip=127.0.0.1 port=8000 password=source2parisson mount=telecaster_live.mp3
+ > /dev/null
+
--- /dev/null
+#!/bin/sh
+
+# Start TeleCaster video channel
+
+#WIDTH=640
+#HEIGHT=360
+WIDTH=864
+HEIGHT=480
+#WIDTH=1280
+#HEIGHT=720
+FRAMERATE=24
+
+v4l2-ctl -d 0 -c power_line_frequency=1
+v4l2-ctl -d 0 -c zoom_absolute=100
+v4l2-ctl -d 0 -c focus_auto=0
+v4l2-ctl -d 0 -c focus_absolute=1
+
+# ! queue ! videoflip method=rotate-180 \
+
+gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, format=YUY2, width=$WIDTH, height=$HEIGHT, framerate=$FRAMERATE/1 \
+ ! queue ! videoconvert \
+ ! queue ! vp8enc threads=4 deadline=2 ! queue ! muxout. \
+ jackaudiosrc connect=1 ! audio/x-raw, format=F32LE, channels=1 \
+ ! queue ! audioconvert \
+ ! queue ! audiocheblimit mode=high-pass cutoff=120 poles=4 \
+ ! queue ! audiodynamic characteristics=soft-knee mode=compressor threshold=0.16 ratio=0.15 \
+ ! queue ! rgvolume pre-amp=6.0 headroom=1.0 \
+ ! queue ! rglimiter \
+ ! queue ! vorbisenc quality=0.4 ! queue ! muxout. \
+ webmmux streamable=true name=muxout \
+ ! queue ! tcpserversink host=127.0.0.1 port=9000 blocksize=65536 sync-method=1 \
+ > /dev/null