Streaming

go2rtc

It runs in docker: docker run -d --name go2rtc --restart unless-stopped --network host alexxit/go2rtc

http://localhost:1984/ then gets the user interface where the streams can be configured. The config tab opens a yaml editor where the first camera can be added

streams:
  esp32_cam: 
    - http://192.168.1.31:8080

http://localhost:1984/links.html?src=esp32_cam shows the links to be used by application to access the camera trough go2rtc

and now two streams one with jmpeg and one with webrtc

streams:
  esp32_mjpeg:
    - http://192.168.1.31:8080

  esp32_webrtc:
    - ffmpeg:esp32_mjpeg#video=h264#tune=zerolatency

docker logs -f go2rtc to see how happy it is

saving the yaml file

The yaml file lives inside the docker container and can therefore be lost as when deleting the docker container.

It can be put outside of the docker container in a safe place. mkdir -p /opt/docker-config/go2rtc give ownership to those directories for you local user. touch /opt/docker-config/go2rtc/go2rtc.yaml and add the yaml content to the file.

docker stop go2rtc

docker rm go2rtc

and finally run it telling with the -v option to take the yaml file:

docker run -d --name go2rtc --network host --restart unless-stopped -v /opt/docker-config/go2rtc:/config alexxit/go2rtc

RTSP and RTP

RTSP (Real-Time Streaming Protocol) is a standard to stream video and audio. It is Point-to-Point (Unicast) and Client-Initiated. On the clients there are often packages as MediaMTX or go2rtc that distribute one stream within the client. RTSP is a session and control manager for different streams as RTP (Real-Time Transport Protocol) and WebRTC


Linurs startpage