VLC mosaic config

From Hackerspace ACKspace
Revision as of 21:13, 18 August 2019 by Xopr (talk | contribs) (projecterified due to (new) github repo)
Jump to: navigation, search
Project: VLC mosaic config
Featured: No
State Active
Members xopr
GitHub pausenkatzen
Description
Picture
No project picture! Fill in form Picture or Upload a jpeg here


We're streaming hacker conferences and camps several years now, and every year something new is added. The update with the most impact was in December 2014: "let's try multicast". This year xopr is trying to automate his ridiculous video spamming with his "pausenkatzen" project. For the people that didn't grew up in the 70's or 80's with German television: Pausenkatzen is a placeholder video (with playing cats) when there is no actual content. Nowadays it's probably erotic contact ads and horoscope TV.

Note: Below is the original working (static) config


pausenkatzen

TODO: describe project in detail


VLC config files

Note: apparently VLC >= 3.x has issues with HLS streams, VLC >= 2.2 has issues with creating the mosaic. It's best to use VLC < 2.2 to make this work.

broadcast.conf

fetch 4 unicast streams and put them out as multicast

# cvlc --vlm-conf /home/xopr/Desktop/VLC/broadcast.conf
# vlc rtp://@239.255.255.42:5004

new channel1 broadcast enabled
#setup channel1 input "https://cdn.c3voc.de/hls/s1_native_hd.m3u8"
setup channel1 input "https://cdn.c3voc.de/hls/s1_native_sd.m3u8"
setup channel1 output #rtp{mux=ts,dst=239.255.255.42,port=9001,sdp=sap://,name="Saal Adams"}

new channel2 broadcast enabled
#setup channel1 input "https://cdn.c3voc.de/hls/s2_native_hd.m3u8"
setup channel2 input "https://cdn.c3voc.de/hls/s2_native_sd.m3u8"
setup channel2 output #rtp{mux=ts,dst=239.255.255.42,port=9002,sdp=sap://,name="Saal Borg"}

new channel3 broadcast enabled
#setup channel1 input "https://cdn.c3voc.de/hls/s3_native_hd.m3u8"
setup channel3 input "https://cdn.c3voc.de/hls/s3_native_sd.m3u8"
setup channel3 output #rtp{mux=ts,dst=239.255.255.42,port=9003,sdp=sap://,name="Saal Clarke"}

new channel4 broadcast enabled
#setup channel1 input "https://cdn.c3voc.de/hls/s4_native_hd.m3u8"
setup channel4 input "https://cdn.c3voc.de/hls/s4_native_sd.m3u8"
setup channel4 output #rtp{mux=ts,dst=239.255.255.42,port=9004,sdp=sap://,name="Saal Dijkstra"}

new channel5 broadcast enabled
#setup channel1 input "https://cdn.c3voc.de/hls/s5_native_hd.m3u8"
setup channel5 input "https://cdn.c3voc.de/hls/s5_native_sd.m3u8"
setup channel5 output #rtp{mux=ts,dst=239.255.255.42,port=9005,sdp=sap://,name="Saal Eliza"}

new channel6 broadcast enabled
#setup channel1 input "https://cdn.c3voc.de/hls/s150_native_hd.m3u8"
setup channel6 input "https://cdn.c3voc.de/hls/s150_native_sd.m3u8"
setup channel6 output #rtp{mux=ts,dst=239.255.255.42,port=9006,sdp=sap://,name="Chaos West Buhne"}

new channel7 broadcast enabled
#setup channel1 input "https://cdn.c3voc.de/hls/s151_native_hd.m3u8"
setup channel7 input "https://cdn.c3voc.de/hls/s151_native_sd.m3u8"
setup channel7 output #rtp{mux=ts,dst=239.255.255.42,port=9007,sdp=sap://,name="WikiPakaWG Eszimmer"}

new channel8 broadcast enabled
#setup channel1 input "https://cdn.c3voc.de/hls/soio_native_hd.m3u8"
setup channel8 input "https://cdn.c3voc.de/hls/soio_native_sd.m3u8"
setup channel8 output #rtp{mux=ts,dst=239.255.255.42,port=9008,sdp=sap://,name="OIO"}

control channel1 play
control channel2 play
control channel3 play
control channel4 play
control channel5 play
control channel6 play
control channel7 play
control channel8 play

saal_mosaic.conf

Pick up on the 8 multicast streams and put them in a mosaic

# run with
# cvlc --vlm-conf /home/xopr/Desktop/VLC/saal_mosaic.conf --mosaic-width 1280 --mosaic-order "1,2,3,4,9,5,6,7,8" --mosaic-height 720

new channel1 broadcast enabled
setup channel1 input "rtp://@239.255.255.42:9001"
setup channel1 output #duplicate{dst=mosaic-bridge{id=1},select=video,dst=mosaic-bridge{id=1},select=audio}

new channel2 broadcast enabled
setup channel2 input "rtp://@239.255.255.42:9002"
setup channel2 output #duplicate{dst=mosaic-bridge{id=2},select=video,dst=mosaic-bridge{id=2},select=audio}

new channel3 broadcast enabled
setup channel3 input "rtp://@239.255.255.42:9003"
setup channel3 output #duplicate{dst=mosaic-bridge{id=3},select=video,dst=mosaic-bridge{id=3},select=audio}

new channel4 broadcast enabled
setup channel4 input "rtp://@239.255.255.42:9004"
setup channel4 output #duplicate{dst=mosaic-bridge{id=4},select=video,dst=mosaic-bridge{id=4},select=audio}

new channel5 broadcast enabled
setup channel5 input "rtp://@239.255.255.42:9005"
setup channel5 output #duplicate{dst=mosaic-bridge{id=5},select=video,dst=mosaic-bridge{id=5},select=audio}

new channel6 broadcast enabled
setup channel6 input "rtp://@239.255.255.42:9006"
setup channel6 output #duplicate{dst=mosaic-bridge{id=6},select=video,dst=mosaic-bridge{id=6},select=audio}

new channel7 broadcast enabled
setup channel7 input "rtp://@239.255.255.42:9007"
setup channel7 output #duplicate{dst=mosaic-bridge{id=7},select=video,dst=mosaic-bridge{id=7},select=audio}

new channel8 broadcast enabled
setup channel8 input "rtp://@239.255.255.42:9008"
setup channel8 output #duplicate{dst=mosaic-bridge{id=8},select=video,dst=mosaic-bridge{id=8},select=audio}

new mosaic broadcast enabled
setup mosaic input "file:///home/xopr/Desktop/VLC/ACKbg-1280x720.jpg"
setup mosaic option image-duration=-1
setup mosaic option image-fps=24/1
setup mosaic option mosaic-position=1
setup mosaic output #transcode{sfilter=mosaic,vcodec=mp2v,vb=500,scale=1}:bridge-in{delay=400,id-offset=100}:rtp{mux=ts,dst=239.255.255.42,port=5004,sap,name="Mosaic"}

control channel1 play
control channel2 play
control channel3 play
control channel4 play
control channel5 play
control channel6 play
control channel7 play
control channel8 play
control mosaic play

backgrounds

The mosaic uses a background with testcards plotted in a similar layout as the mosaic video's.

Recently xopr created a bash script for generating these. It uses bg.png as a base, and adding a philips PM5644 testcard for each title provided like this: ./mosaicbg.sh SAAL1 SAAL2 SAALG,"special room" SAAL6

notes and other info

  • 4 HD streams were too heavy for my dual core hyperthreaded 2.4GHz laptop: it would glitch into an unintelligible paint blob
  • using a VLM config file to open multiple streams with bandwith/cpu issues causes all streams to pause upon reconnecting a stream that went out of sync. Use a separate instance for each stream
  • the RTP stream seems to emit some type of timecode, so multiple streams are fairly in sync. Picking up on the RTP streams to create an RTP mosaic will off course delay that mosaic
  • In 2013, Xopr wrote an XBMC remote control script for streams to switch channels from within a console with just one keypress.
  • Multicast streams didn't work on wifi (as expected), but even worse: multicast broke the wifi networks. You can start a multicast stream over wifi though.