From 8de97255c11028d4cfe9bdd6bc519d11c5da2ad4 Mon Sep 17 00:00:00 2001 From: Feni85 Date: Mon, 13 Apr 2026 10:08:49 +0200 Subject: [PATCH] Update restream.md Clarified that exec output must be put in curly braces ONLY in case of RTSP, not pipe, as per go2rtc docs. Added additional example use case for exec function (rpi5b cam set-up). --- docs/docs/configuration/restream.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/docs/configuration/restream.md b/docs/docs/configuration/restream.md index 875d9a292..8758b0c68 100644 --- a/docs/docs/configuration/restream.md +++ b/docs/docs/configuration/restream.md @@ -208,7 +208,7 @@ Enabling arbitrary exec sources allows execution of arbitrary commands through g ## Advanced Restream Configurations -The [exec](https://github.com/AlexxIT/go2rtc/tree/v1.9.10#source-exec) source in go2rtc can be used for custom ffmpeg commands. An example is below: +The [exec](https://github.com/AlexxIT/go2rtc/tree/v1.9.10#source-exec) source in go2rtc can be used for custom ffmpeg commands and other applications. An example is below: :::warning @@ -216,16 +216,11 @@ The `exec:`, `echo:`, and `expr:` sources are disabled by default for security. ::: -:::warning - -The `exec:`, `echo:`, and `expr:` sources are disabled by default for security. You must set `GO2RTC_ALLOW_ARBITRARY_EXEC=true` to use them. See [Security: Restricted Stream Sources](#security-restricted-stream-sources) for more information. - -::: - -NOTE: The output will need to be passed with two curly braces `{{output}}` +NOTE: RTSP output will need to be passed with two curly braces `{{output}}`, whereas pipe output must be passed without curly braces. ```yaml go2rtc: streams: stream1: exec:ffmpeg -hide_banner -re -stream_loop -1 -i /media/BigBuckBunny.mp4 -c copy -rtsp_transport tcp -f rtsp {{output}} + stream2: exec:rpicam-vid -t 0 --libav-format h264 -o - #raspberry pi 5b cam output via pipe ```