git: 0f01a9cde53d - main - multimedia/mediamtx: Update 1.21.3 => 1.22.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 03 Dec 2026 15:50:04 UTC
The branch main has been updated by nxjoseph:
URL: https://cgit.FreeBSD.org/ports/commit/?id=0f01a9cde53d5a3aa4fccc13892cc96c00acd8a3
commit 0f01a9cde53d5a3aa4fccc13892cc96c00acd8a3
Author: Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2026-12-03 15:48:55 +0000
Commit: Yusuf Yaman <nxjoseph@FreeBSD.org>
CommitDate: 2026-12-03 15:49:43 +0000
multimedia/mediamtx: Update 1.21.3 => 1.22.0
Changelogs:
https://github.com/bluenviron/mediamtx/releases/tag/v1.21.4
https://github.com/bluenviron/mediamtx/releases/tag/v1.22.0
While here:
* Disable CGO_ENABLED
* Clean up references to rpiCamera
PR: 301428
MFH: 2026Q4
---
multimedia/mediamtx/Makefile | 8 +-
multimedia/mediamtx/distinfo | 14 +-
multimedia/mediamtx/files/patch-api_openapi.yaml | 140 +++++
.../files/patch-internal_conf_conf__test.go | 253 ++++++++
.../mediamtx/files/patch-internal_conf_path.go | 643 +++++++++++++++++++++
.../files/patch-internal_conf_path__test.go | 52 ++
.../mediamtx/files/patch-internal_core_core.go | 10 +-
.../files/patch-internal_core_path__manager.go | 47 ++
.../files/patch-internal_staticsources_handler.go | 16 +-
multimedia/mediamtx/files/patch-mediamtx.yml | 6 +-
10 files changed, 1163 insertions(+), 26 deletions(-)
diff --git a/multimedia/mediamtx/Makefile b/multimedia/mediamtx/Makefile
index f2ca405dde20..9428b131acf2 100644
--- a/multimedia/mediamtx/Makefile
+++ b/multimedia/mediamtx/Makefile
@@ -1,9 +1,8 @@
PORTNAME= mediamtx
DISTVERSIONPREFIX= v
-DISTVERSION= 1.21.3
-PORTREVISION= 1
+DISTVERSION= 1.22.0
CATEGORIES= multimedia net
-MASTER_SITES+= https://github.com/video-dev/hls.js/releases/download/v1.7.3/:hlsjs
+MASTER_SITES+= https://github.com/video-dev/hls.js/releases/download/v1.7.4/:hlsjs
DISTFILES+= release.zip:hlsjs
MAINTAINER= daniel.engberg.lists@pyret.net
@@ -13,10 +12,11 @@ WWW= https://github.com/bluenviron/mediamtx
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= go:modules
+USES= go:1.27+,modules
GO_MODULE= github.com/bluenviron/mediamtx
USE_RC_SUBR= mediamtx
+CGO_ENABLED= 0
USERS= mediamtx
GROUPS= mediamtx
diff --git a/multimedia/mediamtx/distinfo b/multimedia/mediamtx/distinfo
index 8982354e97db..9da9b374647b 100644
--- a/multimedia/mediamtx/distinfo
+++ b/multimedia/mediamtx/distinfo
@@ -1,7 +1,7 @@
-TIMESTAMP = 1792990574
-SHA256 (go/multimedia_mediamtx/mediamtx-v1.21.3/release.zip) = abbda85f3e9b8325fc6b8dbf4fa612ea87144ebad93c2150594e64aad58ec529
-SIZE (go/multimedia_mediamtx/mediamtx-v1.21.3/release.zip) = 7704258
-SHA256 (go/multimedia_mediamtx/mediamtx-v1.21.3/v1.21.3.mod) = 27743fd88116fabe3e9ed50d69895577bb6e7ee17cc4f3b3c9d5d91c17ac6034
-SIZE (go/multimedia_mediamtx/mediamtx-v1.21.3/v1.21.3.mod) = 4465
-SHA256 (go/multimedia_mediamtx/mediamtx-v1.21.3/v1.21.3.zip) = e7ccc963b639e06a7feecdfd54517f63195c44562e1121bfe6a2dd9e90e8957f
-SIZE (go/multimedia_mediamtx/mediamtx-v1.21.3/v1.21.3.zip) = 1069303
+TIMESTAMP = 1796230415
+SHA256 (go/multimedia_mediamtx/mediamtx-v1.22.0/release.zip) = 933978ce8ec55b80216c2447b22d5c22c388a086612b88ee8382b3f70bd80165
+SIZE (go/multimedia_mediamtx/mediamtx-v1.22.0/release.zip) = 7767145
+SHA256 (go/multimedia_mediamtx/mediamtx-v1.22.0/v1.22.0.mod) = 7df813761454107985150eb693613916702757f1cf4137520b867956e4c4ca42
+SIZE (go/multimedia_mediamtx/mediamtx-v1.22.0/v1.22.0.mod) = 4455
+SHA256 (go/multimedia_mediamtx/mediamtx-v1.22.0/v1.22.0.zip) = ec6c18e58987220c850520ddedc88bfe83970e9f9e11f69eb9e8536052731269
+SIZE (go/multimedia_mediamtx/mediamtx-v1.22.0/v1.22.0.zip) = 1119358
diff --git a/multimedia/mediamtx/files/patch-api_openapi.yaml b/multimedia/mediamtx/files/patch-api_openapi.yaml
new file mode 100644
index 000000000000..f2306981006a
--- /dev/null
+++ b/multimedia/mediamtx/files/patch-api_openapi.yaml
@@ -0,0 +1,140 @@
+--- api/openapi.yaml.orig 2026-12-02 18:01:12 UTC
++++ api/openapi.yaml
+@@ -175,7 +175,6 @@ components:
+ enum:
+ - hlsSource
+ - redirect
+- - rpiCameraSource
+ - rtmpConn
+ - rtmpsConn
+ - rtmpSource
+@@ -1182,129 +1181,6 @@ components:
+ type: string
+ recordSegmentDuration:
+ type: string
+- rpiCameraAWB:
+- type: string
+- rpiCameraAWBGains:
+- type: array
+- items:
+- type: number
+- format: double
+- rpiCameraAfMode:
+- type: string
+- rpiCameraAfRange:
+- type: string
+- rpiCameraAfSpeed:
+- type: string
+- rpiCameraAfWindow:
+- type: string
+- rpiCameraBitrate:
+- type: integer
+- format: uint64
+- rpiCameraBrightness:
+- type: number
+- format: double
+- rpiCameraCamID:
+- type: integer
+- format: uint64
+- description: Raspberry Pi Camera source
+- rpiCameraCodec:
+- type: string
+- rpiCameraContrast:
+- type: number
+- format: double
+- rpiCameraDenoise:
+- type: string
+- rpiCameraEV:
+- type: number
+- format: double
+- rpiCameraExposure:
+- type: string
+- rpiCameraFPS:
+- type: number
+- format: double
+- rpiCameraFlickerPeriod:
+- type: integer
+- format: uint64
+- rpiCameraGain:
+- type: number
+- format: double
+- rpiCameraH264Level:
+- type: string
+- rpiCameraH264Profile:
+- type: string
+- rpiCameraHDR:
+- type: boolean
+- rpiCameraHFlip:
+- type: boolean
+- rpiCameraHardwareH264Level:
+- type: string
+- nullable: true
+- deprecated: true
+- rpiCameraHardwareH264Profile:
+- type: string
+- nullable: true
+- deprecated: true
+- rpiCameraHeight:
+- type: integer
+- format: uint64
+- rpiCameraIDRPeriod:
+- type: integer
+- format: uint64
+- rpiCameraJPEGQuality:
+- type: integer
+- format: uint64
+- nullable: true
+- deprecated: true
+- rpiCameraLensPosition:
+- type: number
+- format: double
+- rpiCameraLevel:
+- type: string
+- nullable: true
+- deprecated: true
+- rpiCameraMJPEGQuality:
+- type: integer
+- format: uint64
+- rpiCameraMetering:
+- type: string
+- rpiCameraMode:
+- type: string
+- rpiCameraProfile:
+- type: string
+- nullable: true
+- deprecated: true
+- rpiCameraROI:
+- type: string
+- rpiCameraSaturation:
+- type: number
+- format: double
+- rpiCameraSecondary:
+- type: boolean
+- rpiCameraSharpness:
+- type: number
+- format: double
+- rpiCameraShutter:
+- type: integer
+- format: uint64
+- rpiCameraSoftwareH264Level:
+- type: string
+- nullable: true
+- deprecated: true
+- rpiCameraSoftwareH264Profile:
+- type: string
+- nullable: true
+- deprecated: true
+- rpiCameraTextOverlay:
+- type: string
+- rpiCameraTextOverlayEnable:
+- type: boolean
+- rpiCameraTuningFile:
+- type: string
+- rpiCameraVFlip:
+- type: boolean
+- rpiCameraWidth:
+- type: integer
+- format: uint64
+ rtpSDP:
+ type: string
+ description: RTP source
diff --git a/multimedia/mediamtx/files/patch-internal_conf_conf__test.go b/multimedia/mediamtx/files/patch-internal_conf_conf__test.go
new file mode 100644
index 000000000000..56b2200678ad
--- /dev/null
+++ b/multimedia/mediamtx/files/patch-internal_conf_conf__test.go
@@ -0,0 +1,253 @@
+--- internal/conf/conf_test.go.orig 2026-12-02 17:55:31 UTC
++++ internal/conf/conf_test.go
+@@ -101,27 +101,6 @@ func TestConfFromFile(t *testing.T) {
+ WHEPSTUNGatherTimeout: 5 * conf.Duration(time.Second),
+ WHEPHandshakeTimeout: 10 * conf.Duration(time.Second),
+ WHEPTrackGatherTimeout: 2 * conf.Duration(time.Second),
+- RPICameraWidth: 1920,
+- RPICameraHeight: 1080,
+- RPICameraContrast: 1,
+- RPICameraSaturation: 1,
+- RPICameraSharpness: 1,
+- RPICameraExposure: "normal",
+- RPICameraAWB: "auto",
+- RPICameraAWBGains: []float64{0, 0},
+- RPICameraDenoise: "off",
+- RPICameraMetering: "centre",
+- RPICameraFPS: 30,
+- RPICameraAfMode: "continuous",
+- RPICameraAfRange: "normal",
+- RPICameraAfSpeed: "normal",
+- RPICameraTextOverlay: "%Y-%m-%d %H:%M:%S - MediaMTX",
+- RPICameraCodec: "auto",
+- RPICameraIDRPeriod: 60,
+- RPICameraBitrate: 5000000,
+- RPICameraH264Profile: "auto",
+- RPICameraH264Level: "4.1",
+- RPICameraMJPEGQuality: 60,
+ RunOnDemandStartTimeout: 5 * conf.Duration(time.Second),
+ RunOnDemandCloseAfter: 10 * conf.Duration(time.Second),
+ }, pa)
+@@ -724,39 +703,39 @@ func TestConfErrors(t *testing.T) {
+ "paths:\n cam:\n source: rtsp://localhost/stream\n rtspUDPSourcePortRange: [65534, 65535]\n",
+ "",
+ },
++// {
++// "publisher with invalid Raspberry Pi camera width",
++// "paths:\n cam:\n source: publisher\n rpiCameraWidth: 0\n",
++// "invalid 'rpiCameraWidth' value",
++// },
++// {
++// "double raspberry pi camera",
++// "paths:\n" +
++// " cam1:\n" +
++// " source: rpiCamera\n" +
++// " cam2:\n" +
++// " source: rpiCamera\n",
++// "'rpiCamera' with same camera ID 0 is used as source in two paths, 'cam1' and 'cam2'",
++// },
++// {
++// "invalid rpi camera mjpeg width",
++// "paths:\n" +
++// " cam:\n" +
++// " source: rpiCamera\n" +
++// " rpiCameraCodec: mjpeg\n" +
++// " rpiCameraWidth: 1921\n",
++// "'rpiCameraWidth' must be a multiple of 8 and less than 2048 when using MJPEG",
++// },
++// {
++// "invalid rpi camera mjpeg height",
++// "paths:\n" +
++// " cam:\n" +
++// " source: rpiCamera\n" +
++// " rpiCameraCodec: mjpeg\n" +
++// " rpiCameraHeight: 2048\n",
++// "'rpiCameraHeight' must be a multiple of 8 and less than 2048 when using MJPEG",
++// },
+ {
+- "publisher with invalid Raspberry Pi camera width",
+- "paths:\n cam:\n source: publisher\n rpiCameraWidth: 0\n",
+- "invalid 'rpiCameraWidth' value",
+- },
+- {
+- "double raspberry pi camera",
+- "paths:\n" +
+- " cam1:\n" +
+- " source: rpiCamera\n" +
+- " cam2:\n" +
+- " source: rpiCamera\n",
+- "'rpiCamera' with same camera ID 0 is used as source in two paths, 'cam1' and 'cam2'",
+- },
+- {
+- "invalid rpi camera mjpeg width",
+- "paths:\n" +
+- " cam:\n" +
+- " source: rpiCamera\n" +
+- " rpiCameraCodec: mjpeg\n" +
+- " rpiCameraWidth: 1921\n",
+- "'rpiCameraWidth' must be a multiple of 8 and less than 2048 when using MJPEG",
+- },
+- {
+- "invalid rpi camera mjpeg height",
+- "paths:\n" +
+- " cam:\n" +
+- " source: rpiCamera\n" +
+- " rpiCameraCodec: mjpeg\n" +
+- " rpiCameraHeight: 2048\n",
+- "'rpiCameraHeight' must be a multiple of 8 and less than 2048 when using MJPEG",
+- },
+- {
+ "invalid srt publish passphrase",
+ "paths:\n" +
+ " mypath:\n" +
+@@ -1478,58 +1457,58 @@ func TestPathDefaultsValidation(t *testing.T) {
+ "pathDefaults:\n source: udp+rtp://localhost\n",
+ "pathDefaults: 'source': missing port",
+ },
++// {
++// "invalid default Raspberry Pi camera exposure",
++// "pathDefaults:\n source: rpiCamera\n rpiCameraExposure: unsupported\n",
++// "pathDefaults: invalid 'rpiCameraExposure' value",
++// },
++// {
++// "invalid default Raspberry Pi camera exposure with publisher source",
++// "pathDefaults:\n rpiCameraExposure: unsupported\n",
++// "pathDefaults: invalid 'rpiCameraExposure' value",
++// },
++// {
++// "invalid default Raspberry Pi camera exposure overridden by every path",
++// "pathDefaults:\n rpiCameraExposure: unsupported\n" +
++// "paths:\n cam:\n source: rpiCamera\n rpiCameraExposure: normal\n",
++// "pathDefaults: invalid 'rpiCameraExposure' value",
++// },
++// {
++// "invalid default Raspberry Pi camera hardware H264 profile",
++// "pathDefaults:\n rpiCameraHardwareH264Profile: auto\n",
++// "pathDefaults: invalid 'rpiCameraHardwareH264Profile' value",
++// },
++// {
++// "invalid default Raspberry Pi camera hardware H264 level",
++// "pathDefaults:\n rpiCameraHardwareH264Level: '5.0'\n",
++// "pathDefaults: invalid 'rpiCameraHardwareH264Level' value",
++// },
++// {
++// "invalid default Raspberry Pi camera software H264 profile",
++// "pathDefaults:\n rpiCameraSoftwareH264Profile: auto\n",
++// "pathDefaults: invalid 'rpiCameraSoftwareH264Profile' value",
++// },
++// {
++// "invalid default Raspberry Pi camera software H264 level",
++// "pathDefaults:\n rpiCameraSoftwareH264Level: '5.0'\n",
++// "pathDefaults: invalid 'rpiCameraSoftwareH264Level' value",
++// },
++// {
++// "invalid default Raspberry Pi camera profile alias takes precedence",
++// "pathDefaults:\n rpiCameraProfile: auto\n rpiCameraHardwareH264Profile: high\n",
++// "pathDefaults: invalid 'rpiCameraHardwareH264Profile' value",
++// },
++// {
++// "invalid default Raspberry Pi camera level alias takes precedence",
++// "pathDefaults:\n rpiCameraLevel: '5.0'\n rpiCameraHardwareH264Level: '4.1'\n",
++// "pathDefaults: invalid 'rpiCameraHardwareH264Level' value",
++// },
++// {
++// "default Raspberry Pi camera secondary does not need a primary path yet",
++// "pathDefaults:\n source: rpiCamera\n rpiCameraSecondary: true\n",
++// "",
++// },
+ {
+- "invalid default Raspberry Pi camera exposure",
+- "pathDefaults:\n source: rpiCamera\n rpiCameraExposure: unsupported\n",
+- "pathDefaults: invalid 'rpiCameraExposure' value",
+- },
+- {
+- "invalid default Raspberry Pi camera exposure with publisher source",
+- "pathDefaults:\n rpiCameraExposure: unsupported\n",
+- "pathDefaults: invalid 'rpiCameraExposure' value",
+- },
+- {
+- "invalid default Raspberry Pi camera exposure overridden by every path",
+- "pathDefaults:\n rpiCameraExposure: unsupported\n" +
+- "paths:\n cam:\n source: rpiCamera\n rpiCameraExposure: normal\n",
+- "pathDefaults: invalid 'rpiCameraExposure' value",
+- },
+- {
+- "invalid default Raspberry Pi camera hardware H264 profile",
+- "pathDefaults:\n rpiCameraHardwareH264Profile: auto\n",
+- "pathDefaults: invalid 'rpiCameraHardwareH264Profile' value",
+- },
+- {
+- "invalid default Raspberry Pi camera hardware H264 level",
+- "pathDefaults:\n rpiCameraHardwareH264Level: '5.0'\n",
+- "pathDefaults: invalid 'rpiCameraHardwareH264Level' value",
+- },
+- {
+- "invalid default Raspberry Pi camera software H264 profile",
+- "pathDefaults:\n rpiCameraSoftwareH264Profile: auto\n",
+- "pathDefaults: invalid 'rpiCameraSoftwareH264Profile' value",
+- },
+- {
+- "invalid default Raspberry Pi camera software H264 level",
+- "pathDefaults:\n rpiCameraSoftwareH264Level: '5.0'\n",
+- "pathDefaults: invalid 'rpiCameraSoftwareH264Level' value",
+- },
+- {
+- "invalid default Raspberry Pi camera profile alias takes precedence",
+- "pathDefaults:\n rpiCameraProfile: auto\n rpiCameraHardwareH264Profile: high\n",
+- "pathDefaults: invalid 'rpiCameraHardwareH264Profile' value",
+- },
+- {
+- "invalid default Raspberry Pi camera level alias takes precedence",
+- "pathDefaults:\n rpiCameraLevel: '5.0'\n rpiCameraHardwareH264Level: '4.1'\n",
+- "pathDefaults: invalid 'rpiCameraHardwareH264Level' value",
+- },
+- {
+- "default Raspberry Pi camera secondary does not need a primary path yet",
+- "pathDefaults:\n source: rpiCamera\n rpiCameraSecondary: true\n",
+- "",
+- },
+- {
+ "invalid forwarding destination",
+ "pathDefaults:\n forward:\n - dest: rtmp://\n",
+ "pathDefaults: invalid 'forward': entry 0: 'dest': not a valid URL",
+@@ -1604,23 +1583,23 @@ func TestPathDefaultsValidation(t *testing.T) {
+ }
+ }
+
+-func TestPathDefaultsRPICameraAliasPrecedence(t *testing.T) {
+- tmpf := createTempFile(t, []byte("pathDefaults:\n"+
+- " rpiCameraProfile: high\n"+
+- " rpiCameraHardwareH264Profile: unsupported\n"+
+- " rpiCameraLevel: '4.2'\n"+
+- " rpiCameraHardwareH264Level: '5.0'\n"+
+- "paths:\n"+
+- " cam:\n"+
+- " source: rpiCamera\n"))
+-
+- cfg, _, err := conf.Load(tmpf, nil, nil)
+- require.NoError(t, err)
+- require.Equal(t, "unsupported", *cfg.PathDefaults.RPICameraHardwareH264Profile)
+- require.Equal(t, "5.0", *cfg.PathDefaults.RPICameraHardwareH264Level)
+- require.Equal(t, "high", *cfg.Paths["cam"].RPICameraHardwareH264Profile)
+- require.Equal(t, "4.2", *cfg.Paths["cam"].RPICameraHardwareH264Level)
+-}
++// func TestPathDefaultsRPICameraAliasPrecedence(t *testing.T) {
++// tmpf := createTempFile(t, []byte("pathDefaults:\n"+
++// " rpiCameraProfile: high\n"+
++// " rpiCameraHardwareH264Profile: unsupported\n"+
++// " rpiCameraLevel: '4.2'\n"+
++// " rpiCameraHardwareH264Level: '5.0'\n"+
++// "paths:\n"+
++// " cam:\n"+
++// " source: rpiCamera\n"))
++//
++// cfg, _, err := conf.Load(tmpf, nil, nil)
++// require.NoError(t, err)
++// require.Equal(t, "unsupported", *cfg.PathDefaults.RPICameraHardwareH264Profile)
++// require.Equal(t, "5.0", *cfg.PathDefaults.RPICameraHardwareH264Level)
++// require.Equal(t, "high", *cfg.Paths["cam"].RPICameraHardwareH264Profile)
++// require.Equal(t, "4.2", *cfg.Paths["cam"].RPICameraHardwareH264Level)
++// }
+
+ func TestDeprecatedAvailabilityHooks(t *testing.T) {
+ tmpf := createTempFile(t, []byte("paths:\n"+
diff --git a/multimedia/mediamtx/files/patch-internal_conf_path.go b/multimedia/mediamtx/files/patch-internal_conf_path.go
new file mode 100644
index 000000000000..73b52d3c59dd
--- /dev/null
+++ b/multimedia/mediamtx/files/patch-internal_conf_path.go
@@ -0,0 +1,643 @@
+--- internal/conf/path.go.orig 1979-11-29 23:00:00 UTC
++++ internal/conf/path.go
+@@ -296,60 +296,60 @@ type Path struct {
+ SourceRedirect string `json:"sourceRedirect"`
+
+ // Raspberry Pi Camera source
+- RPICameraCamID uint `json:"rpiCameraCamID"`
+- RPICameraSecondary bool `json:"rpiCameraSecondary"`
+- RPICameraWidth uint `json:"rpiCameraWidth"`
+- RPICameraHeight uint `json:"rpiCameraHeight"`
+- RPICameraHFlip bool `json:"rpiCameraHFlip"`
+- RPICameraVFlip bool `json:"rpiCameraVFlip"`
+- RPICameraBrightness float64 `json:"rpiCameraBrightness"`
+- RPICameraContrast float64 `json:"rpiCameraContrast"`
+- RPICameraSaturation float64 `json:"rpiCameraSaturation"`
+- RPICameraSharpness float64 `json:"rpiCameraSharpness"`
+- RPICameraExposure string `json:"rpiCameraExposure"`
+- RPICameraAWB string `json:"rpiCameraAWB"`
+- RPICameraAWBGains []float64 `json:"rpiCameraAWBGains"`
+- RPICameraDenoise string `json:"rpiCameraDenoise"`
+- RPICameraShutter uint `json:"rpiCameraShutter"`
+- RPICameraMetering string `json:"rpiCameraMetering"`
+- RPICameraGain float64 `json:"rpiCameraGain"`
+- RPICameraEV float64 `json:"rpiCameraEV"`
+- RPICameraROI string `json:"rpiCameraROI"`
+- RPICameraHDR bool `json:"rpiCameraHDR"`
+- RPICameraTuningFile string `json:"rpiCameraTuningFile"`
+- RPICameraMode string `json:"rpiCameraMode"`
+- RPICameraFPS float64 `json:"rpiCameraFPS"`
+- RPICameraAfMode string `json:"rpiCameraAfMode"`
+- RPICameraAfRange string `json:"rpiCameraAfRange"`
+- RPICameraAfSpeed string `json:"rpiCameraAfSpeed"`
+- RPICameraLensPosition float64 `json:"rpiCameraLensPosition"`
+- RPICameraAfWindow string `json:"rpiCameraAfWindow"`
+- RPICameraFlickerPeriod uint `json:"rpiCameraFlickerPeriod"`
+- RPICameraTextOverlayEnable bool `json:"rpiCameraTextOverlayEnable"`
+- RPICameraTextOverlay string `json:"rpiCameraTextOverlay"`
+- RPICameraCodec string `json:"rpiCameraCodec"`
+- RPICameraIDRPeriod uint `json:"rpiCameraIDRPeriod"`
+- RPICameraBitrate uint `json:"rpiCameraBitrate"`
+- RPICameraProfile *string `json:"rpiCameraProfile,omitempty" deprecated:"true"`
+- RPICameraLevel *string `json:"rpiCameraLevel,omitempty" deprecated:"true"`
+- RPICameraHardwareH264Profile *string `json:"rpiCameraHardwareH264Profile,omitempty" deprecated:"true"`
+- RPICameraHardwareH264Level *string `json:"rpiCameraHardwareH264Level,omitempty" deprecated:"true"`
+- RPICameraSoftwareH264Profile *string `json:"rpiCameraSoftwareH264Profile,omitempty" deprecated:"true"`
+- RPICameraSoftwareH264Level *string `json:"rpiCameraSoftwareH264Level,omitempty" deprecated:"true"`
+- RPICameraH264Profile string `json:"rpiCameraH264Profile"`
+- RPICameraH264Level string `json:"rpiCameraH264Level"`
+- RPICameraJPEGQuality *uint `json:"rpiCameraJPEGQuality,omitempty" deprecated:"true"`
+- RPICameraMJPEGQuality uint `json:"rpiCameraMJPEGQuality"`
+- RPICameraPrimaryName string `json:"-"` // filled by Validate()
+- RPICameraSecondaryCodec string `json:"-"` // filled by Validate()
+- RPICameraSecondaryWidth uint `json:"-"` // filled by Validate()
+- RPICameraSecondaryHeight uint `json:"-"` // filled by Validate()
+- RPICameraSecondaryFPS float64 `json:"-"` // filled by Validate()
+- RPICameraSecondaryIDRPeriod uint `json:"-"` // filled by Validate()
+- RPICameraSecondaryBitrate uint `json:"-"` // filled by Validate()
+- RPICameraSecondaryH264Profile string `json:"-"` // filled by Validate()
+- RPICameraSecondaryH264Level string `json:"-"` // filled by Validate()
+- RPICameraSecondaryMJPEGQuality uint `json:"-"` // filled by Validate()
++// RPICameraCamID uint `json:"rpiCameraCamID"`
++// RPICameraSecondary bool `json:"rpiCameraSecondary"`
++// RPICameraWidth uint `json:"rpiCameraWidth"`
++// RPICameraHeight uint `json:"rpiCameraHeight"`
++// RPICameraHFlip bool `json:"rpiCameraHFlip"`
++// RPICameraVFlip bool `json:"rpiCameraVFlip"`
++// RPICameraBrightness float64 `json:"rpiCameraBrightness"`
++// RPICameraContrast float64 `json:"rpiCameraContrast"`
++// RPICameraSaturation float64 `json:"rpiCameraSaturation"`
++// RPICameraSharpness float64 `json:"rpiCameraSharpness"`
++// RPICameraExposure string `json:"rpiCameraExposure"`
++// RPICameraAWB string `json:"rpiCameraAWB"`
++// RPICameraAWBGains []float64 `json:"rpiCameraAWBGains"`
++// RPICameraDenoise string `json:"rpiCameraDenoise"`
++// RPICameraShutter uint `json:"rpiCameraShutter"`
++// RPICameraMetering string `json:"rpiCameraMetering"`
++// RPICameraGain float64 `json:"rpiCameraGain"`
++// RPICameraEV float64 `json:"rpiCameraEV"`
++// RPICameraROI string `json:"rpiCameraROI"`
++// RPICameraHDR bool `json:"rpiCameraHDR"`
++// RPICameraTuningFile string `json:"rpiCameraTuningFile"`
++// RPICameraMode string `json:"rpiCameraMode"`
++// RPICameraFPS float64 `json:"rpiCameraFPS"`
++// RPICameraAfMode string `json:"rpiCameraAfMode"`
++// RPICameraAfRange string `json:"rpiCameraAfRange"`
++// RPICameraAfSpeed string `json:"rpiCameraAfSpeed"`
++// RPICameraLensPosition float64 `json:"rpiCameraLensPosition"`
++// RPICameraAfWindow string `json:"rpiCameraAfWindow"`
++// RPICameraFlickerPeriod uint `json:"rpiCameraFlickerPeriod"`
++// RPICameraTextOverlayEnable bool `json:"rpiCameraTextOverlayEnable"`
++// RPICameraTextOverlay string `json:"rpiCameraTextOverlay"`
++// RPICameraCodec string `json:"rpiCameraCodec"`
++// RPICameraIDRPeriod uint `json:"rpiCameraIDRPeriod"`
++// RPICameraBitrate uint `json:"rpiCameraBitrate"`
++// RPICameraProfile *string `json:"rpiCameraProfile,omitempty" deprecated:"true"`
++// RPICameraLevel *string `json:"rpiCameraLevel,omitempty" deprecated:"true"`
++// RPICameraHardwareH264Profile *string `json:"rpiCameraHardwareH264Profile,omitempty" deprecated:"true"`
++// RPICameraHardwareH264Level *string `json:"rpiCameraHardwareH264Level,omitempty" deprecated:"true"`
++// RPICameraSoftwareH264Profile *string `json:"rpiCameraSoftwareH264Profile,omitempty" deprecated:"true"`
++// RPICameraSoftwareH264Level *string `json:"rpiCameraSoftwareH264Level,omitempty" deprecated:"true"`
++// RPICameraH264Profile string `json:"rpiCameraH264Profile"`
++// RPICameraH264Level string `json:"rpiCameraH264Level"`
++// RPICameraJPEGQuality *uint `json:"rpiCameraJPEGQuality,omitempty" deprecated:"true"`
++// RPICameraMJPEGQuality uint `json:"rpiCameraMJPEGQuality"`
++// RPICameraPrimaryName string `json:"-"` // filled by Validate()
++// RPICameraSecondaryCodec string `json:"-"` // filled by Validate()
++// RPICameraSecondaryWidth uint `json:"-"` // filled by Validate()
++// RPICameraSecondaryHeight uint `json:"-"` // filled by Validate()
++// RPICameraSecondaryFPS float64 `json:"-"` // filled by Validate()
++// RPICameraSecondaryIDRPeriod uint `json:"-"` // filled by Validate()
++// RPICameraSecondaryBitrate uint `json:"-"` // filled by Validate()
++// RPICameraSecondaryH264Profile string `json:"-"` // filled by Validate()
++// RPICameraSecondaryH264Level string `json:"-"` // filled by Validate()
++// RPICameraSecondaryMJPEGQuality uint `json:"-"` // filled by Validate()
+
+ // Hooks
+ RunOnInit string `json:"runOnInit"`
+@@ -407,27 +407,27 @@ func (pconf *Path) setDefaults() {
+ pconf.WHEPTrackGatherTimeout = Duration(2 * time.Second)
+
+ // Raspberry Pi Camera source
+- pconf.RPICameraWidth = 1920
+- pconf.RPICameraHeight = 1080
+- pconf.RPICameraContrast = 1
+- pconf.RPICameraSaturation = 1
+- pconf.RPICameraSharpness = 1
+- pconf.RPICameraExposure = "normal"
+- pconf.RPICameraAWB = "auto"
+- pconf.RPICameraAWBGains = []float64{0, 0}
+- pconf.RPICameraDenoise = "off"
+- pconf.RPICameraMetering = "centre"
+- pconf.RPICameraFPS = 30
+- pconf.RPICameraAfMode = "continuous"
+- pconf.RPICameraAfRange = "normal"
+- pconf.RPICameraAfSpeed = "normal"
+- pconf.RPICameraTextOverlay = "%Y-%m-%d %H:%M:%S - MediaMTX"
+- pconf.RPICameraCodec = "auto"
+- pconf.RPICameraIDRPeriod = 60
+- pconf.RPICameraBitrate = 5000000
+- pconf.RPICameraH264Profile = "auto"
+- pconf.RPICameraH264Level = "4.1"
+- pconf.RPICameraMJPEGQuality = 60
++// pconf.RPICameraWidth = 1920
++// pconf.RPICameraHeight = 1080
++// pconf.RPICameraContrast = 1
++// pconf.RPICameraSaturation = 1
++// pconf.RPICameraSharpness = 1
++// pconf.RPICameraExposure = "normal"
++// pconf.RPICameraAWB = "auto"
++// pconf.RPICameraAWBGains = []float64{0, 0}
++// pconf.RPICameraDenoise = "off"
++// pconf.RPICameraMetering = "centre"
++// pconf.RPICameraFPS = 30
++// pconf.RPICameraAfMode = "continuous"
++// pconf.RPICameraAfRange = "normal"
++// pconf.RPICameraAfSpeed = "normal"
++// pconf.RPICameraTextOverlay = "%Y-%m-%d %H:%M:%S - MediaMTX"
++// pconf.RPICameraCodec = "auto"
++// pconf.RPICameraIDRPeriod = 60
++// pconf.RPICameraBitrate = 5000000
++// pconf.RPICameraH264Profile = "auto"
++// pconf.RPICameraH264Level = "4.1"
++// pconf.RPICameraMJPEGQuality = 60
+
+ // Hooks
+ pconf.RunOnDemandStartTimeout = 10 * Duration(time.Second)
+@@ -483,41 +483,41 @@ func (pconf *Path) logDeprecations(l logger.Writer) {
+ l.Log(logger.Warn, "parameter 'sourceAnyPortEnable' is deprecated and has been replaced with 'rtspAnyPort'")
+ }
+
+- if pconf.RPICameraProfile != nil {
+- l.Log(logger.Warn, "parameter 'rpiCameraProfile' is deprecated"+
+- " and has been replaced with 'rpiCameraHardwareH264Profile'")
+- }
++// if pconf.RPICameraProfile != nil {
++// l.Log(logger.Warn, "parameter 'rpiCameraProfile' is deprecated"+
++// " and has been replaced with 'rpiCameraHardwareH264Profile'")
++// }
++//
++// if pconf.RPICameraLevel != nil {
++// l.Log(logger.Warn, "parameter 'rpiCameraLevel' is deprecated"+
++// " and has been replaced with 'rpiCameraHardwareH264Level'")
++// }
++//
++// if pconf.RPICameraHardwareH264Profile != nil {
++// l.Log(logger.Warn, "parameter 'rpiCameraHardwareH264Profile' is deprecated"+
++// " and has been replaced with 'rpiCameraH264Profile'")
++// }
++//
++// if pconf.RPICameraHardwareH264Level != nil {
++// l.Log(logger.Warn, "parameter 'rpiCameraHardwareH264Level' is deprecated"+
++// " and has been replaced with 'rpiCameraH264Level'")
++// }
++//
++// if pconf.RPICameraSoftwareH264Profile != nil {
++// l.Log(logger.Warn, "parameter 'rpiCameraSoftwareH264Profile' is deprecated"+
++// " and has been replaced with 'rpiCameraH264Profile'")
++// }
++//
++// if pconf.RPICameraSoftwareH264Level != nil {
++// l.Log(logger.Warn, "parameter 'rpiCameraSoftwareH264Level' is deprecated"+
++// " and has been replaced with 'rpiCameraH264Level'")
++// }
++//
++// if pconf.RPICameraJPEGQuality != nil {
++// l.Log(logger.Warn, "parameter 'rpiCameraJPEGQuality' is deprecated"+
++// " and has been replaced with 'rpiCameraMJPEGQuality'")
++// }
+
+- if pconf.RPICameraLevel != nil {
+- l.Log(logger.Warn, "parameter 'rpiCameraLevel' is deprecated"+
+- " and has been replaced with 'rpiCameraHardwareH264Level'")
+- }
+-
+- if pconf.RPICameraHardwareH264Profile != nil {
+- l.Log(logger.Warn, "parameter 'rpiCameraHardwareH264Profile' is deprecated"+
+- " and has been replaced with 'rpiCameraH264Profile'")
+- }
+-
+- if pconf.RPICameraHardwareH264Level != nil {
+- l.Log(logger.Warn, "parameter 'rpiCameraHardwareH264Level' is deprecated"+
+- " and has been replaced with 'rpiCameraH264Level'")
+- }
+-
+- if pconf.RPICameraSoftwareH264Profile != nil {
+- l.Log(logger.Warn, "parameter 'rpiCameraSoftwareH264Profile' is deprecated"+
+- " and has been replaced with 'rpiCameraH264Profile'")
+- }
+-
+- if pconf.RPICameraSoftwareH264Level != nil {
+- l.Log(logger.Warn, "parameter 'rpiCameraSoftwareH264Level' is deprecated"+
+- " and has been replaced with 'rpiCameraH264Level'")
+- }
+-
+- if pconf.RPICameraJPEGQuality != nil {
+- l.Log(logger.Warn, "parameter 'rpiCameraJPEGQuality' is deprecated"+
+- " and has been replaced with 'rpiCameraMJPEGQuality'")
+- }
+-
+ if pconf.RunOnReady != nil {
+ l.Log(logger.Warn, "parameter 'runOnReady' is deprecated and has been replaced with 'runOnAvailable'")
+ }
+@@ -630,120 +630,120 @@ func (pconf *Path) validateShared(conf *Conf) error {
+ }
+ }
+
+- // Raspberry Pi Camera source
++// // Raspberry Pi Camera source
++//
++// if pconf.RPICameraWidth == 0 {
++// return fmt.Errorf("invalid 'rpiCameraWidth' value")
++// }
++//
++// if pconf.RPICameraHeight == 0 {
++// return fmt.Errorf("invalid 'rpiCameraHeight' value")
++// }
++//
++// switch pconf.RPICameraExposure {
++// case "normal", "short", "long", "custom":
++// default:
++// return fmt.Errorf("invalid 'rpiCameraExposure' value")
++// }
++//
++// switch pconf.RPICameraAWB {
++// case "auto", "incandescent", "tungsten", "fluorescent", "indoor", "daylight", "cloudy", "custom":
++// default:
++// return fmt.Errorf("invalid 'rpiCameraAWB' value")
++// }
++//
++// if len(pconf.RPICameraAWBGains) != 2 {
++// return fmt.Errorf("invalid 'rpiCameraAWBGains' value")
++// }
++//
++// switch pconf.RPICameraDenoise {
++// case "off", "cdn_off", "cdn_fast", "cdn_hq":
++// default:
++// return fmt.Errorf("invalid 'rpiCameraDenoise' value")
++// }
++//
++// switch pconf.RPICameraMetering {
++// case "centre", "spot", "matrix", "custom":
++// default:
++// return fmt.Errorf("invalid 'rpiCameraMetering' value")
++// }
++//
++// switch pconf.RPICameraAfMode {
++// case "auto", "manual", "continuous":
++// default:
++// return fmt.Errorf("invalid 'rpiCameraAfMode' value")
++// }
++//
++// switch pconf.RPICameraAfRange {
++// case "normal", "macro", "full":
++// default:
++// return fmt.Errorf("invalid 'rpiCameraAfRange' value")
++// }
++//
++// switch pconf.RPICameraAfSpeed {
++// case "normal", "fast":
++// default:
++// return fmt.Errorf("invalid 'rpiCameraAfSpeed' value")
++// }
++//
++// switch pconf.RPICameraCodec {
++// case "auto", "hardwareH264", "softwareH264", "mjpeg":
++// default:
++// return fmt.Errorf("supported codecs for a RPI Camera stream are auto, hardwareH264, softwareH264, mjpeg")
++// }
++//
++// switch pconf.RPICameraH264Profile {
++// case "auto", "baseline", "main", "high":
++// default:
++// return fmt.Errorf("invalid 'rpiCameraH264Profile' value")
++// }
++//
++// switch pconf.RPICameraH264Level {
++// case "4.0", "4.1", "4.2":
++// default:
++// return fmt.Errorf("invalid 'rpiCameraH264Level' value")
++// }
++//
++// profile := pconf.RPICameraProfile
++// if profile == nil {
++// profile = pconf.RPICameraHardwareH264Profile
++// }
++// if profile != nil {
++// switch *profile {
++// case "baseline", "main", "high":
++// default:
++// return fmt.Errorf("invalid 'rpiCameraHardwareH264Profile' value")
++// }
++// }
++//
++// level := pconf.RPICameraLevel
++// if level == nil {
++// level = pconf.RPICameraHardwareH264Level
++// }
++// if level != nil {
++// switch *level {
++// case "4.0", "4.1", "4.2":
++// default:
++// return fmt.Errorf("invalid 'rpiCameraHardwareH264Level' value")
++// }
++// }
++//
++// if pconf.RPICameraSoftwareH264Profile != nil {
++// switch *pconf.RPICameraSoftwareH264Profile {
++// case "baseline", "main", "high":
++// default:
++// return fmt.Errorf("invalid 'rpiCameraSoftwareH264Profile' value")
++// }
++// }
++//
++// if pconf.RPICameraSoftwareH264Level != nil {
++// switch *pconf.RPICameraSoftwareH264Level {
++// case "4.0", "4.1", "4.2":
++// default:
++// return fmt.Errorf("invalid 'rpiCameraSoftwareH264Level' value")
++// }
++// }
+
+- if pconf.RPICameraWidth == 0 {
+- return fmt.Errorf("invalid 'rpiCameraWidth' value")
+- }
+-
+- if pconf.RPICameraHeight == 0 {
+- return fmt.Errorf("invalid 'rpiCameraHeight' value")
+- }
+-
+- switch pconf.RPICameraExposure {
+- case "normal", "short", "long", "custom":
+- default:
+- return fmt.Errorf("invalid 'rpiCameraExposure' value")
+- }
+-
+- switch pconf.RPICameraAWB {
+- case "auto", "incandescent", "tungsten", "fluorescent", "indoor", "daylight", "cloudy", "custom":
+- default:
+- return fmt.Errorf("invalid 'rpiCameraAWB' value")
+- }
+-
+- if len(pconf.RPICameraAWBGains) != 2 {
+- return fmt.Errorf("invalid 'rpiCameraAWBGains' value")
+- }
+-
+- switch pconf.RPICameraDenoise {
+- case "off", "cdn_off", "cdn_fast", "cdn_hq":
+- default:
+- return fmt.Errorf("invalid 'rpiCameraDenoise' value")
+- }
+-
+- switch pconf.RPICameraMetering {
+- case "centre", "spot", "matrix", "custom":
+- default:
+- return fmt.Errorf("invalid 'rpiCameraMetering' value")
+- }
+-
+- switch pconf.RPICameraAfMode {
+- case "auto", "manual", "continuous":
+- default:
+- return fmt.Errorf("invalid 'rpiCameraAfMode' value")
+- }
+-
+- switch pconf.RPICameraAfRange {
+- case "normal", "macro", "full":
+- default:
+- return fmt.Errorf("invalid 'rpiCameraAfRange' value")
+- }
+-
+- switch pconf.RPICameraAfSpeed {
+- case "normal", "fast":
+- default:
+- return fmt.Errorf("invalid 'rpiCameraAfSpeed' value")
+- }
+-
+- switch pconf.RPICameraCodec {
+- case "auto", "hardwareH264", "softwareH264", "mjpeg":
+- default:
+- return fmt.Errorf("supported codecs for a RPI Camera stream are auto, hardwareH264, softwareH264, mjpeg")
+- }
+-
+- switch pconf.RPICameraH264Profile {
+- case "auto", "baseline", "main", "high":
+- default:
+- return fmt.Errorf("invalid 'rpiCameraH264Profile' value")
+- }
+-
+- switch pconf.RPICameraH264Level {
+- case "4.0", "4.1", "4.2":
+- default:
+- return fmt.Errorf("invalid 'rpiCameraH264Level' value")
+- }
+-
+- profile := pconf.RPICameraProfile
+- if profile == nil {
+- profile = pconf.RPICameraHardwareH264Profile
+- }
+- if profile != nil {
+- switch *profile {
+- case "baseline", "main", "high":
+- default:
+- return fmt.Errorf("invalid 'rpiCameraHardwareH264Profile' value")
+- }
+- }
+-
+- level := pconf.RPICameraLevel
+- if level == nil {
+- level = pconf.RPICameraHardwareH264Level
+- }
+- if level != nil {
+- switch *level {
+- case "4.0", "4.1", "4.2":
+- default:
+- return fmt.Errorf("invalid 'rpiCameraHardwareH264Level' value")
+- }
+- }
+-
+- if pconf.RPICameraSoftwareH264Profile != nil {
+- switch *pconf.RPICameraSoftwareH264Profile {
+- case "baseline", "main", "high":
+- default:
+- return fmt.Errorf("invalid 'rpiCameraSoftwareH264Profile' value")
+- }
+- }
+-
+- if pconf.RPICameraSoftwareH264Level != nil {
+- switch *pconf.RPICameraSoftwareH264Level {
+- case "4.0", "4.1", "4.2":
+- default:
+- return fmt.Errorf("invalid 'rpiCameraSoftwareH264Level' value")
+- }
+- }
+-
+ // Source-dependent checks
+
+ switch {
+@@ -809,7 +809,7 @@ func (pconf *Path) validateShared(conf *Conf) error {
+
+ case pconf.Source == "redirect":
+
+- case pconf.Source == "rpiCamera":
++// case pconf.Source == "rpiCamera":
+
+ default:
+ return fmt.Errorf("'source': unsupported source type")
+@@ -933,20 +933,20 @@ func (pconf *Path) validate(
+ pconf.RTSPAnyPort = *pconf.SourceAnyPortEnable
+ }
+
+- // Raspberry Pi Camera source
+-
+- if pconf.RPICameraProfile != nil {
*** 365 LINES SKIPPED ***