change audio/video layout, add mkv streamdump

master
informatic 2019-02-22 15:02:56 +01:00
parent 2923613767
commit da756f728a
5 changed files with 32 additions and 18 deletions

View File

@ -152,7 +152,7 @@ audio mixer verbose 0
audio sink verbose 0 audio sink verbose 0
audio feed add 1 Audio 1 audio feed add 1 Audio 1
audio feed channels 1 1 audio feed channels 1 2
audio feed rate 1 44100 audio feed rate 1 44100
audio feed format 1 16 signed audio feed format 1 16 signed
audio feed mute off 1 audio feed mute off 1
@ -161,7 +161,7 @@ audio feed mute off 1
audio feed delay 1 50 audio feed delay 1 50
audio feed add 2 Audio 2 audio feed add 2 Audio 2
audio feed channels 2 1 audio feed channels 2 2
audio feed rate 2 44100 audio feed rate 2 44100
audio feed format 2 16 signed audio feed format 2 16 signed
audio feed mute off 2 audio feed mute off 2

View File

@ -85,7 +85,7 @@ tcl eval set scene(setactivesilent) 1
tcl eval SceneSetBackground 0 1 tcl eval SceneSetBackground 0 1
# Scene 1 # Scene 1
tcl eval SceneCreate "Fullscreen" 1 tcl eval SceneCreate "Fullscreen 1" 1
#tcl eval SceneAddFrame 1 1 0 0 1280 720 #tcl eval SceneAddFrame 1 1 0 0 1280 720
tcl eval SceneAddFrame 1 2 1410 20 480 270 tcl eval SceneAddFrame 1 2 1410 20 480 270
tcl eval SceneSetFrameSource 1 1 feed 2 0 1 tcl eval SceneSetFrameSource 1 1 feed 2 0 1
@ -93,6 +93,15 @@ tcl eval SceneSetFrameSource 1 1 feed 1 1 1
tcl eval SceneSetFrameSource 1 2 feed 2 1 1 tcl eval SceneSetFrameSource 1 2 feed 2 1 1
tcl eval SceneSetBackground 1 1 tcl eval SceneSetBackground 1 1
# Scene 2
tcl eval SceneCreate "Fullscreen 2" 2
tcl eval SceneAddFrame 2 1 0 0 1920 1080
tcl eval SceneAddFrame 2 2 1410 20 480 270
tcl eval SceneSetFrameSource 2 1 feed 2 0 1
tcl eval SceneSetFrameSource 2 1 feed 1 1 1
tcl eval SceneSetFrameSource 2 2 feed 2 1 1
tcl eval SceneSetBackground 2 1
tcl eval SceneSetState 0 1 tcl eval SceneSetState 0 1
include ini/streaming-audio include ini/streaming-audio

View File

@ -32,10 +32,11 @@ services:
volumes: volumes:
- sockets:/run/snowmix - sockets:/run/snowmix
- ./tools:/tools:ro - ./tools:/tools:ro
- /storage:/storage
environment: environment:
- SNOWMIX_YOUTUBE_SECRET - SNOWMIX_YOUTUBE_SECRET
ports: ports:
- 20001:20001 - 20000-20010:20000-20010
command: /tools/output2cdn-base command: /tools/output2cdn-base
ipc: host ipc: host
# FIXME workaround for janus staying in host network ;_; # FIXME workaround for janus staying in host network ;_;
@ -101,17 +102,17 @@ services:
network_mode: host network_mode: host
ipc: host ipc: host
sound-capture: # sound-capture:
build: . # build: .
restart: unless-stopped #restart: unless-stopped
volumes: #volumes:
- sockets:/run/snowmix #- sockets:/run/snowmix
- ./tools:/tools #- ./tools:/tools
command: /tools/pulse2feed 3 'alsa_output.pci-0000_00_0f.0.analog-stereo.monitor' #command: /tools/pulse2feed 3 'alsa_output.pci-0000_00_0f.0.analog-stereo.monitor'
network_mode: host #network_mode: host
ipc: host #ipc: host
environment: #environment:
- SNOWMIX_IP=10.8.0.95 #- SNOWMIX_IP=10.8.0.95
- PULSE_SERVER=sound.waw.hackerspace.pl #- PULSE_SERVER=sound.waw.hackerspace.pl
volumes: volumes:
sockets: sockets:

View File

@ -159,13 +159,17 @@ echo SINK: $SINK
queue !\ queue !\
$audioencoder !\ $audioencoder !\
$ENCAUDIOFORMAT !\ $ENCAUDIOFORMAT !\
tee name=encaudio ! \
queue !\ queue !\
flvmux streamable=true name=mux !\ flvmux streamable=true name=mux !\
tee name=mirror !\ tee name=mirror !\
queue !\ queue !\
$SINK \ $SINK \
encvid. ! queue ! rtph264pay config-interval=1 pt=96 ! udpsink host=janus port=8004 \ encvid. ! queue ! rtph264pay config-interval=1 pt=96 ! udpsink host=janus port=8004 \
mirror. ! queue ! tcpserversink port=20001 host=0.0.0.0 mirror. ! queue ! tcpserversink port=20001 host=0.0.0.0 \
encvid. ! queue ! previewmux. encaudio. ! queue ! previewmux. \
matroskamux name=previewmux streamable=true ! tee name=mkvdump ! queue ! tcpserversink port=20002 host=0.0.0.0 \
mkvdump. ! queue ! filesink location="/storage/streamdump-$(date +%Y%m%d_%H%M%S).mkv"
exit 1 exit 1
) )
#fakesink \ #fakesink \

View File

@ -72,7 +72,7 @@ snowmix=snowmix
if [ X$snowmix != X ] ; then if [ X$snowmix != X ] ; then
( (
echo 'audio feed ctr isaudio '$feed_id echo 'audio feed ctr isaudio '$feed_id
$gstlaunch -q $SRC ! queue ! audioconvert ! audioresample ! audiorate ! $AUDIOFORMAT ! fdsink fd=1 sync=true $gstlaunch -q $SRC ! queue ! audioconvert ! audioresample ! audiorate ! $AUDIOFORMAT ! queue ! fdsink fd=1 sync=false
) | nc $SNOWMIX_IP $SNOWMIX_PORT ) | nc $SNOWMIX_IP $SNOWMIX_PORT
else else
echo Snowmix is not running. Quitting $0 echo Snowmix is not running. Quitting $0