roflcoopter / viseron

Self-hosted, local only NVR and AI Computer Vision software. With features such as object detection, motion detection, face recognition and more, it gives you the power to keep an eye on your home, office or any other place you want to monitor.
MIT License
1.63k stars 167 forks source link

Recordings plays only in Safari, error in Chrome #791

Open SlavikCA opened 1 month ago

SlavikCA commented 1 month ago

All recording, for all of my cameras can not be played in Chrome or Brave browser. Tried on my:

Getting error:

VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) Playback cannot continue. No available working or supported playlists.

Recording can only be played in Safari.

Screenshot 2024-08-07 at 06 16 27

2 of my cameras are HEVC (x265) and 2 are x264. Same error for all.

Live MJPEG works fine on all browsers.

Viseron - 3.0.0b9 - 7f94317 Tried with CPU docker image and with CUDA docker image. Same result.

roflcoopter commented 1 month ago

Strange, works fine for me in Chrome on Windows. If you go the the Network tab in the dev tools, there should be a request ending in index.m3u8 after you press play. What is the contents of that request?

SlavikCA commented 1 month ago

Here are 3 requests I see in Network tab AFTER I click PLAY in Chrome:

Screenshot 2024-08-07 at 07 15 15

Here is the request details: Screenshot 2024-08-07 at 07 17 53

And PREVIEW:

#EXTM3U
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:6
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="/files/segments/street/init.mp4"
#EXT-X-PROGRAM-DATE-TIME:2024-08-07T14:06:30.000+00:00
#EXTINF:4.9976,
/files/segments/street/1723039590.m4s
#EXT-X-DISCONTINUITY
#EXT-X-PROGRAM-DATE-TIME:2024-08-07T14:06:35.000+00:00
#EXTINF:4.92546,
/files/segments/street/1723039595.m4s
#EXT-X-DISCONTINUITY
#EXT-X-PROGRAM-DATE-TIME:2024-08-07T14:06:40.000+00:00
#EXTINF:4.98538,
/files/segments/street/1723039600.m4s
#EXT-X-DISCONTINUITY
#EXT-X-PROGRAM-DATE-TIME:2024-08-07T14:06:46.000+00:00
#EXTINF:5.00814,
/files/segments/street/1723039606.m4s
#EXT-X-DISCONTINUITY
#EXT-X-PROGRAM-DATE-TIME:2024-08-07T14:06:50.000+00:00
#EXTINF:5.01579,
/files/segments/street/1723039610.m4s
#EXT-X-DISCONTINUITY
#EXT-X-PROGRAM-DATE-TIME:2024-08-07T14:06:56.000+00:00
#EXTINF:4.98377,
/files/segments/street/1723039616.m4s
#EXT-X-DISCONTINUITY
#EXT-X-PROGRAM-DATE-TIME:2024-08-07T14:07:01.000+00:00
#EXTINF:5.02089,
/files/segments/street/1723039621.m4s
#EXT-X-DISCONTINUITY
#EXT-X-PROGRAM-DATE-TIME:2024-08-07T14:07:06.000+00:00
#EXTINF:4.95023,
/files/segments/street/1723039626.m4s
#EXT-X-DISCONTINUITY
#EXT-X-ENDLIST
roflcoopter commented 1 month ago

Plays fine for me, on iOS tho image

SlavikCA commented 1 month ago

Right.

On iOS - plays fine.

It looks like the issues only on Chrome (any OS: Win or Mac)

roflcoopter commented 1 month ago

It works for me on my Windows 11 PC using Chrome. What codecs are your cameras using for video (and audio if they have any)?

madman2012 commented 1 month ago

I get similar errors with h265 streams


From: Jesper @.> Sent: Wednesday, August 7, 2024 9:59 AM To: roflcoopter/viseron @.> Cc: Subscribed @.***> Subject: Re: [roflcoopter/viseron] Recordings plays only in Safari, error in Chrome (Issue #791)

Strange, works fine for me in Chrome on Windows. If you go the the Network tab in the dev tools, there should be a request ending in index.m3u8 after you press play. What is the contents of that request?

— Reply to this email directly, view it on GitHubhttps://github.com/roflcoopter/viseron/issues/791#issuecomment-2273547014, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABMS5U5FZE44ZX3IN34ZUMDZQIR3XAVCNFSM6AAAAABMENELWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZTGU2DOMBRGQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

SlavikCA commented 1 month ago

my codecs:

doorbell:

street:

living:

loft:

SlavikCA commented 1 month ago

@madman2012 is right.

I just tried, and loft & doorbell are working fine in Chrome.

Issues are only with living and street which are h265.

So, it looks like the issue with h265 streams only

roflcoopter commented 1 month ago

Might be a browser issue then with h265: https://github.com/videojs/video.js/issues/7257

Either change the encoding in your cameras if possible or Viseron can transcode it for you (less efficient)

SlavikCA commented 1 month ago

My camera doesn't have setting to change codec.

Can Viseron transcode already? Or is it feature, which can be potentially added?

If it existing feature - where can I configure that transcoding?

madman2012 commented 1 month ago

I had tried the same thing by using codec, so it re-encoded to h264 from cameras outputting h265/hevc but it still gives me spinning disk without error. I was meaning to write this one up recently as a bug but I got side tracked.


From: Jesper @.> Sent: Wednesday, August 7, 2024 11:04 AM To: roflcoopter/viseron @.> Cc: madman2012 @.>; Mention @.> Subject: Re: [roflcoopter/viseron] Recordings plays only in Safari, error in Chrome (Issue #791)

Might be a browser issue then with h265: videojs/video.js#7257https://github.com/videojs/video.js/issues/7257

Either change the encoding in your cameras if possible or Viseron can transcode it for you (less efficient)

— Reply to this email directly, view it on GitHubhttps://github.com/roflcoopter/viseron/issues/791#issuecomment-2273693009, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABMS5U5NSAFBPOFOMRQUGSLZQIZP5AVCNFSM6AAAAABMENELWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZTGY4TGMBQHE. You are receiving this because you were mentioned.

roflcoopter commented 1 month ago

Right, forgot that it is not in v3 yet.

It is on the checklist here tho: https://github.com/roflcoopter/viseron/pull/716 Will try to squeeze in a quick change for that right away, can hopefully release it tomorrow if i dont hit any hurdles

roflcoopter commented 1 month ago

In the current dev build you can now set codec: h264 under recorder for each camera and it should transcode the segments for you

madman2012 commented 1 month ago

Hi @roflcoopter,

I’ve encountered a peculiar issue with the latest dev version. While H.265 (HEVC) events play back fine in the browser now, the recordings don’t. The codec is set to copy.

roflcoopter commented 1 month ago

If its set to copy it is still h265, the Events uses another player than the recordings, but i dont think that should matter. Does it work better if you set codec to h264 under recorder?