Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… migrate-s6-scripts
  • Loading branch information
felipecrs committed Jan 18, 2023
2 parents 1a74fad + f546642 commit 1f8fb50
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
20 changes: 18 additions & 2 deletions docker/rootfs/usr/local/go2rtc/create_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import yaml


BTBN_PATH = "/usr/lib/btbn-ffmpeg"
config_file = os.environ.get("CONFIG_FILE", "/config/config.yml")

# Check if we can use .yaml instead of .yml
Expand All @@ -22,10 +23,25 @@

go2rtc_config: dict[str, any] = config.get("go2rtc", {})

if not go2rtc_config.get("log", {}).get("format"):
# we want to ensure that logs are easy to read
if go2rtc_config.get("log") is None:
go2rtc_config["log"] = {"format": "text"}
elif go2rtc_config["log"].get("format") is None:
go2rtc_config["log"]["format"] = "text"

# should set default stun server so webrtc can work
if not go2rtc_config.get("webrtc", {}).get("candidates", []):
go2rtc_config["webrtc"] = {"candidates": ["stun:8555"]}

print(json.dumps(go2rtc_config))
# need to replace ffmpeg command when using ffmpeg4
if not os.path.exists(BTBN_PATH):
if go2rtc_config.get("ffmpeg") is None:
go2rtc_config["ffmpeg"] = {
"rtsp": "-fflags nobuffer -flags low_delay -stimeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}"
}
elif go2rtc_config["ffmpeg"].get("rtsp") is None:
go2rtc_config["ffmpeg"][
"rtsp"
] = "-fflags nobuffer -flags low_delay -stimeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}"

print(json.dumps(go2rtc_config))
6 changes: 0 additions & 6 deletions docs/docs/configuration/hardware_acceleration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ It is recommended to update your configuration to enable hardware accelerated de

### Raspberry Pi 3/4

:::caution

There is currently a bug in ffmpeg that causes hwaccel to not work for the RPi kernel 5.15.61 and above. For more information see https://github.com/blakeblackshear/frigate/issues/3780

:::

Ensure you increase the allocated RAM for your GPU to at least 128 (raspi-config > Performance Options > GPU Memory).
**NOTICE**: If you are using the addon, you may need to turn off `Protection mode` for hardware acceleration.

Expand Down
4 changes: 2 additions & 2 deletions web/src/routes/Camera.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default function Camera({ camera }) {
player = (
<Fragment>
<div className="max-w-5xl">
<MsePlayer camera={camera} />
<MsePlayer camera={cameraConfig.live.stream_name} />
</div>
</Fragment>
);
Expand All @@ -129,7 +129,7 @@ export default function Camera({ camera }) {
player = (
<Fragment>
<div className="max-w-5xl">
<WebRtcPlayer camera={camera} />
<WebRtcPlayer camera={cameraConfig.live.stream_name} />
</div>
</Fragment>
);
Expand Down

0 comments on commit 1f8fb50

Please sign in to comment.