Cleaning commented out code.
[libre-streamer.git] / stream_2014.sh
CommitLineData
af3a72cf
LMM
1#!/usr/bin/env bash
2# This file is part of Libre-Streamer.
3#
4# Libre-Streamer is free software: you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation, either version 3 of the License, or
7# (at your option) any later version.
8#
9# Libre-Streamer is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with Libre-Streamer. If not, see <http://www.gnu.org/licenses/>.
16#
17# Copyright (C) 2014 Lisa Marie Maginnis
18# Copyright (C) 2014 Nico Cesar
19
20. ./params.sh
21
22export DISPLAY=$screentarget.0
23export XAUTHORITY=$HOME/.Xauthority
24
25# omghax (ugly)
26if [ "$DISPLAY" = ":0.0.0" ]; then
27 export DISPLAY=:0.0
28fi
29
30##echo loading configuration...
31##./upload_config.sh $IP $CONFIG_FILE /etc/autocampars.xml
32##RESULT=$?
33##
34##if [ $RESULT -ne 0 ]
35##then
36## exit 1
37##fi
38##./upload_config.sh $IP $CONFIG_NET /etc/conf.d/net.eth0
39
40if [ $SOUND ]
41then
42gst-launch-0.10 -e rtspsrc location=rtsp://$IP:554 protocols=0x00000001 latency=100 !\
43 rtpjpegdepay ! queue max-size-bytes=$BUFFERSIZE max-size-time=0 !\
44 videorate force-fps=$FPS !\
45 queue max-size-bytes=$BUFFERSIZE max-size-time=0 !\
46 jpegdec max-errors=-1 idct-method=2 !\
47 queue max-size-bytes=$BUFFERSIZE max-size-time=0 !\
48 ffmpegcolorspace !\
49 "video/x-raw-yuv, format=(fourcc)I420" !\
50 queue max-size-bytes=$BUFFERSIZE max-size-time=0 !\
51 videoscale !\
52 "video/x-raw-yuv, width=$WIDTH, height=$HEIGHT" !\
53 queue max-size-bytes=$BUFFERSIZE max-size-time=0 !\
54 videomixer name=mix !\
55 queue max-size-bytes=$BUFFERSIZE max-size-time=0 !\
56 theoraenc bitrate=200 speed-level=1 !\
57 queue max-size-bytes=$BUFFERSIZE max-size-time=0 !\
58 oggmux name=mux alsasrc latency-time=100 device=$SOUND !\
59 audioconvert ! audio/x-raw-float,channels=1 !\
60 queue max-size-bytes=$BUFFERSIZE max-size-time=0 !\
61 vorbisenc max-bitrate=60000 !\
62 queue max-size-bytes=$BUFFERSIZE max-size-time=0 !\
63 mux. mux. !\
64 shout2send ip=$SERVER port=80 password=$PASSWORD mount=$MOUNTPOINT ximagesrc use-damage=false show-pointer=false remote=true display-name=$screentarget $endx !\
65 queue max-size-bytes=$BUFFERSIZE max-size-time=0 !\
66 ffmpegcolorspace !\
67 queue max-size-bytes=$BUFFERSIZE max-size-time=0 !\
68 videoscale !\
69 "video/x-raw-yuv, width=$WIDTH, height=$HEIGHT" !\
70 queue max-size-bytes=$BUFFERSIZE max-size-time=0 !\
71 videobox border-alpha=0 fill=black left=-$WIDTH !\
72 videorate force-fps=$FPS1 !\
73 mix.
74fi