[Config Support]: h264 recording with h265 cameras #16040
-
Describe the problem you are havingHi, I'm using a Beelink EQ14 (Intel N100) with a coral USB accelerator. Frigate is running in docker on a Debian 12 bare-metal system. I use frigate to interface with a Reolink NVR that hosts 12 Reolink RLC 811A 4k cameras. I also have HA running on HAos on a RaspberryPi that acts as a MQTT broker and interfaces with Frigate via its integration. After many tries, I've arrived at a configuration that works and gives no error in Frigate. This configuration uses the RLC 811A's main RTSP h265 stream for recording and the RTMP "ext" stream for detection. I have attached the redacted version of this config below. On a computer everything is fine, unfortunately I discovered that mobile phones do not have the h265 decode capability so when I get a notification to my mobile I cannot see the video snippet of the event. I've seen on this Github discussions that you can use frigate to convert h265 to h264 for the recordings (even if it's not efficient). I've changed my configuration for all cameras as so:
However I still get clips encoded as h265 and so not viewable on mobiles. I also noticed that the IGpu is always at 0% so it's clear this is not working. I've experimented in changing both the go2rtc and the cameras\ffmpeg part of the configuration but I either get errors and no streams or recordings in h265. I've tried looking for a solution here and on reddit but to no avail so I'm at a loss. Can somebody please suggests me what I'm doing wrong ? Version0.14.1-f4f3cfa Frigate config filemqtt:
enabled: true
port: <>
host: <>
user: <>
password: <>
detect:
fps: 10
detectors:
coral:
type: edgetpu
device: usb
objects:
track:
- person
- car
- dog
- cat
record:
enabled: true
retain:
days: 1
mode: active_objects
events:
retain:
default: 30
mode: motion
ffmpeg:
hwaccel_args: preset-vaapi
output_args:
record: preset-record-generic-audio-copy
review:
alerts:
# Optional: labels that qualify as an alert
labels:
- car
- person
detections:
# Optional: labels that qualify as a detection
labels:
- car
- person
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips
enabled: true
retain:
default: 10
objects:
person: 15
quality: 100
go2rtc:
streams:
cancello_sin:
- rtsp://<user>:<pass>@<ip>:554/h265Preview_01_main
- ffmpeg:cancello_sin#audio=opus
cancello_des:
- rtsp://<user>:<pass>@<ip>:554/h265Preview_02_main
- ffmpeg:cancello_des#audio=opus
...
cameras:
cancello_sin:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/cancello_sin?video=copy&audio=opus
input_args: preset-rtsp-restream
roles:
- record
- audio
- path:
https://<ip>/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=<user>&password=<pass>
input_args: preset-rtmp-generic
roles:
- detect
...
version: 0.14 Relevant Frigate log outputNo relevant Frigate error logs Relevant go2rtc log outputNo relevant go2rtc logs Frigate statsNo response Operating systemDebian Install methodDocker Compose docker-compose file or Docker CLI commandversion: "3.9"
services:
frigate:
container_name: frigate
restart: unless-stopped
shm_size: "104mb"
devices:
- /dev/bus/usb:/dev/bus/usb
- /dev/dri/renderD128:/dev/dri/renderD128
- /dev/dri/card0:/dev/dri/card0
image: ghcr.io/blakeblackshear/frigate:stable
cap_add:
- CAP_PERFMON
privileged: true
volumes:
- ./config:/config
- ./storage:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "8971:8971"
- "5000:5000"
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp Object DetectorCoral Screenshots of the Frigate UI's System metrics pagesAny other information that may be helpfulI've also thought that maybe the IGpu was the problem so trying different things I found out that:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
In general that's not true, the vast majority of phones support h265 as long as the browser used supports h265 |
Beta Was this translation helpful? Give feedback.
The example uses:
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -tag:v hvc1 -bsf:v hevc_mp4toannexb -c:a aac
That configuration lead to errors\black feed. After many different tries I found out it was caused by the audio encoder. So finally I arrived at this configuration that works perfectly with my reolink h265 cameras and correctly displays h265 on iphones: