Closed limitless-code closed 1 year ago
What version did you upgrade from?
And please use chrome://media-internals to see why playback is failing
render_id: 16
player_id: 0
created: 2023-03-28 21:35:55.957 UTC
origin_url: https://<>:8123/
kFrameUrl: https://<>:8123/media-browser/browser/app%2Cmedia-source%3A%2F%2Ffrigate/video%2Cmedia-source%3A%2F%2Ffrigate%2Ffrigate%2Frecordings%2F%2F%2F/video%2Cmedia-source%3A%2F%2Ffrigate%2Ffrigate%2Frecordings%2FMain-Drive%2F%2F/video%2Cmedia-source%3A%2F%2Ffrigate%2Ffrigate%2Frecordings%2FMain-Drive%2F2023-03-28%2F
kFrameTitle: Media – Home Assistant
url: blob:https://<>:8123/c5e2f687-4908-4685-b3de-81cd983a2739
kTextTracks:
info: ChunkDemuxer
kRendererName: RendererImpl
pipeline_state: kStopped
error: MediaSource endOfStream before demuxer initialization completes (before HAVE_METADATA) is treated as an error. This may also occur as consequence of other MediaSource errors before HAVE_METADATA.
event: kWebMediaPlayerDestroyed
duration: 51.515
00:00:00.000 | created | "2023-03-28 21:35:56.881 UTC"
-- | -- | --
00:00:00.000 | origin_url | "https://<>:8123/"
00:00:00.000 | kFrameUrl | "https://<>:8123/media-browser/browser/app%2Cmedia-source%3A%2F%2Ffrigate/video%2Cmedia-source%3A%2F%2Ffrigate%2Ffrigate%2Frecordings%2F%2F%2F/video%2Cmedia-source%3A%2F%2Ffrigate%2Ffrigate%2Frecordings%2FMain-Drive%2F%2F/video%2Cmedia-source%3A%2F%2Ffrigate%2Ffrigate%2Frecordings%2FMain-Drive%2F2023-03-28%2F"
00:00:00.000 | kFrameTitle | "Media – Home Assistant"
00:00:00.000 | url | "blob:https://<>:8123/6e22662e-0403-4aa7-8c59-b6cfe58e63a8"
00:00:00.000 | kTextTracks | []
00:00:00.000 | info | "ChunkDemuxer"
00:00:00.000 | kRendererName | "RendererImpl"
00:00:00.000 | pipeline_state | "kStarting"
00:00:00.371 | error | "MediaSource endOfStream before demuxer initialization completes (before HAVE_METADATA) is treated as an error. This may also occur as consequence of other MediaSource errors before HAVE_METADATA."
00:00:00.371 | event | "kWebMediaPlayerDestroyed"
00:00:00.371 | pipeline_state | "kStopping"
00:00:00.371 | pipeline_state | "kStopped"
00:00:00.001 | duration | 51.515
What version did you upgrade from? Do you see any errors in nginx logs?
I upgraded from 0.12.0 beta 9 no errors when i select a recording in nginx logs.
Key System: com.widevine.alpha
Robustness: Software Secure
Name: Widevine Content Decryption Module
Version: 4.10.2557.0
Path: /home/<>/.var/app/org.chromium.Chromium/config/chromium/WidevineCdm/4.10.2557.0/_platform_specific/linux_x64/libwidevinecdm.so
Status: Enabled
Capabilities: {"Audio Codecs":["aac","vorbis","flac","opus"],"Encryption Schemes":["CENC","CBCS"],"Session Types":["temporary"],"Video Codecs":{"av1":[],"h264":[],"vp8":[],"vp9":[]}}
If there are no errors in frigate itself then it is difficult to debug, we'd expect nginx errors like this similar issue: https://github.com/blakeblackshear/frigate/issues/5783#issuecomment-1477898072
also, nothing changed relating to recordings from beta9 to rc1 https://github.com/blakeblackshear/frigate/compare/v0.12.0-beta9...dev
I think it maybe something to do with zerotier. It works when I have the zerotier client running from my mobile but does not if i access HA from my laptop with out a zerotier client running (everything works apart from recordings and clips), or if I access it via HA companion app without zerotier client running on my mobile.
What about accessing the frigate webUI itself from the laptop without zerotier?
If I access frigate itself without zerotier running on the laptop recordings do not play, They also do not play when zerotier is running on the laptop (I checked I could ping the zerotier ip on HA). I get similar symptoms on my rpi 4 running latest version of raspbian.
Its working fine on my mobile using the companion app
or chrome
with zerotier running or not running it works on the mobile. In firefox
or firefox focus
on the mobile it does not work (cannot play recordings or clips)
Browser related?
As a side note if i access frigate webUI on HA in firefox (private browsing) it does not display (blank page), it displays fine in firefox when browsing "normally". the following error displays in the firefox browser console:
Uncaught (in promise) DOMException: A mutation operation was attempted on a database that did not allow mutations. 3
GEThttps://hassio.localdomain:8123/frontend_latest/fdbc9d2b.js
[HTTP/1.1 200 OK 48ms]
GEThttps://hassio.localdomain:8123/frontend_latest/b26bc7a3.js
[HTTP/1.1 200 OK 25ms]
GEThttps://hassio.localdomain:8123/frontend_latest/b894386b.js
[HTTP/1.1 200 OK 28ms]
GEThttps://hassio.localdomain:8123/frontend_latest/5ea92711.js
[HTTP/1.1 200 OK 30ms]
GEThttps://hassio.localdomain:8123/frontend_latest/d89fa442.js
[HTTP/1.1 200 OK 22ms]
GEThttps://hassio.localdomain:8123/frontend_latest/73f0328c.js
[HTTP/1.1 200 OK 21ms]
GEThttps://hassio.localdomain:8123/frontend_latest/d25d4332.js
[HTTP/1.1 200 OK 19ms]
GEThttps://hassio.localdomain:8123/frontend_latest/custom-panel.ff0ec5f0.js
[HTTP/1.1 200 OK 0ms]
GEThttps://hassio.localdomain:8123/api/hassio/app/entrypoint.js
[HTTP/1.1 200 OK 16ms]
GEThttps://hassio.localdomain:8123/api/hassio/app/frontend_latest/entrypoint.fc042133.js
[HTTP/1.1 200 OK 0ms]
GEThttps://hassio.localdomain:8123/api/hassio/app/frontend_latest/16b43715.js
[HTTP/1.1 200 OK 0ms]
GEThttps://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc//
[HTTP/1.1 200 OK 17ms]
GEThttps://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js
[HTTP/1.1 200 OK 0ms]
Uncaught (in promise) DOMException: A mutation operation was attempted on a database that did not allow mutations. [index-db0d4912.js:1:29908](https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js)
c https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
AsyncFunctionThrow self-hosted:814
(Async: async)
Wi https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
Qt https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
forEach self-hosted:203
xi https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
(Async: setTimeout handler)
n https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
(Async: FrameRequestCallback)
Ei https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
diffed https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
vn https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
Vr https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
vn https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
Vr https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
vn https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
Vr https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
vn https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
Vr https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
vn https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
Vr https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
vn https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
Vr https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
vn https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
Zt https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:1
<anonymous> https://hassio.localdomain:8123/api/hassio_ingress/RWNpqQFA7eZhbVsu6ahiMNTMlQQG4TCUdT85ErxRwRc/assets/index-db0d4912.js:16
Have tried chromium
and firefox
from the laptop running POPOS
, chromium
on raspbian
(rpi4), firefox
and firefox focus
on the mobile. All do not work for playing recordings or clips.
Only works with home assistant companion app
or chrome
on the mobile. Zerotier
maybe a red herring client-wise.
Just tested with Microsoft Edge
browser on the mobile and this works as well.
It's known that Firefox can have more issues so that's not surprising. Chrome is odd but without any error messages from frigate it's very unclear where the issue is
not sure if this is the cause but I downloaded a clip and took a screenshot of the codec info in vlc of the video playing, it shows H.265/ HEVC:
Oh, well that explains why firefox can't play it back, firefox does not support hevc.
I changed one of the settings in the config back to what it used to be
from this:
record: preset-record-generic
back to this
record: -map 0:v -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -b:v 4M -r 25
Since changing the above, I think it's now working as it used to, as the latest clip plays in firefox etc like it did before I upgraded from 0.12.0 beta 9 but will leave it for a while and update once it has recorded more clips and recordings.
after changing to this: record: -map 0:v -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -b:v 4M -r 25
Clips and recordings now work in all web browsers as it used to as it outputs recording to H.264/MPEG4
However there is a big difference in CPU usage and therefore electricity (cost) max ~47% (H.265) vs ~90%(H.264):
So I am going back to using H.265/HEVC and will have to make do with using the mobile + chrome based browsers to play HEVC recordings as it also saves on bandwidth and maybe there will be improvements in web browsers on Linux being able to play HEVC in future or my hardware in not up to scratch. Both the laptop and RPI 4 have hardware acceleration for decoding Video but not encoding so perhaps I need both to be "Hardware accelerated" for it to work in Chromium.
output of vainfo on the laptop
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 ()
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
https://caniuse.com/?search=hevc
Many thanks for helping me get to the source of the issue.
You have hardware acceleration so you could try using the GPU to encode to h.264 which would reduced cpu. But yes hevc is more efficient. I'll go ahead and close, feel free to create a new issue if something else comes up
Describe the problem you are having
Recordings and clips no longer playing since upgrade to 0.12.0-rc1. videos not playing back. Uploading an mp4 sample file does play from the "media" folder, jpg and png files display as well as an mp3 file plays that was uploaded, but recordings do not. Was fine yesterday after upgrade to rc1 but over night all recordings and clips fail to play.
Version
0.12.0-rc1
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
No response
Operating system
HassOS
Install method
HassOS Addon
Coral version
USB
Network connection
Wired
Camera make and model
digoo lantern
Any other information that may be helpful