frigate
frigate copied to clipboard
[Support]: The media could not be loaded, either because the server or network failed or because the format is not supported.
Describe the problem you are having
Hello,
I have two Annke C800 cameras, the streams are in h265.
Before I converted the streams to h264, but it uses a lot of cpu resources, now, as chrome can read hevc, I wanted to disable the conversion, except I have this error when I go to recordings:
The media could not be loaded, either because the server or network failed or because the format is not supported.
what is wrong with my configuration?
Version
0.11.1-2eada21
Frigate config file
mqtt:
host: 192.168.0.2
detectors:
coral:
type: edgetpu
device: usb
record:
enabled: True
retain:
days: 7
mode: all
events:
retain:
default: 10
birdseye:
enabled: False
snapshots:
enabled: True
retain:
default: 5
objects:
track:
- car
- person
ffmpeg:
hwaccel_args:
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
- -hwaccel_output_format
- yuv420p
cameras:
Entree: # <------ Name the camera
ffmpeg:
input_args: -avoid_negative_ts make_zero -fflags nobuffer+genpts+discardcorrupt -flags low_delay -strict experimental -rtsp_transport tcp -timeout 5000000
output_args:
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
#record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -vf format=nv12,hwupload,scale_vaapi=w=1920:h=1080 -c:v h264_vaapi -b:v 6M -c:a aac
inputs:
- path: rtsp://admin:<password>@192.168.0.10:554/Streaming/Channels/1
roles:
- record
- path: rtsp://admin:<password>@192.168.0.10:554/Streaming/Channels/2
roles:
- detect
rtmp:
enabled: False # <-- RTMP should be disabled if your stream is not H264
detect:
width: 640 # <---- update for your camera's resolution
height: 480 # <---- update for your camera's resolution
fps: 6
Garage: # <------ Name the camera
ffmpeg:
input_args: -avoid_negative_ts make_zero -fflags nobuffer+genpts+discardcorrupt -flags low_delay -strict experimental -rtsp_transport tcp -timeout 5000000
#input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000
output_args:
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
#record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -vf format=nv12,hwupload,scale_vaapi=w=1920:h=1080 -c:v h264_vaapi -b:v 6M -c:a aac
inputs:
- path: rtsp://admin:<password>@192.168.0.11:554/Streaming/Channels/1
roles:
- record
- path: rtsp://admin:<password>@192.168.0.11:554/Streaming/Channels/2
roles:
- detect
rtmp:
enabled: False # <-- RTMP should be disabled if your stream is not H264
detect:
width: 640 # <---- update for your camera's resolution
height: 480 # <---- update for your camera's resolution
fps: 6
Relevant log output
Plus API Key is not formatted correctly.
[2022-12-01 23:35:52] frigate.app INFO : Starting Frigate (0.11.1-2eada21)
Starting migrations
[2022-12-01 23:35:52] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2022-12-01 23:35:53] peewee_migrate INFO : There is nothing to migrate
[2022-12-01 23:35:53] detector.coral INFO : Starting detection process: 232
[2022-12-01 23:35:53] frigate.app INFO : Output process started: 234
[2022-12-01 23:35:53] ws4py INFO : Using epoll
[2022-12-01 23:35:53] frigate.edgetpu INFO : Attempting to load TPU as usb
[2022-12-01 23:35:53] frigate.app INFO : Camera processor started for Entree: 238
[2022-12-01 23:35:53] frigate.app INFO : Camera processor started for Garage: 242
[2022-12-01 23:35:53] frigate.app INFO : Capture process started for Entree: 244
[2022-12-01 23:35:53] frigate.app INFO : Capture process started for Garage: 247
[2022-12-01 23:35:53] ws4py INFO : Using epoll
[2022-12-01 23:35:55] frigate.edgetpu INFO : TPU found
[2022-12-01 23:36:03] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:37390]
[2022-12-01 23:36:06] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:37390]
[2022-12-01 23:36:06] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:33452]
FFprobe output from your camera
ffprobe version n5.1-2-g915ef932a3-20220731 Copyright (c) 2007-2022 the FFmpeg developers
built with gcc 12.1.0 (crosstool-NG 1.25.0.55_3defb7b)
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-mbedtls --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags=-pie --extra-libs='-ldl -lgomp' --extra-version=20220731
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
Input #0, rtsp, from 'rtsp://admin:<password>@192.168.0.10:554/Streaming/Channels/1':
Metadata:
title : Media Presentation
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: hevc (Main), yuvj420p(pc), 3840x2160 [SAR 1:1 DAR 16:9], 12.50 tbr, 90k tbn
Stream #0:1: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
Frigate stats
{"Entree":{"camera_fps":6.0,"capture_pid":244,"detection_fps":0.0,"pid":238,"process_fps":6.0,"skipped_fps":0.0},"Garage":{"camera_fps":6.1,"capture_pid":247,"detection_fps":0.0,"pid":242,"process_fps":6.1,"skipped_fps":0.0},"detection_fps":0.0,"detectors":{"coral":{"detection_start":0.0,"inference_speed":8.46,"pid":232}},"service":{"latest_version":"0.11.1","storage":{"/dev/shm":{"free":266.5,"mount_type":"tmpfs","total":268.4,"used":2.0},"/media/frigate/clips":{"free":6316188.8,"mount_type":"fuse.shfs","total":11996500.4,"used":5680311.6},"/media/frigate/recordings":{"free":6316188.8,"mount_type":"fuse.shfs","total":11996500.4,"used":5680311.6},"/tmp/cache":{"free":990.3,"mount_type":"tmpfs","total":1000.0,"used":9.7}},"temperatures":{},"uptime":78,"version":"0.11.1-2eada21"}}
Operating system
UNRAID
Install method
Docker CLI
Coral version
USB
Network connection
Wired
Camera make and model
Annke C800
Any other information that may be helpful
No response
- What version of chrome are you running?
- What do the browser logs say?
Hello,
version is 108.0.5359.72
in the console, i have this message 👍
For me to get H265 to work i had to remove HWaccel. I had the same arguments you have. Does it work if you delete:
ffmpeg:
hwaccel_args:
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
- -hwaccel_output_format
- yuv420p
Hello,
I try wihout hw accel, but it s the same.
PS : i remove all files before test.
Hello,
Have you an Idea ?
Regards
Romain
Does this not work in chrome desktop and chrome mobile? Have you tried other browsers?
I try with edge and mobile, but same problem
can you let the logs run for a bit longer, try to play, and then paste the logs here?
No errors :
Starting migrations
[2022-12-09 16:30:01] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2022-12-09 16:30:01] peewee_migrate INFO : There is nothing to migrate
[2022-12-09 16:30:01] detector.coral INFO : Starting detection process: 232
[2022-12-09 16:30:01] frigate.app INFO : Output process started: 234
[2022-12-09 16:30:01] ws4py INFO : Using epoll
[2022-12-09 16:30:01] frigate.edgetpu INFO : Attempting to load TPU as usb
[2022-12-09 16:30:01] frigate.app INFO : Camera processor started for Entree: 238
[2022-12-09 16:30:01] frigate.app INFO : Camera processor started for Garage: 241
[2022-12-09 16:30:01] frigate.app INFO : Capture process started for Entree: 244
[2022-12-09 16:30:01] frigate.app INFO : Capture process started for Garage: 245
[2022-12-09 16:30:02] ws4py INFO : Using epoll
[2022-12-09 16:30:04] frigate.edgetpu INFO : TPU found
[2022-12-09 16:30:31] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:51926]
[2022-12-09 16:32:12] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:51926]
[2022-12-09 17:39:02] frigate.watchdog INFO : Detection appears to be stuck. Restarting detection process...
[2022-12-09 17:39:02] root INFO : Waiting for detection process to exit gracefully...
[2022-12-09 17:39:32] root INFO : Detection process didnt exit. Force killing...
[2022-12-09 17:39:32] detector.coral INFO : Starting detection process: 3372
[2022-12-09 17:39:32] frigate.edgetpu INFO : Attempting to load TPU as usb
[2022-12-09 17:39:34] frigate.edgetpu INFO : TPU found
[2022-12-09 20:00:24] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:46834]
[2022-12-09 20:00:25] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:35242]
[2022-12-09 20:00:39] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:35242]
[2022-12-09 20:00:53] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:46834]
[2022-12-09 20:02:23] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59048]
[2022-12-09 20:02:45] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59048]
[2022-12-09 20:34:12] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:42802]
[2022-12-09 20:35:13] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:42802]```
I had the same error using an Amcrest ASH43-W camera and an intel nuc.
I did not have a hwaccel_args declared. It would grab the single image snapshots and tell me there was an event, but no recording. Once I added the following, everything started working in terms of recording:
hwaccel_args: -c:v h264_qsv
I am experiencing the same issue with 1 of my 2 Annke C800's. Both were previously working with H265 and could be viewed via Safari on macOS/iOS. At least I can now access the working camera via Chrome on Windows... Same version of Frigate: 0.11.1-2EADA21.
Chrome inspector reveals that it's getting a 404 for the HLS index. This can be reproduced via curl.
$ curl 'https://frigate.REDACTED/vod/2022-12/18/22/cam1/master.m3u8'
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.18.0</center>
</body>
</html>
$ curl 'https://frigate.REDACTED/vod/2022-12/18/22/cam2/master.m3u8'
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=9357910,RESOLUTION=3840x2160,FRAME-RATE=16.339,CODECS="hev1.1.6.L153.00,mp4a.40.2"
index-v1-a1.m3u8
Nothing interesting in Frigate's logs but nginx logs within the container reveal:
$ docker exec frigate cat /usr/local/nginx/logs/error.log
2022/12/18 22:57:45 [error] 204#204: *211 hevc_parser_pic_parameter_set_rbsp: invalid trailing bits while reading media header, client: 127.0.0.1, server: , request: "GET /vod/2022-12/18/22/cam1/master.m3u8 HTTP/1.1", host: "frigate.REDACTED"
I've tried:
- Commenting out
output_args
inconfig.yml
to disable audio. No difference. - Pointing
/media/frigate
to a fresh directory. No difference. - Swapping IP addresses of
cam1
&cam2
inconfig.yml
. The issue follows the IP address, after swapping I am able to view recordings from the "bad" camera that were recorded prior to the swap. And I am unable to view anything from the previously "good" camera. It seems that the nginx VOD module is reading the most recent clip to determine the codec+parameters to advertise for the stream.
Both of my C800's have identical firmware, config (at least by looking side by side in a browser), were previously working & haven't been touched since. Recordings can be viewed fine in VLC & even in browser after swapping the cameras IPs around. I'm stumped...
Edit: I've done a bit more testing
- Swap IPs on the cameras without restarting Frigate: the issue follows the "bad camera".
- Restore full config from good camera to "bad" camera. No change.
- Update firmware on the "bad" camera. No change. So the common denominator is one of my C800's which has a serial number approx 1500 less than the good unit. Or maybe something about the scene it's pointing at..?
Relevant bits of config.yml
cameras:
cam1:
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]:554/Streaming/Channels/101/
roles:
- record
- path: rtsp://admin:[email protected]:554/Streaming/Channels/102/
roles:
- detect
cam2:
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]:554/Streaming/Channels/101/
roles:
- record
- path: rtsp://admin:[email protected]:554/Streaming/Channels/102/
roles:
- detect
ffmpeg:
hwaccel_args:
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
- -hwaccel_output_format
- yuv420p
output_args:
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a copy
I have the same problem. Cannot see any clip from frigate interface, but I can see them without any problem from Home assistant.
Just wondering if anyone has more information on this, or can at least post some of the serial number ranges that are known to work vs. not work? And does ffprobe
show anything different between the "good" and "bad" camera by any chance?
I just bought a C800 camera (quite possibly a mistake, I know now, since compatibility seems iffy) and it'd be great if there was some sort of easy bench test to determine whether it's likely to work...
I get this same issue, but I think mine is related to the times stored in the database, and the query isn't returning any videos for that time range
[2023-01-13 08:51:43] frigate.app INFO : Starting Frigate (0.11.1-2eada21)
Starting migrations
[2023-01-13 08:51:43] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2023-01-13 08:51:43] peewee_migrate INFO : There is nothing to migrate
[2023-01-13 08:51:43] frigate.app INFO : Output process started: 214
[2023-01-13 08:51:43] frigate.app INFO : Camera processor started for girls_room: 218
[2023-01-13 08:51:43] ws4py INFO : Using epoll
[2023-01-13 08:51:43] frigate.app INFO : Camera processor started for playroom: 219
[2023-01-13 08:51:43] detector.coral_pci INFO : Starting detection process: 213
[2023-01-13 08:51:43] frigate.edgetpu INFO : Attempting to load TPU as pci
[2023-01-13 08:51:43] frigate.app INFO : Camera processor started for nursery: 221
[2023-01-13 08:51:43] frigate.app INFO : Camera processor started for doorbell: 226
[2023-01-13 08:51:43] frigate.app INFO : Capture process started for girls_room: 227
[2023-01-13 08:51:43] frigate.app INFO : Capture process started for playroom: 228
[2023-01-13 08:51:43] frigate.app INFO : Capture process started for nursery: 229
[2023-01-13 08:51:43] frigate.app INFO : Capture process started for doorbell: 230
[2023-01-13 08:51:43] frigate.edgetpu INFO : TPU found
[2023-01-13 08:51:44] ws4py INFO : Using epoll
[2023-01-13 08:51:46] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:54516]
[2023-01-13 08:51:49] frigate.record WARNING : Discarding a corrupt recording segment: doorbell-20230113085146.mp4
[2023-01-13 08:51:55] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:53584]
[2023-01-13 08:52:01] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:53584]
[2023-01-13 08:52:02] frigate.http ERROR : No recordings found for the requested time range
[2023-01-13 08:52:13] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:57176]
[2023-01-13 08:52:17] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:57176]
[2023-01-13 08:53:54] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:59538]
[2023-01-13 08:53:57] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:59538]
[2023-01-13 08:53:57] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:59540]
[2023-01-13 08:54:01] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:59540]
[2023-01-13 08:54:05] frigate.http ERROR : No recordings found for the requested time range
[2023-01-13 08:56:50] frigate.http ERROR : No recordings found for the requested time range
[2023-01-13 08:56:52] frigate.http ERROR : No recordings found for the requested time range
[2023-01-13 09:02:13] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:54516]
[2023-01-13 09:02:13] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59442]
[2023-01-13 09:02:14] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:37880]
[2023-01-13 09:02:17] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:37880]
[2023-01-13 09:02:19] frigate.http ERROR : No recordings found for the requested time range
I did take a peak at the database, and I did notice that the end time, for whatever reason has 3 decimals, but the start time doesn't... doubt that is the issue, but I did find it odd
This has been fixed in 0.12
Just wondering if anyone has more information on this, or can at least post some of the serial number ranges that are known to work vs. not work? And does
ffprobe
show anything different between the "good" and "bad" camera by any chance?
I can't see anything different in ffprobe output (aside from bitrate/tbr which varies between every segment anyway). I've attached a couple of sample recording segments. nginx-vod-module is the only component that works with one camera and not the other.
Bad: https://user-images.githubusercontent.com/23110282/212443021-ad941963-0651-4ca7-9608-ddfe098405f9.mp4 Good: https://user-images.githubusercontent.com/23110282/212443028-3da37259-8169-43ff-9f6d-9bf25214f9d6.mp4
I've gone back & re-tested with Frigate v0.10.1. Recording playback works fine with both of my cameras there, but only Safari works as a client.
I'll dig a bit deeper and see if I can reproduce the issue with nginx-vod-module on its own. If so I'll submit these samples & open an issue upstream.
This has been fixed in 0.12
I'm seeing the same error on v0.12.0-beta3. Now it it is directly in the Docker logs rather than hidden in /usr/local/nginx/logs.
[error] 112#112: *407 hevc_parser_pic_parameter_set_rbsp: invalid trailing bits while reading media header, client: 127.0.0.1, server: , request: "GET /vod/2023-01/14/11/cam1/Australia,Adelaide/master.m3u8 HTTP/1.1"
I've been able to work around this by patching nginx-vod-module to skip the trailing bits test, rebuilding nginx and copying the new /usr/local/nginx/sbin/nginx binary into my v0.12.0-beta3 container.
nginx-vod-module/vod/avc_hevc_parser.c
bool_t
avc_hevc_parser_rbsp_trailing_bits(bit_reader_state_t* reader)
{
return TRUE;
}
It seems that the presence of these trailing bits is technically against spec, but usually ignored without consequence.
I also came across this ffmpeg patch: https://patchwork.ffmpeg.org/project/ffmpeg/patch/[email protected]/ Seems that ffmpeg should be stripping these bits when converting to .mp4, but currently ignores them.
Postel's law says that software should be conservative in what it sends and liberal in what it accepts. ffmpeg and nginx-vod-module seem to have this backwards :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.