Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CXXFLAGS := $(CXXFLAGS) -DMAVLINK_SIGNING_TIMESTAMP_LIMIT=600
LIBS := -ltdb -lssl -lcrypto

# Source files
SOURCES := supportproxy.cpp mavlink.cpp util.cpp keydb.cpp conntdb.cpp tlog.cpp session.cpp binlog.cpp cleanup.cpp websocket.cpp video.cpp videoauth.cpp videots.cpp videostream.cpp videorec.cpp videoview.cpp httpreq.cpp videortsp.cpp videortmp.cpp
SOURCES := supportproxy.cpp mavlink.cpp util.cpp keydb.cpp conntdb.cpp tlog.cpp session.cpp binlog.cpp cleanup.cpp websocket.cpp video.cpp videoauth.cpp videots.cpp videostream.cpp videorec.cpp videoview.cpp httpreq.cpp videortsp.cpp videortmp.cpp videortspview.cpp
OBJECTS := $(SOURCES:.cpp=.o)
TARGET := supportproxy

Expand Down Expand Up @@ -107,6 +107,8 @@ videorec.o: videorec.cpp videorec.h session.h cleanup.h
videoview.o: videoview.cpp videoview.h httpreq.h videostream.h videots.h videoauth.h keydb.h
httpreq.o: httpreq.cpp httpreq.h
videortsp.o: videortsp.cpp videortsp.h
video.o videoview.o videortspview.o: videortspview.h
videortspview.o: videortspview.cpp videoview.h videostream.h videomkv.h videots.h videoauth.h httpreq.h keydb.h
videortmp.o: videortmp.cpp videortmp.h httpreq.h

# Testing
Expand Down
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,39 @@ supplied and is wrong is still refused.
Chrome and Firefox will not decode HEVC in Media Source Extensions on
desktop Linux, and nothing here transcodes.

RTSP playback is also available on each existing video port:

```bash
ffplay -rtsp_transport tcp 'rtsp://HOST:PORT/view/v1'
vlc --rtsp-tcp 'rtsp://HOST:PORT/view/v1'
```

For Mission Planner, right-click the HUD, select **Video → Set GStreamer
Source**, and paste this pipeline as one line:

```text
rtspsrc location="rtsp://HOST:PORT/view/v1" protocols=tcp latency=100 ! application/x-rtp ! decodebin3 ! queue max-size-buffers=1 leaky=2 ! videoconvert ! video/x-raw,format=BGRA ! appsink name=outsink sync=false
```

The video page offers this pipeline with the entry's host, port and slot
already filled in. It follows Mission Planner's [live video setup](https://ardupilot.org/planner/docs/live-video.html)
with TCP transport selected for the proxy.

Use `/view/v2` on the second slot's port, and so on. If a viewer password
is set, append `?pw=YOUR_VIEWER_PASSWORD` (URL-encode special characters),
or use the player's HTTP Basic authentication support. Existing viewer
tokens (`?t=...`) also work. These are viewer credentials, independent of
the publish password or MAVLink admission.

Playback carries MPEG-TS in RTP (MP2T) over the RTSP TCP connection, so
it needs no extra firewall ports or transcoding and preserves the video
codec and any audio already present in the stream. The player must
support MP2T over RTSP and TCP transport; UDP playback is not offered.
Matroska/raw thermal streams use their existing HTTP viewer instead.
A viewer starts at a buffered keyframe, and reconnects after the
publisher restarts. The `/view/` RTSP namespace is reserved for viewing;
RTSP publishers should continue using a different path, such as `/cam`.

**Disk.** Video has its own budget, separate from telemetry, so a busy
camera can never evict a user's tlogs. Set it per entry in the web UI;
a free-space floor stops recording before the disk fills.
Expand Down
Loading
Loading