viseron icon indicating copy to clipboard operation
viseron copied to clipboard

Recordings plays only in Safari, error in Chrome

Open SlavikCA opened this issue 1 year ago • 16 comments

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

  • Mac M1
  • Android Pixel 6

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.

SlavikCA avatar Aug 07 '24 13:08 SlavikCA

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?

roflcoopter avatar Aug 07 '24 13:08 roflcoopter

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

SlavikCA avatar Aug 07 '24 14:08 SlavikCA

Plays fine for me, on iOS tho image

roflcoopter avatar Aug 07 '24 14:08 roflcoopter

Right.

On iOS - plays fine.

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

SlavikCA avatar Aug 07 '24 14:08 SlavikCA

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)?

roflcoopter avatar Aug 07 '24 14:08 roflcoopter

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: @.***>

madman2012 avatar Aug 07 '24 14:08 madman2012

my codecs:

doorbell:

  • H.264/AVC/MPEG-4AVC/MPEG-4part10
  • AAC

street:

  • H.265/HEVC
  • AAC

living:

  • H.265/HEVC
  • AAC

loft:

  • H.264/AVC/MPEG-4AVC/MPEG-4part10
  • AAC (but in logs it shows as pcm_mulaw)

SlavikCA avatar Aug 07 '24 15:08 SlavikCA

@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

SlavikCA avatar Aug 07 '24 15:08 SlavikCA

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)

roflcoopter avatar Aug 07 '24 15:08 roflcoopter

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?

SlavikCA avatar Aug 07 '24 15:08 SlavikCA

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.

madman2012 avatar Aug 07 '24 15:08 madman2012

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 avatar Aug 07 '24 15:08 roflcoopter

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

roflcoopter avatar Aug 09 '24 13:08 roflcoopter

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.

madman2012 avatar Aug 10 '24 03:08 madman2012

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?

roflcoopter avatar Aug 14 '24 06:08 roflcoopter

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.

Same here with 3.0.0.

aguinaldoabbj avatar Mar 20 '25 11:03 aguinaldoabbj