--- /dev/null
+* Everybody is sending on an own RTSP channel, e.g.
+ * rtsp://sirius:8554/gregoa
+ * rtsp://sirius:8554/philipp
+* For each RTSP stream, a .stm file needs to exist on Kodi with the stream URL
+* Alternatively, there could be a director using OBS and "mixing" the streams on demand,
+ creating a new stream rtsp://sirius:8554/cug which is played by Kodi.
\ No newline at end of file
--- /dev/null
+# RTSP
+
+* [RFC2326:Real Time Streaming Protocol (RTSP)](https://www.ietf.org/rfc/rfc2326.txt): Also explains meaning of RTSP specific SDP fields like "a:control:streamid=0"
+
+## Send to RTSP
+
+ ffmpeg -f x11grab -framerate 25 -video_size 1680x1050 -i :0.0 \
+ -f pulse -ac 2 -i default \
+ -vcodec libx264 -preset ultrafast -tune zerolatency -crf 0 -g 25 \
+ -async 1 -acodec libmp3lame \
+ -bsf:v h264_mp4toannexb \
+ -f rtsp -muxdelay 0.1 rtsp://localhost:5545/abc
+ gst-launch-1.0 videotestsrc ! avenc_mpeg4 ! video/mpeg, mapping=/stream1 ! rtspclientsink location=rtsp://127.0.0.1:5545/abcd
+
+### OBS (Open Broadcast Studio):
+* Use rtsp://localhost:8554/abc in the recording options with RTSP container format and "start recording" or
+* if using the [rtsp-simple-server](https://github.com/aler9/rtsp-simple-server), enter "rtmp://localhost/abc"
+ in the streaming section and "start streaming". Although RTMP is used for sending to the RTSP server, the RTSP
+ protocol can be used to receive the stream.
+
+## Receiving stream via RTSP
+
+ ffplay -i rtsp://localhost:554/abc
+ gst-launch-1.0 -v playbin uri=rtsp://127.0.0.1:554/abc
+ mpv --rtsp-transport=lavf rtsp://127.0.0.1:554/abc
+ mplayer rtsp://127.0.0.1:554/abc
+ vlc rtsp://127.0.0.1:554/abc # does not work
+
+
+## Server software
+
+* `rtsp-server-perl`
+ * Error handling SETUP: Can't call method "get_stream" on an undefined value at /usr/share/perl5/RTSP/Server/Client/Connection.pm line 100.
+ * RTSP/Server/Connection.pm:332, function get_mount
+* https://github.com/aler9/rtsp-simple-server
+ * `make release-nodocker` (optionally after commenting out all unneeded
+ architectures in `Makefile`, and maybe also the call to tar. Cf. ./tmp
+ and ./release afterwards)
+ * Default port for both sources and clients: 8554
The player built into code knows at least the following streaming protocols: http, rtsp.
https://kodi.wiki/index.php?title=Internet_video_and_audio_streams
+
+
+# Random other projects
+
+* µstreamer: https://github.com/pikvm/ustreamer
+* minimal-webrtc-gstreamer: https://git.aweirdimagination.net/perelman/minimal-webrtc-gstreamer
--- /dev/null
+# Online Gaming via Jitsi
+
+Stream game and own voice to Jitsi and hear the other participants as well as the game sound.
+
+* jitsi_sink input is used for everything that should go to Jitsi: output goes to JITSI-Meeting:
+* That is game output (game sink output) and own voice (Microphone).
+* game_sink should be the target of the game-source
+
+
+```
+# Once: find out how the devices are called:
+pactl list short sources
+pactl list short sinks
+
+# Example: Vega
+headphones=alsa_output.pci-0000_00_1b.0.analog-stereo
+microphone=alsa_input.pci-0000_00_1b.0.analog-stereo
+
+# Example: Sirius
+headphones=alsa_output.pci-0000_29_00.6.analog-stereo
+microphone=alsa_input.pci-0000_29_00.6.analog-stereo
+
+# Use null-sinks as "aliases"
+pactl load-module module-null-sink sink_name=jitsi_sink sink_properties=device.description=jitsi_sink
+pactl load-module module-null-sink sink_name=game_sink sink_properties=device.description=game_sink
+
+# Connect game and microphone to Jitsi
+pactl load-module module-loopback source=game_sink.monitor sink=jitsi_sink
+pactl load-module module-loopback source=$microphone sink=jitsi_sink
+# Connect Jitsi to headphones
+pactl load-module module-loopback source=game_sink.monitor sink=$headphones
+
+# Manually connect Chromium (Jitsi) to $headphone in pavucontrol
+
+# Adjust volumes - manually or like this:
+#pactl set-sink-volume $jitsi_sink 100%
+#pactl set-sink-volume $game_sink 100%
+
+```
+
+If pulseaudio sources have a `DONT_MOVE` flag it's not possible to change their associated sink. For some games like Deponia the solution is:
+
+```
+# Create a config file for openalsoft that allows the source to move
+# but still uses the wrong default
+# ~/.alsoftrc
+[pulse]
+allow-moves=yes
+```
+[Source of this solution](https://steamcommunity.com/app/93200/discussions/0/864959809826195633/)
+
+
+
+After the game you can unload the modules:
+
+```
+# Unload
+pactl unload-module module-loopback
+pactl unload-module module-null-sink
+```
+
+## Links
+
+* [Mixing Additional Audio](https://wiki.archlinux.org/index.php/PulseAudio/Examples#Mixing_additional_audio_into_the_microphone's_audio)