Created
September 15, 2010 01:49
-
-
Save comtom/580118 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # firewire device (dv cam or twinpact) | |
| # ==================================== | |
| # dvsource-dvgrab - collects parameters from command line and config files, connects stdout to dvswitch, shells out to dvgrab which sends dv stream to stdout, thus dvswitch. | |
| # | |
| # The use running dvsource-dvgrab will need read/write permission on the /dev/raw1394 node. This can be done by putting both in the video group: | |
| # | |
| # # /etc/udev/rules.d/91-permissions.rules | |
| # # ieee1394 devices | |
| # KERNEL=="raw1394", GROUP="video" | |
| # | |
| # $ sudo adduser $USUARIO video | |
| # | |
| # file | |
| # ==== | |
| # dvsource-file - connects to dvswitch, reads from a file, sends to dvswitch. | |
| # | |
| # | |
| # Command to send a stream to http://giss.tv: | |
| # =========================================== | |
| # dvsink-command -- ffmpeg2theora - -f dv -F 25:5 -v 1 -a 5 -c 1 -H 11025 -o - | oggfwd giss.tv 8000 $CARLFKPW /CarlFK.ogg | |
| # dvsink-command -- ffmpeg2theora - -f dv -F 25:5 --speedlevel 0 -v 4 -a 0 -c 1 -H 9600 -o - | oggfwd giss.tv 8000 $PASSWORD /gulbac.ogg | |
| # Name of the location from which we are recording | |
| VENUE_NAME="ADUM" | |
| # Sources and sinks | |
| SOURCES="firewire:localhost" | |
| SINKS="file:localhost" | |
| # IP de esta maquina | |
| MIXER_HOST=127.0.0.1 | |
| MIXER_PORT=9000 | |
| # Icecast streaming server parameters | |
| ICECAST_ADDR=giss.tv | |
| ICECAST_PORT=8000 | |
| ICECAST_PASS=hackme | |
| # Stream encoding parameters | |
| VIDEO_STREAM_WIDTH=320 | |
| VIDEO_STREAM_HEIGHT=240 | |
| VIDEO_STREAM_KBPS=230 | |
| AUDIO_STREAM_HZ=32000 | |
| AUDIO_STREAM_KBPS=64 | |
| # File store base directory | |
| FILE_BASE="/video" | |
| # ejecutamos dvswitch y aguantamos a que conecten los sources | |
| dvswitch -h $MIXER_HOST -p $MIXER_PORT & sleep 2 | |
| # cargamos la camara | |
| dvsource-firewire -h $MIXER_HOST -p $MIXER_PORT -c 0 & | |
| # cargamos el video de intro | |
| #dvsource-file -h $MIXER_HOST -p $MIXER_PORT intro.dv & | |
| # cargamos el video con los sponsors | |
| #dvsource-file -h $MIXER_HOST -p $MIXER_PORT chivos.dv & | |
| # guardamos los videos en /video/dv/... | |
| #dvsink-files -h $MIXER_HOST -p $MIXER_PORT "'$FILE_BASE/dv/%Y-%m-%d/SFD/%H:%M:%S.dv'" & | |
| ######## de backup - NO TOCAR :P ####################### | |
| #dvsink-command -h $MIXER_HOST -p $MIXER_PORT -- ffmpeg2theora - -f dv -F 25:5 --speedlevel 0 -v 4 -a 0 -c 1 -H 9600 -o - | oggfwd giss.tv 8000 j06qg /gulbac.ogg | |
| #dvsink-command -h $MIXER_HOST -p $MIXER_PORT -- ffmpeg2theora - -f dv -F 25:5 -v 1 -a 5 -c 1 -H 11025 -o - | oggfwd giss.tv 8000 j06qg /gulbac.ogg | |
| ######################################################## | |
| dvsink-command -h $MIXER_HOST -p $MIXER_PORT -- ffmpeg2theora -o - -f dv - -V $VIDEO_STREAM_KBPS -x $VIDEO_STREAM_WIDTH -y $VIDEO_STREAM_HEIGHT --aspect 4:3 --deinterlace -A $AUDIO_STREAM_KBPS -c 1 -H $AUDIO_STREAM_HZ --artist "'gulBAC video team'" --date "'$(date +%Y-%m-%d)'" --location "'$VENUE_NAME'" --organization "'gulBAC'" --copyright "'gulBAC video team'" | oggfwd $ICECAST_ADDR $ICECAST_PORT $ICECAST_PASS /gulbac.ogg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment