mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Update go2rtc, simplify manual stream, and support audio for MSE & WebRTC (#4391)
* Update go2rtc to rc3 * Simplify ffmpeg / audio conversions * Set ffmpeg bin location * Manually set video as copied * Run go2rtc with env vars * Remove manual ffmpeg declaration * Enable force_audio by default * Fix test
This commit is contained in:
parent
664e04836d
commit
4eb3e98076
@ -119,7 +119,7 @@ RUN --mount=type=bind,from=wheels,source=/wheels,target=/wheels \
|
||||
ENV PATH=$PATH:/usr/lib/btbn-ffmpeg/bin
|
||||
|
||||
# install go2rtc
|
||||
RUN wget -O go2rtc "https://github.com/AlexxIT/go2rtc/releases/download/v0.1-rc.2/go2rtc_linux_${TARGETARCH}" \
|
||||
RUN wget -O go2rtc "https://github.com/AlexxIT/go2rtc/releases/download/v0.1-rc.3/go2rtc_linux_${TARGETARCH}" \
|
||||
&& chmod +x go2rtc \
|
||||
&& mkdir -p /usr/local/go2rtc/sbin/ \
|
||||
&& mv go2rtc /usr/local/go2rtc/sbin/go2rtc
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425?permalink_comment_id=3945021
|
||||
set -euo pipefail
|
||||
|
@ -354,7 +354,7 @@ restream:
|
||||
# Optional: Enable the restream (default: True)
|
||||
enabled: True
|
||||
# Optional: Force audio compatibility with browsers (default: shown below)
|
||||
force_audio: False
|
||||
force_audio: True
|
||||
# Optional: jsmpeg stream configuration for WebUI
|
||||
jsmpeg:
|
||||
# Optional: Set the height of the jsmpeg stream. (default: 720)
|
||||
|
@ -536,7 +536,7 @@ class JsmpegStreamConfig(FrigateBaseModel):
|
||||
class RestreamConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(default=True, title="Restreaming enabled.")
|
||||
force_audio: bool = Field(
|
||||
default=False, title="Force audio compatibility with the browser."
|
||||
default=True, title="Force audio compatibility with the browser."
|
||||
)
|
||||
jsmpeg: JsmpegStreamConfig = Field(
|
||||
default_factory=JsmpegStreamConfig, title="Jsmpeg Stream Configuration."
|
||||
|
@ -12,7 +12,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
def get_manual_go2rtc_stream(camera_url: str) -> str:
|
||||
"""Get a manual stream for go2rtc."""
|
||||
return f"exec: /usr/lib/btbn-ffmpeg/bin/ffmpeg -i {camera_url} -c:v copy -c:a libopus -rtsp_transport tcp -f rtsp {{output}}"
|
||||
return f"ffmpeg:{camera_url}#video=copy#audio=aac#audio=opus"
|
||||
|
||||
|
||||
class RestreamApi:
|
||||
|
@ -25,6 +25,7 @@ class TestRestream(TestCase):
|
||||
},
|
||||
"restream": {
|
||||
"enabled": True,
|
||||
"force_audio": False,
|
||||
},
|
||||
},
|
||||
"front": {
|
||||
|
Loading…
Reference in New Issue
Block a user