Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Support]: Unable to playback h265 recordings in modern interface. #2656

Closed
karldonteljames opened this issue Jan 16, 2022 · 67 comments
Closed

Comments

@karldonteljames
Copy link

Describe the problem you are having

Unable to playback h265 clips and recordings in the updated viewer. Works fine with older (0.8.4) version. Browsers throws an error, and has to be refeshed to select anything else on the page.
"Playback cannot continue. No available working or supported playlists."

Tested on version 0.8.4 the file plays - Section information is:

The home / non working one shows:

The video URL allows the file to playback with no problems.
http://192.168.12.207:5000/api/events/1642372025.240855-6tjtap/clip.mp4

streaming is working fine in the browser, and i can see a live view.

Version

Tested on 0.9.4 and 0.10.0

Frigate config file

mqtt:
  host: 192.168.12.201
  port: 1883
detectors:
  coral1:
    type: edgetpu
    device: pci
  coral2:
    type: edgetpu
    device: pci:1
snapshots:
  retain:
    default: 1
database:
  path: /media/frigate/clips/database/frigate.db
objects:
  track:
    - person
record:
  enabled: true
  retain_days: 0
  events:
    max_seconds: 300
    pre_capture: 5
    post_capture: 20
    retain:
      default: 1
logger:
  default: warning
cameras:
  porch:
    ffmpeg:
      inputs:
        - path: rtsp://USER:PASS@192.168.12.6:554/Streaming/Channels/102
          roles:
            - detect
        - path: rtsp://USER:PASS@192.168.12.6:554/Streaming/Channels/101
          roles:
            - record
    detect:        
      width: 640
      height: 480
      fps: 8
    record:
      enabled: true
      retain_days: 1
      events:
        max_seconds: 300
        pre_capture: 15
        post_capture: 45
        retain:
          default: 1
    rtmp:
      enabled: False
    snapshots:
      enabled: True
    mqtt:
      enabled: True
      timestamp: True
      crop: True
    motion:
      mask:
      - 545,480,640,480,640,420,578,448
  diningroom:
    ffmpeg:
      inputs:
        - path: rtsp://USER:PASSant@192.168.12.7:8554/live1.264
          roles:
            - detect
        - path: rtsp://USER:PASSant@192.168.12.7:8554/live0.264
          roles:
            - record
    rtmp:
      enabled: False
    detect:        
      width: 768
      height: 432
      fps: 8
    record:
      enabled: true
      retain_days: 0
      events:
        retain:
          default: 1
    snapshots:
      enabled: True
    mqtt:
      enabled: True
      timestamp: True
      crop: True
  bedroom:
    ffmpeg:
      inputs:
        - path: rtsp://USER:PASSant@192.168.12.8:8554/live1.264
          roles:
            - detect
        - path: rtsp://USER:PASSant@192.168.12.8:8554/live0.264
          roles:
            - record
    detect:        
      width: 768
      height: 432
      fps: 8
    record:
      enabled: true
      retain_days: 0
      events:
        retain:
          default: 1
    rtmp:
      enabled: False
    snapshots:
      enabled: True
    mqtt:
      enabled: True
      timestamp: True
      crop: True
  livingroom:
    ffmpeg:
      inputs:
        - path: rtsp://USER:PASSant@192.168.12.10:8554/live1.264
          roles:
            - detect
        - path: rtsp://USER:PASSant@192.168.12.10:8554/live0.264
          roles:
            - record
    detect:        
      width: 768
      height: 432
      fps: 8
    record:
      enabled: true
      retain_days: 0
      events:
        retain:
          default: 1
    rtmp:
      enabled: False
    snapshots:
      enabled: True
    mqtt:
      enabled: True
      timestamp: True
      crop: True
  landing:
    ffmpeg:
      inputs:
        - path: rtsp://USER:PASSant@192.168.12.9:8554/live1.264
          roles:
            - detect
        - path: rtsp://USER:PASSant@192.168.12.9:8554/live0.264
          roles:
            - record
    detect:        
      width: 768
      height: 432
      fps: 8
    record:
      enabled: true
      retain_days: 0
      events:
        retain:
          default: 1
    rtmp:
      enabled: False
    snapshots:
      enabled: True
    mqtt:
      enabled: True
      timestamp: True
      crop: True
  kitchen:
    ffmpeg:
      inputs:
        - path: rtsp://USER:PASS@192.168.12.5:8554/unicast
          roles:
            - detect
            - record 
    detect:        
      width: 1280
      height: 720
      fps: 8
    record:
      enabled: true
      retain_days: 0
      events:
        retain:
          default: 1
    rtmp:
      enabled: False
    snapshots:
      enabled: True
    mqtt:
      enabled: True
      timestamp: True
      crop: True
  backdoor:
    ffmpeg:
      inputs:
        - path: rtsp://USER:PASS@192.168.12.3:8554/unicast
          roles:
            - detect
            - record 
    detect:        
      width: 1280
      height: 720
      fps: 8
    record:
      enabled: true
      retain_days: 0
      events:
        retain:
          default: 1
    rtmp:
      enabled: False
    snapshots:
      enabled: True
    mqtt:
      enabled: True
      timestamp: True
      crop: True
  babycam:
    ffmpeg:
      inputs:
        - path: rtsp://USER:PASS@192.168.12.4:8554/unicast
          roles:
            - detect
            - record 
    detect:        
      width: 1280
      height: 720
      fps: 8
    zones:
      cot:
        coordinates: 361,669,956,660,949,376,368,382
    objects:
      filters:
        person:
          min_score: 0.4
          threshold: 0.5
    record:
      enabled: true
      retain_days: 1
      events:
        retain:
          default: 1
    rtmp:
      enabled: False
    snapshots:
      enabled: True
    mqtt:
      enabled: True
      timestamp: True
      crop: True

Relevant log output

access.log:
192.168.10.123 - - [16/Jan/2022:23:26:49 +0000] "GET /api/events/1642372025.240855-6tjtap HTTP/1.1" 200 5604 "http://192.168.12.207:5000/events?camera=porch" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36 Edg/97.0.1072.55" "-"
192.168.10.123 - - [16/Jan/2022:23:26:49 +0000] "GET /api/events/1642372025.240855-6tjtap/snapshot.jpg HTTP/1.1" 200 27832 "http://192.168.12.207:5000/events?camera=porch" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36 Edg/97.0.1072.55" "-"
192.168.12.202 - - [16/Jan/2022:23:27:26 +0000] "GET /api/stats HTTP/1.1" 200 1556 "-" "HomeAssistant/2021.12.8 aiohttp/3.8.1 Python/3.9" "-"

error.log:
2022/01/16 22:18:30 [error] 202#202: *7 no live upstreams while connecting to upstream, client: 192.168.10.123, server: , request: "GET /api/config HTTP/1.1", upstream: "http://frigate_api/config", host: "192.168.12.207:5000", referrer: "http://192.168.12.207:5000/events?camera=porch"

FFprobe output from your camera

ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-libsrt --enable-libaribb24 --enable-nvenc --enable-cuda --enable-cuvid --enable-libnpp --extra-cflags='-I/opt/ffmpeg/include -I/opt/ffmpeg/include/ffnvcodec -I/usr/local/cuda/include/' --extra-ldflags='-L/opt/ffmpeg/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib32/'
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, rtsp, from 'rtsp://USER:PASS@192.168.12.6:554/Streaming/Channels/101':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: hevc, yuvj420p(pc), 3840x2160 [SAR 1:1 DAR 16:9], 12.50 tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64 kb/s

Frigate stats

No response

Operating system

UNRAID

Install method

Docker CLI

Coral version

PCIe

Network connection

Wired

Camera make and model

hikvision I91BM

Any other information that may be helpful

No response

@blakeblackshear
Copy link
Owner

To clarify, is the clip.mp4 that works from an event before or after the upgrade?

@karldonteljames
Copy link
Author

They are running on different systems.
I've got one system on 0.8.4 (which is playing back h265 files with no problems) and the other was on 0.9.4 before trying 0.10 with the same results.
The systems are in different locations, but both using the same cameras with the same settings. -
The clip.mp4 was a new recording from yesterday and will not play in the frigate interface, but will open in the "Films & TV" app in windows, as well as play in the edge browser.

@karldonteljames karldonteljames changed the title Unable to playback h265 recordings in modern interface.[Support]: [Support]: Unable to playback h265 recordings in modern interface. Jan 17, 2022
@karldonteljames
Copy link
Author

I've re-pulled the 0.8.4 and added just the one camera, waited for person detection, and allowed the file to write.
Once the file had been written I could play it back in the browser.

@blakeblackshear
Copy link
Owner

0.9.x completely changed the way recordings are handled and played. The clip.mp4 file you downloaded was dynamically created on the backend and sent for download. Playing in the UI does something completely different. A playlist of recording segments is sent to the frontend.

@blakeblackshear
Copy link
Owner

Try opening http://192.168.12.207:5000/vod/event/1642372025.240855-6tjtap/index.m3u8 in VLC.

@karldonteljames
Copy link
Author

OK, I understand that. How can I get frigate to playback the file encoded in h265 in the new version? As the older version is handling the playback of videos from the same camera with no issues.
I've got two dockers installed at the moment, running similar configs both pulling from the camera. (i'm only running one at a time) If there is motion detected and frigate records with the interface i cannot play back the file. If i stop the newer version and run the old version and it records the motion, i am able to playback the file with no issues.

@karldonteljames
Copy link
Author

karldonteljames commented Jan 17, 2022

Try opening http://192.168.12.207:5000/vod/event/1642372025.240855-6tjtap/index.m3u8 in VLC.

VLC Plays back the clip.

@blakeblackshear
Copy link
Owner

Sounds like the backend is serving up the video fine, so it must be a frontend issue. Can you post all the messages from the browser console? I'm not sure why video.js is having an issue with your video. I know others are using h265 on newer versions fine.

@karldonteljames
Copy link
Author

I'm not at home at the moment, Running over VPN, so might be some traffic blocked, but at the moment I can see this from my machine:

WebSocket connection to 'ws://192.168.12.207:5000/live/porch' failed: Received a broken close frame containing a reserved status code.
a.start @ jsmpeg-player.OlBCBXsUQjKV.js:9
hooks.module-60ab992d.iZrY3zmdHODf.js:1 [Violation] 'setTimeout' handler took 88ms
video.es-cba2b316.htcmvalaG3LD.js:33 [Violation] 'setTimeout' handler took 76ms

@blakeblackshear
Copy link
Owner

I'm not sure those are related. There should be some kind of error for VIDEOJS in the console logs when you click play in the web UI.

@karldonteljames
Copy link
Author

Just connecting to a machine inside my network.

video.es-cba2b316.htcmvalaG3LD.js:31 
        
       VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) Playback cannot continue. No available working or supported playlists. je {code: 3, message: 'Playback cannot continue. No available working or supported playlists.'}code: 3message: "Playback cannot continue. No available working or supported playlists."[[Prototype]]: Object
(anonymous) @ video.es-cba2b316.htcmvalaG3LD.js:31
Wl.n.error @ video.es-cba2b316.htcmvalaG3LD.js:31
r.error @ video.es-cba2b316.htcmvalaG3LD.js:45
(anonymous) @ video.es-cba2b316.htcmvalaG3LD.js:63
Ze.n.dispatcher.n.dispatcher @ video.es-cba2b316.htcmvalaG3LD.js:33
Oi @ video.es-cba2b316.htcmvalaG3LD.js:33
we.trigger @ video.es-cba2b316.htcmvalaG3LD.js:33
r.blacklistCurrentPlaylist @ video.es-cba2b316.htcmvalaG3LD.js:63
r.getCodecsOrExclude_ @ video.es-cba2b316.htcmvalaG3LD.js:63
r.tryToCreateSourceBuffers_ @ video.es-cba2b316.htcmvalaG3LD.js:63
i @ video.es-cba2b316.htcmvalaG3LD.js:63
Ze.n.dispatcher.n.dispatcher @ video.es-cba2b316.htcmvalaG3LD.js:33
Oi @ video.es-cba2b316.htcmvalaG3LD.js:33
we.trigger @ video.es-cba2b316.htcmvalaG3LD.js:33
r.handleTrackInfo_ @ video.es-cba2b316.htcmvalaG3LD.js:61
of @ video.es-cba2b316.htcmvalaG3LD.js:61
O @ video.es-cba2b316.htcmvalaG3LD.js:61
(anonymous) @ video.es-cba2b316.htcmvalaG3LD.js:61
(anonymous) @ video.es-cba2b316.htcmvalaG3LD.js:61
bo @ video.es-cba2b316.htcmvalaG3LD.js:54
(anonymous) @ video.es-cba2b316.htcmvalaG3LD.js:54
r @ video.es-cba2b316.htcmvalaG3LD.js:10
s @ video.es-cba2b316.htcmvalaG3LD.js:10
load (async)
bu @ video.es-cba2b316.htcmvalaG3LD.js:10
mt @ video.es-cba2b316.htcmvalaG3LD.js:10
r @ video.es-cba2b316.htcmvalaG3LD.js:54
H_ @ video.es-cba2b316.htcmvalaG3LD.js:61
r.updateTransmuxerAndRequestSegment_ @ video.es-cba2b316.htcmvalaG3LD.js:61
r.loadSegment_ @ video.es-cba2b316.htcmvalaG3LD.js:61
r.fillBuffer_ @ video.es-cba2b316.htcmvalaG3LD.js:61
r.monitorBufferTick_ @ video.es-cba2b316.htcmvalaG3LD.js:61
setTimeout (async)
r.monitorBuffer_ @ video.es-cba2b316.htcmvalaG3LD.js:61
r.load @ video.es-cba2b316.htcmvalaG3LD.js:61
r.load @ video.es-cba2b316.htcmvalaG3LD.js:63
r.setupFirstPlay @ video.es-cba2b316.htcmvalaG3LD.js:63
(anonymous) @ video.es-cba2b316.htcmvalaG3LD.js:63
Ze.n.dispatcher.n.dispatcher @ video.es-cba2b316.htcmvalaG3LD.js:33
Oi @ video.es-cba2b316.htcmvalaG3LD.js:33
we.trigger @ video.es-cba2b316.htcmvalaG3LD.js:33
r.setupInitialPlaylist @ video.es-cba2b316.htcmvalaG3LD.js:54
(anonymous) @ video.es-cba2b316.htcmvalaG3LD.js:54
bo @ video.es-cba2b316.htcmvalaG3LD.js:54
(anonymous) @ video.es-cba2b316.htcmvalaG3LD.js:54
r @ video.es-cba2b316.htcmvalaG3LD.js:10
s @ video.es-cba2b316.htcmvalaG3LD.js:10
load (async)
bu @ video.es-cba2b316.htcmvalaG3LD.js:10
mt @ video.es-cba2b316.htcmvalaG3LD.js:10
r @ video.es-cba2b316.htcmvalaG3LD.js:54
r.start @ video.es-cba2b316.htcmvalaG3LD.js:54
r.load @ video.es-cba2b316.htcmvalaG3LD.js:54
e.tech_.preload.e.loadOnPlay_ @ video.es-cba2b316.htcmvalaG3LD.js:63
e @ video.es-cba2b316.htcmvalaG3LD.js:33
Ze.n.dispatcher.n.dispatcher @ video.es-cba2b316.htcmvalaG3LD.js:33
play (async)
$.<computed> @ video.es-cba2b316.htcmvalaG3LD.js:34
Rd @ video.es-cba2b316.htcmvalaG3LD.js:33
r.techGet_ @ video.es-cba2b316.htcmvalaG3LD.js:45
r.play_ @ video.es-cba2b316.htcmvalaG3LD.js:45
(anonymous) @ video.es-cba2b316.htcmvalaG3LD.js:45
r.play @ video.es-cba2b316.htcmvalaG3LD.js:45
r.handleClick @ video.es-cba2b316.htcmvalaG3LD.js:33
i.handleClick_ @ video.es-cba2b316.htcmvalaG3LD.js:33
Ze.n.dispatcher.n.dispatcher @ video.es-cba2b316.htcmvalaG3LD.js:33

@karldonteljames
Copy link
Author

That's playing. :D

@blakeblackshear
Copy link
Owner

This looks similar to what you are experiencing.

videojs/http-streaming#293 (comment)

@karldonteljames
Copy link
Author

I'm seeing the same behaviour in Chrome too.

@blakeblackshear
Copy link
Owner

Chrome definitely doesn't have support for playing H265 files. Only Edge, IE, and Safari: https://videojs.com/html5-video-support/

@karldonteljames
Copy link
Author

Is there anything I can do to fix the problem?

@blakeblackshear
Copy link
Owner

Can you download and post the m3u8 file?

@karldonteljames
Copy link
Author

Sure index.m3u8 is 1kb and contains the following:

#EXT-X-TARGETDURATION:10
#EXT-X-ALLOW-CACHE:YES
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-MAP:URI="init-v1.mp4"
#EXTINF:10.000,
seg-1-v1.m4s
#EXTINF:10.000,
seg-2-v1.m4s
#EXTINF:10.000,
seg-3-v1.m4s
#EXTINF:10.000,
seg-4-v1.m4s
#EXTINF:10.000,
seg-5-v1.m4s
#EXTINF:10.000,
seg-6-v1.m4s
#EXTINF:6.074,
seg-7-v1.m4s
#EXT-X-ENDLIST

@karldonteljames
Copy link
Author

A downloaded video file is attached. This will play on the computer, but not via the frigate interface.
https://user-images.githubusercontent.com/25663177/149779695-471bfcbd-e187-4f69-bb8c-65156311e90a.mp4

@blakeblackshear
Copy link
Owner

Can you post the mediainfo output for one of the recording segments in the recordings folder?

@karldonteljames
Copy link
Author

Of Course

General
Complete name                            : \\192.168.10.201\cctv\2022-01\17\12\porch\03.00.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/mp41)
File size                                : 3.13 MiB
Duration                                 : 9 s 533 ms
Overall bit rate                         : 2 752 kb/s
Movie name                               : Media Presentation
Writing application                      : Lavf58.45.100

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main@L5.1@Main
Codec ID                                 : hev1
Codec ID/Info                            : High Efficiency Video Coding
Duration                                 : 9 s 533 ms
Bit rate                                 : 2 750 kb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 12.588 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Bits/(Pixel*Frame)                       : 0.026
Stream size                              : 3.12 MiB (100%)
Color range                              : Full
Codec configuration box                  : hvcC

@blakeblackshear
Copy link
Owner

This may be a bit of a long shot, but this issue may be related.

Try modifying the output args for recordings on the camera that isn't working to tag the video as hvc1 instead of hev1.

ffmpeg:
  output_args:
    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an -tag:v hvc1

See if events created after this change can be played back.

@karldonteljames
Copy link
Author

That seems to throw a different error in the browser.

video append of 3356867b failed for segment #0 in playlist 0-http://192.168.12.207:5000/vod/event/1642432660.908702-fby151/index.m3u8

@blakeblackshear
Copy link
Owner

Can you still download the clip.mp4 and play it? Are the mp4 files in the recordings directory playable?

@karldonteljames
Copy link
Author

The file still plays in VLC from the file share. and if i download it from the browser I can play it back with VLC too.
The file doesn't seem as smooth, but that could just be the speed someone is walking past I suppose.

@blakeblackshear
Copy link
Owner

Can you post the mediainfo output from one of the new recording segments?

@karldonteljames
Copy link
Author

Its odd as the playback worked fine in the old version with the same settings / cameras.

@blakeblackshear
Copy link
Owner

The way playback happened in the old version was completely different.

@karldonteljames
Copy link
Author

but wasn't the file format the same, meaning that edge supported the format, or is that incorrect?

@blakeblackshear
Copy link
Owner

The underlying video data is the same, yes. Frigate just saves it directly from the camera. The previous version returned a raw mp4 file for the event. 0.9.x returns the same video files as a playlist of .ts segments in an m3u8 playlist. For some reason, Edge doesn't decode the videos correctly when that happens.

@karldonteljames
Copy link
Author

Am I correct in concluding that according to that information from caniuse, we can only playback content in the current version of frigate on an Apple device?

@karldonteljames
Copy link
Author

karldonteljames commented Feb 1, 2022

I'm not sure it helps at all, but this plays back in edge on windows without issue.
https://hls-js.netlify.app/demo/
as do all the streams on
https://players.akamai.com/players/hlsjs

However all of the streams on https://players.akamai.com/players/dashjs play EXCEPT the option "segment timeline/time" https://dash.akamaized.net/envivio/EnvivioDash3/manifest.mpd
which throws:

{"error":{"code":25,"message":"https://demo.unified-streaming.com/video/ateam/ateam.ism/ateam.mpd is not available","data":{"request":{"action":"download","startTime":null,"mediaType":"stream","mediaInfo":null,"type":"MPD","duration":null,"timescale":null,"range":null,"url":"https://demo.unified-streaming.com/video/ateam/ateam.ism/ateam.mpd","serviceLocation":null,"requestStartDate":"2022-02-01T20:19:16.556Z","firstByteDate":"2022-02-01T20:19:14.810Z","requestEndDate":"2022-02-01T20:19:16.600Z","quality":null,"index":null,"availabilityStartTime":null,"availabilityEndTime":null,"wallStartTime":null,"bytesLoaded":null,"bytesTotal":null,"delayLoadingTime":null,"responseType":"","representationId":null},"response":{"__zone_symbol__xhrSync":false,"__zone_symbol__xhrURL":"https://demo.unified-streaming.com/video/ateam/ateam.ism/ateam.mpd","__zone_symbol__loadfalse":[{"type":"eventTask","state":"scheduled","source":"XMLHttpRequest.addEventListener:load","zone":"angular","runCount":0},{"type":"macroTask","state":"scheduled","source":"XMLHttpRequest.send","zone":"angular","runCount":0}],"__zone_symbol__loadendfalse":[{"type":"eventTask","state":"scheduled","source":"XMLHttpRequest.addEventListener:loadend","zone":"angular","runCount":0}],"__zone_symbol__errorfalse":[{"type":"eventTask","state":"running","source":"XMLHttpRequest.addEventListener:error","zone":"angular","runCount":2}],"__zone_symbol__progressfalse":[{"type":"eventTask","state":"scheduled","source":"XMLHttpRequest.addEventListener:progress","zone":"angular","runCount":0}],"__zone_symbol__abortfalse":[{"type":"eventTask","state":"scheduled","source":"XMLHttpRequest.addEventListener:abort","zone":"angular","runCount":0}],"__zone_symbol__xhrScheduled":true,"__zone_symbol__xhrErrorBeforeScheduled":false,"__zone_symbol__xhrTask":{"type":"macroTask","state":"scheduled","source":"XMLHttpRequest.send","zone":"angular","runCount":0}}}},"type":"error"}

@blakeblackshear
Copy link
Owner

I think there is a way to make it work, but I am guessing it's going to require some very specific changes. I keep finding conflicting information about the future of H265 support on edge with the move to chromium.

@karldonteljames
Copy link
Author

Thanks for the update. I really appreciate your time.

@G2G2G2G
Copy link

G2G2G2G commented Feb 8, 2022

h.265 costs money
https://www.microsoft.com/en-us/p/hevc-video-extensions-from-device-manufacturer/9n4wgh0z6vhq?activetab=pivot:overviewtab

av1 free
https://www.microsoft.com/en-us/p/av1-video-extension/9mvzqvxjbq9v?activetab=pivot:overviewtab

h.264 also costs money, check your browser plugins
Cisco (yes the networking etc company) bought a license for the entire planet like 15 years ago (no joke, it's what all of firefox, safari, chromium etc uses) to get everyone on the same page.

none of these browsers support h.264 nor h.265 (plugins do) and they're definitely not going to support h.266, these cost too much money for the free they provide. So don't hold your breath for edge (chromium) support. That extension above should help
alternatively you can install one of the big codec packs (like combined community codec pack) and maybe that'll work but I doubt it

@karldonteljames
Copy link
Author

We already have the h265 extension below installed, is this not the same?
Microsoft.HEVCVideoExtension_1.0.31823.0_x64

@karldonteljames
Copy link
Author

karldonteljames commented Feb 8, 2022

This has already updated to 1.0.43421
but can also be downloaded from here
We had to install this to allow playback of the files in the web browser on the older version of Frigate.

@G2G2G2G
Copy link

G2G2G2G commented Feb 8, 2022

Yea no guarantee it helps edge or any browser though =[
I just do h265 to h.264 which is also like 40 times faster and just call it a day

@karldonteljames
Copy link
Author

my cameras don't output h264, only h265, so that's not an option I'm afraid.

@G2G2G2G
Copy link

G2G2G2G commented Feb 8, 2022

h265 to h264 is always an option with ffmpeg... and pretty much your only, unless you use non browser to stream (or a phone)

@karldonteljames
Copy link
Author

karldonteljames commented Mar 4, 2022

h265 to h264 is always an option with ffmpeg... and pretty much your only, unless you use non browser to stream (or a phone)

What do you mean by "use non browser" to stream? I just want to playback the recordings on my laptop / PC, and not have to use an ipad to review the recordings.

@nicholh
Copy link

nicholh commented Mar 11, 2022

Hi, Has anybody found a solution to this issue. I have upgraded my cameras to h.265 models and am seeing the exact same behavior.

Cheers,

@blakeblackshear
Copy link
Owner

Looks like H265 works in some cases: blakeblackshear/frigate-hass-integration#219 (comment)

@stale
Copy link

stale bot commented Apr 15, 2022

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.

@stale stale bot added the stale label Apr 15, 2022
@karldonteljames
Copy link
Author

@nicholh No more information i'm afraid.

@stale stale bot closed this as completed Apr 23, 2022
@Leon99
Copy link

Leon99 commented Aug 8, 2022

Any chances of getting back to the approach that worked in 0.8 for serving H265? My cameras only have H265, and, from my observations, it's a common trend on the market, especially for 4K+ cameras.

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Aug 8, 2022

Any chances of getting back to the approach that worked in 0.8 for serving H265? My cameras only have H265, and, from my observations, it's a common trend on the market, especially for 4K+ cameras.

No, that would be a major regression in the way frigate stores recordings and creates lots of redundant storage usage.

In the future we're hoping to have "post processors" that can convert the h265 to h264 via ffmpeg after the segments are saved

@Leon99
Copy link

Leon99 commented Aug 12, 2022

No, that would be a major regression in the way frigate stores recordings and creates lots of redundant storage usage.
In the future we're hoping to have "post processors" that can convert the h265 to h264 via ffmpeg after the segments are saved

Hmm isn't H265 more storage efficient than H264?

@Leon99
Copy link

Leon99 commented Aug 12, 2022

0.9.x returns the same video files as a playlist of .ts segments in an m3u8 playlist. For some reason, Edge doesn't decode the videos correctly when that happens.

@blakeblackshear could you comment on how e.g. this extension https://microsoftedge.microsoft.com/addons/detail/hls-streaming-player/oigohokpjennhfmeegflfcbpfbohlkmn manages to successfully play .m3u8 in Edge?

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Aug 12, 2022

Hmm isn't H265 more storage efficient than H264?

The amount of storage efficiency gained with h264 -> h265 is not even close to the amount of storage that is used by storing identical video footage multiple times (for events and for 24/7 recordings) as it was before.

Not to mention h265 can't be played in most browsers so it would result in just higher storage as most users that want to view their recordings

@blakeblackshear
Copy link
Owner

could you comment on how e.g. this extension https://microsoftedge.microsoft.com/addons/detail/hls-streaming-player/oigohokpjennhfmeegflfcbpfbohlkmn manages to successfully play .m3u8 in Edge?

Does this work on Edge for Linux and MacOS? I don't have a Windows machine.

@Leon99
Copy link

Leon99 commented Aug 13, 2022

The amount of storage efficiency gained with h264 -> h265 is not even close to the amount of storage that is used by storing identical video footage multiple times (for events and for 24/7 recordings) as it was before.

I guess it depends on the number of events? In any case, with typical home use, storage is not something to be worried about these days.

Not to mention h265 can't be played in most browsers so it would result in just higher storage as most users that want to view their recordings

It costs nothing to use a different browser. Costs for buying different camera(s) may be substantial, the choice is limited and it may not be easy to tell in advance if it supports H264 and, if so, what resolutions are supported.

On top of that, https://docs.frigate.video/hardware doesn't mention anything about support for H265-only cameras being limited to such an extent that it's not possible to see the recordings in the browser, which is, kinda, minimum expectation from such a system.

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Aug 13, 2022

It costs nothing to use a different browser. Costs for buying different camera(s) may be substantial, the choice is limited and it may not be easy to tell in advance if it supports H264 and, if so, what resolutions are supported.

I already outlined the plan for allowing the conversion of h265 -> h264 through post processors in a future version which would have the benefit of supporting all browsers and h265 only cameras while maintaining the smarter and more efficient storage mechanism that we have today.

On top of that, https://docs.frigate.video/hardware doesn't mention anything about support for H265-only cameras being limited to such an extent that it's not possible to see the recordings in the browser, which is, kinda, minimum expectation from such a system.

I guess it could be on that page too, but it is called out at the top of https://docs.frigate.video/guides/camera_setup/ and https://docs.frigate.video/configuration/record/

and it does also say on the hardware page:

Cameras that output H.264 video and AAC audio will offer the most compatibility with all features of Frigate and Home Assistant

@Leon99
Copy link

Leon99 commented Aug 13, 2022

Looking forward to the conversion capability. Hopefully, it won't affect hosting hardware requirements significantly. Will have to switch to another software for now.

I guess it could be on that page too, but it is called out at the top of https://docs.frigate.video/guides/camera_setup/ and https://docs.frigate.video/configuration/record/

Neither of those pages mentions that recordings can't be played in any browser. In fact, the way it's phrased now leads to a false assumption that the only issue with H265 is the limited browser choice.

From the doc:

H265 recordings can be viewed in Edge and Safari only

Nope, H265 recordings can't be viewed in any browser (from v0.9+ anyway).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants