As always, just a bunch of changes
parent
921a3f486d
commit
5d9a3afdfc
|
@ -35,5 +35,7 @@ RUN mkdir $GOPATH && cd /tools/de-ip-hdmi && go get -d . && go build . && chmod
|
|||
# Patch netcat!
|
||||
RUN sed -i -e 's_NC\=.*_NC="nc -q1"_' /usr/local/lib/Snowmix-0.5.1/scripts/snowmix-settings
|
||||
|
||||
RUN apt-get install -y --no-install-recommends gstreamer1.0-pulseaudio
|
||||
|
||||
USER snowmix
|
||||
CMD [ "/tools/run-snowmix" ]
|
||||
|
|
|
@ -62,25 +62,25 @@ class SnowmixClient(object):
|
|||
|
||||
self.fd.write(command + '\r\n')
|
||||
self.fd.flush()
|
||||
except socket.error:
|
||||
|
||||
while True:
|
||||
line = self.fd.readline()
|
||||
|
||||
if not line:
|
||||
raise Exception('Remote host closed socket')
|
||||
|
||||
if expect and line.startswith(expect):
|
||||
line = line[len(expect):].strip()
|
||||
if not line:
|
||||
return
|
||||
|
||||
yield line
|
||||
except Exception:
|
||||
if self.reconnect:
|
||||
self.connect(self.host, self.port)
|
||||
|
||||
raise
|
||||
|
||||
while True:
|
||||
line = self.fd.readline()
|
||||
|
||||
if not line:
|
||||
raise Exception('Remote host closed socket')
|
||||
|
||||
if expect and line.startswith(expect):
|
||||
line = line[len(expect):].strip()
|
||||
if not line:
|
||||
return
|
||||
|
||||
yield line
|
||||
|
||||
def tcl(self, code):
|
||||
return parse_tcl(next(
|
||||
self.call('tcl eval snowmix message [%s]' % code), ''))
|
||||
|
|
|
@ -176,6 +176,14 @@ audio feed mute off 3
|
|||
#audio feed volume 3 128
|
||||
audio feed delay 3 50
|
||||
|
||||
audio feed add 4 Audio 4
|
||||
audio feed channels 4 2
|
||||
audio feed rate 4 44100
|
||||
audio feed format 4 16 signed
|
||||
audio feed mute off 4
|
||||
#audio feed volume 3 128
|
||||
audio feed delay 4 50
|
||||
|
||||
audio mixer add 1 Main Live Mixer
|
||||
audio mixer channels 1 2
|
||||
audio mixer rate 1 44100
|
||||
|
@ -183,9 +191,11 @@ audio mixer mute off 1
|
|||
audio mixer source feed 1 1
|
||||
audio mixer source feed 1 2
|
||||
audio mixer source feed 1 3
|
||||
audio mixer source feed 1 4
|
||||
audio mixer source mute off 1 1
|
||||
audio mixer source mute off 1 2
|
||||
audio mixer source mute off 1 3
|
||||
audio mixer source mute off 1 4
|
||||
|
||||
# Dummy sink
|
||||
audio sink add 0 Dummy Audio
|
||||
|
|
|
@ -26,8 +26,8 @@ system frame rate 30
|
|||
tcl eval set system(framerate) 30
|
||||
|
||||
# Set output parameter (mode=1 direct, mode=2 simple threaded, mode=2 timed threaded)
|
||||
system output mode 2
|
||||
system output delay 4
|
||||
system output mode 0
|
||||
system output delay 10
|
||||
system output buffers 60
|
||||
|
||||
# Set output control socket
|
||||
|
|
|
@ -101,5 +101,17 @@ services:
|
|||
network_mode: host
|
||||
ipc: host
|
||||
|
||||
sound-capture:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- sockets:/run/snowmix
|
||||
- ./tools:/tools
|
||||
command: /tools/pulse2feed 3 'alsa_output.pci-0000_00_0f.0.analog-stereo.monitor'
|
||||
network_mode: host
|
||||
ipc: host
|
||||
environment:
|
||||
- SNOWMIX_IP=10.8.0.95
|
||||
- PULSE_SERVER=sound.waw.hackerspace.pl
|
||||
volumes:
|
||||
sockets:
|
||||
|
|
|
@ -79,4 +79,4 @@ echo 'audio feed ctr isaudio '$feed_id
|
|||
$gstlaunch -v fdsrc ! audio/x-raw,rate=48000,channels=2,format=S32BE ! \
|
||||
queue ! audioconvert ! audioresample ! audiorate ! \
|
||||
$AUDIOFORMAT ! fdsink fd=3 sync=true 3>&1 1>&2
|
||||
) | nc -N $SNOWMIX_IP $SNOWMIX_PORT
|
||||
) | nc -q0 $SNOWMIX_IP $SNOWMIX_PORT
|
||||
|
|
|
@ -133,6 +133,11 @@ audiosink=1
|
|||
VIDEOSRC='shmsrc socket-path='$ctrsocket' do-timestamp=true is-live=true'
|
||||
AUDIOSRC="fdsrc fd=0 do-timestamp=true"
|
||||
|
||||
SINK=fakesink
|
||||
[ "$youtube_auth1" != "bazinga" ] && SINK="rtmpsink location=\"$location\""
|
||||
|
||||
echo SINK: $SINK
|
||||
|
||||
( echo "audio sink ctr isaudio $audiosink" ) | \
|
||||
/bin/nc $SNOWMIX_IP $SNOWMIX_PORT | \
|
||||
(head -1
|
||||
|
@ -142,12 +147,14 @@ AUDIOSRC="fdsrc fd=0 do-timestamp=true"
|
|||
$VIDEOSRC !\
|
||||
$VIDEOFORMAT !\
|
||||
$VIDEOCONVERT !\
|
||||
queue ! \
|
||||
$videoencoder !\
|
||||
$ENCVIDEOFORMAT !\
|
||||
tee name=encvid ! \
|
||||
queue ! \
|
||||
mux. $AUDIOSRC !\
|
||||
$AUDIOFORMAT !\
|
||||
queue ! \
|
||||
audioconvert ! audioresample ! audiorate ! \
|
||||
queue !\
|
||||
$audioencoder !\
|
||||
|
@ -156,8 +163,8 @@ AUDIOSRC="fdsrc fd=0 do-timestamp=true"
|
|||
flvmux streamable=true name=mux !\
|
||||
tee name=mirror !\
|
||||
queue !\
|
||||
rtmpsink location="$location" \
|
||||
encvid. ! rtph264pay config-interval=1 pt=96 ! udpsink host=janus port=8004 \
|
||||
$SINK \
|
||||
encvid. ! queue ! rtph264pay config-interval=1 pt=96 ! udpsink host=janus port=8004 \
|
||||
mirror. ! queue ! tcpserversink port=20001 host=0.0.0.0
|
||||
exit 1
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue