Extend rectangle so that Impress does not show text above border.
[toast/stream2beamer.git] / protocols.md
1 # RTSP
2
3 * [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"
4
5 ## Send to RTSP
6
7     ffmpeg -f x11grab -framerate 25 -video_size 1680x1050 -i :0.0 \
8            -f pulse -ac 2 -i default \
9            -vcodec libx264 -preset ultrafast -tune zerolatency -crf 0 -g 25 \
10            -async 1 -acodec libmp3lame \
11            -bsf:v h264_mp4toannexb \
12            -f rtsp -muxdelay 0.1 rtsp://localhost:5545/abc
13     gst-launch-1.0 videotestsrc ! avenc_mpeg4 ! video/mpeg, mapping=/stream1 !  rtspclientsink location=rtsp://localhost:8554/abcd
14     gst-launch-1.0 videotestsrc ! vp8enc ! video/x-vp8 !  rtspclientsink location=rtsp://localhost:8554/abcd
15
16 ### OBS (Open Broadcast Studio):
17 * Use rtsp://localhost:8554/abc in the recording options with RTSP container format and "start recording" or
18 * if using the [rtsp-simple-server](https://github.com/aler9/rtsp-simple-server), enter "rtmp://localhost/abc"
19   in the streaming section and "start streaming". Although RTMP is used for sending to the RTSP server, the RTSP
20   protocol can be used to receive the stream.
21
22 ### Send to RTSP server via RTMP
23
24 * https://forums.developer.nvidia.com/t/how-to-publish-x264-encode-data-to-rtmpsink-in-gstreamer/64288/5
25
26     gst-launch-1.0 -v videotestsrc ! x264enc ! 'video/x-h264,stream-format=(string)avc' ! flvmux ! rtmpsink  location=rtmp://sirius:1935/gregoa
27
28 ## Receiving stream via RTSP
29
30     ffplay -i rtsp://localhost:554/abc
31     gst-launch-1.0 -v playbin uri=rtsp://127.0.0.1:554/abc
32     mpv --rtsp-transport=lavf rtsp://127.0.0.1:554/abc
33     mplayer rtsp://127.0.0.1:554/abc
34     vlc rtsp://127.0.0.1:554/abc # does not work
35
36
37 ## Server software
38
39 * `rtsp-server-perl`
40   * Error handling SETUP: Can't call method "get_stream" on an undefined value at /usr/share/perl5/RTSP/Server/Client/Connection.pm line 100.
41   * RTSP/Server/Connection.pm:332, function get_mount
42 * https://github.com/aler9/rtsp-simple-server
43   * `make release-nodocker` (optionally after commenting out all unneeded
44     architectures in `Makefile`, and maybe also the call to tar. Cf. ./tmp
45     and ./release afterwards)
46   * Default port for both sources and clients: 8554