This commit is contained in:
legop3
2026-07-11 03:27:47 -04:00
parent 8ec9ecc8d4
commit c06ac6bc20
6 changed files with 28 additions and 11 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -78,7 +78,7 @@
<script defer src="https://analytics.otter.land/script.js" data-website-id="82dd56a5-db44-4279-bd1e-a4d9fee39af7" data-domains="rover.otter.land"></script> <script defer src="https://analytics.otter.land/script.js" data-website-id="82dd56a5-db44-4279-bd1e-a4d9fee39af7" data-domains="rover.otter.land"></script>
<script defer src="https://analytics.otter.land/recorder.js" data-website-id="82dd56a5-db44-4279-bd1e-a4d9fee39af7" data-domains="rover.otter.land" data-sample-rate="0.15" data-mask-level="moderate" data-max-duration="300000"></script> <script defer src="https://analytics.otter.land/recorder.js" data-website-id="82dd56a5-db44-4279-bd1e-a4d9fee39af7" data-domains="rover.otter.land" data-sample-rate="0.15" data-mask-level="moderate" data-max-duration="300000"></script>
<title>Roomba Rover</title> <title>Roomba Rover</title>
<script type="module" crossorigin src="/assets/index-DA6e69VD.js"></script> <script type="module" crossorigin src="/assets/index-DM5rqxP4.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DwpUkSbG.css"> <link rel="stylesheet" crossorigin href="/assets/index-DwpUkSbG.css">
</head> </head>
<body> <body>
+23 -5
View File
@@ -231,10 +231,11 @@ function startPublisher() {
intentionally kept here, at the single camera publisher boundary, so the intentionally kept here, at the single camera publisher boundary, so the
rest of the video auth/session/UI code still sees one normal MediaMTX path. rest of the video auth/session/UI code still sees one normal MediaMTX path.
Audio is dropped for now because the camera sends AAC on this stream and The camera audio is AAC LC at 16 kHz mono. Keep it inline with the video so
MediaMTX/WHEP clients in this setup negotiate Opus/G711-style audio, not the PTZ camera remains one MediaMTX/WHEP source, but transcode it to Opus
AAC. Keeping only H264 video gives the browser one compatible codec to because that is the WebRTC-friendly audio codec browsers should negotiate
negotiate instead of letting an unsupported audio track poison playback. through MediaMTX. This avoids creating a rover-style separate audio stream
for a camera that already provides synchronized audio in the RTSP feed.
These encoder settings trade compression efficiency for control latency: These encoder settings trade compression efficiency for control latency:
ultrafast avoids deep analysis, zerolatency disables x264 buffering, bf=0 ultrafast avoids deep analysis, zerolatency disables x264 buffering, bf=0
@@ -258,7 +259,10 @@ function startPublisher() {
'tcp', 'tcp',
'-i', '-i',
input, input,
'-an', '-map',
'0:v:0',
'-map',
'0:a:0',
'-c:v', '-c:v',
'libx264', 'libx264',
'-preset', '-preset',
@@ -279,6 +283,20 @@ function startPublisher() {
'0', '0',
'-pix_fmt', '-pix_fmt',
'yuv420p', 'yuv420p',
'-c:a',
'libopus',
'-application',
'lowdelay',
'-frame_duration',
'10',
'-b:a',
'32k',
'-ac',
'1',
'-ar',
'48000',
'-strict',
'-2',
'-f', '-f',
'mpegts', 'mpegts',
output, output,
@@ -120,7 +120,6 @@ function PtzLiveVideo({ enabled }) {
scheduleRetry(); scheduleRetry();
} }
}, },
receiveAudio: false,
}); });
playerRef.current = player; playerRef.current = player;
player.start().catch((err) => { player.start().catch((err) => {
@@ -144,7 +143,7 @@ function PtzLiveVideo({ enabled }) {
return ( return (
<div className="relative h-full w-full bg-black"> <div className="relative h-full w-full bg-black">
<video ref={videoRef} className="h-full w-full object-contain" muted playsInline autoPlay /> <video ref={videoRef} className="h-full w-full object-contain" playsInline autoPlay />
<div className="pointer-events-none absolute bottom-2 left-2 rounded bg-black/70 px-2 py-1 text-xs text-slate-100"> <div className="pointer-events-none absolute bottom-2 left-2 rounded bg-black/70 px-2 py-1 text-xs text-slate-100">
{source?.error || status} {source?.error || status}
</div> </div>