RTSP.ME — relays camera RTSP streams to RTMP.

INSTALLATION (systemd and root rights required)

    sudo ./install.sh                      install and start
    sudo ./install.sh --lang ru            Russian admin panel
    sudo ./install.sh --port 9000          use another port
    sudo ./install.sh --bind lan           open the admin panel to the local network
    sudo ./install.sh --uninstall          remove (settings are kept)
    sudo ./install.sh --uninstall --purge  remove together with the settings

Open the admin panel afterwards and set the administrator password.
By default it is reachable from this machine only: http://127.0.0.1:8787
From another host, use an SSH tunnel:

    ssh -L 8787:127.0.0.1:8787 user@server

The interface language can also be switched later in the admin panel
(Access → Language).

FILES

    /opt/rtspme/bin/               agent, ffmpeg and ffprobe
    /etc/rtspme/config.json        settings and rules
    journalctl -u rtspme -f        service log

RULES

A rule is a pair "RTSP source → RTMP target". Every enabled rule gets its own
ffmpeg process, and video is passed through without re-encoding (-c:v copy).
RTMP accepts H.264 only. If the camera streams H.265, either switch its stream
to H.264 or tick "Re-encode H.265 to H.264" in the rule — re-encoding works but
loads the processor, roughly one core per camera.

Audio: AAC is copied as is, other codecs (G.711 for example) are re-encoded
to AAC on the fly, and when there is no audio track it is simply dropped.

VIDEO ON DEMAND

Tick "Stream only on request" in a rule and the agent subscribes to the
service control channel (its address is derived from the RTMP target) and
keeps ffmpeg running only while someone is watching. With no viewers the rule
shows "Waiting for a viewer" and consumes nothing.

This requires RTMP Push enabled for the camera on the service side. If the
service replies that it does not manage this broadcast, the agent says so in
the admin panel.

LICENSES

The bundled ffmpeg is built with x264, so it is distributed under GPL v3;
the LICENSES directory holds the full text. Sources: https://ffmpeg.org and
https://www.videolan.org/developers/x264.html
