blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
19.55k stars 1.8k forks source link

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

Closed karldonteljames closed 2 years ago

karldonteljames commented 2 years ago

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 commented 2 years ago

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

karldonteljames commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

karldonteljames commented 2 years ago

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 commented 2 years ago

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

VLC Plays back the clip.

blakeblackshear commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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
blakeblackshear commented 2 years ago

Can you try this to test h265 playback generally? https://videojs-http-streaming.netlify.app/?debug=false&autoplay=false&muted=false&fluid=false&minified=false&sync-workers=false&liveui=true&llhls=false&url=https%3A%2F%2Fbitmovin-a.akamaihd.net%2Fcontent%2Fdataset%2Fmulti-codec%2Fhevc%2Fstream_fmp4.m3u8&type=application%2Fx-mpegURL&keysystems=&buffer-water=false&exact-manifest-timings=false&pixel-diff-selector=false&network-info=false&override-native=true&preload=auto&mirror-source=true

karldonteljames commented 2 years ago

That's playing. :D

blakeblackshear commented 2 years ago

This looks similar to what you are experiencing.

https://github.com/videojs/http-streaming/issues/293#issuecomment-727922831

karldonteljames commented 2 years ago

I'm seeing the same behaviour in Chrome too.

blakeblackshear commented 2 years ago

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

karldonteljames commented 2 years ago

Is there anything I can do to fix the problem?

blakeblackshear commented 2 years ago

Can you download and post the m3u8 file?

karldonteljames commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

karldonteljames commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

karldonteljames commented 2 years ago

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 commented 2 years ago

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

karldonteljames commented 2 years ago

Sure.

General
Complete name                            : c:\Users\myuser\Downloads\clip_porch_1642435015.409805-1642435081.890227.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/mp41)
File size                                : 20.7 MiB
Duration                                 : 1 min 6 s
Overall bit rate                         : 2 616 kb/s
Writing application                      : Lavf58.45.100

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main@L5.1@Main
Codec ID                                 : hvc1
Codec ID/Info                            : High Efficiency Video Coding
Duration                                 : 1 min 6 s
Bit rate                                 : 2 614 kb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 12.595 FPS
Minimum frame rate                       : 9.993 FPS
Maximum frame rate                       : 15 000.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Bits/(Pixel*Frame)                       : 0.025
Stream size                              : 20.7 MiB (100%)
Color range                              : Full
Codec configuration box                  : hvcC
blakeblackshear commented 2 years ago

The tag command seems to have worked. I'm not sure what else to try. It seems like some kind of issue with the VideoJS player and the playlist returned from the Nginx VOD module.

karldonteljames commented 2 years ago

So there isn't anything I can do at the moment to get browser playback? Do I need to keep the output arguments in the config? I assume that this will mean that the video is being re-encoded by the server?

blakeblackshear commented 2 years ago

You can remove them. I don't think its being re-encoded, just retagged. Maybe someone else will have a similar issue and can help think of something new to try. Until then, I don't know how to fix the issue.

karldonteljames commented 2 years ago

Thank you for your help. It's just really frustrating because the older version plays the files with no issues.

karldonteljames commented 2 years ago

The same behaviour seems to exhibit when using the frigate integration in HA. The playback circle just seems to keep spinning when trying to playback h265 content, but will playback h264 with no issues.

blakeblackshear commented 2 years ago

I saw someone on Discord suggest using the tag on the input args rather than the output args:

input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -tag:v hvc1

It probably won't help, but seemed related.

karldonteljames commented 2 years ago

Thanks. I seem to be getting a similar error to output_args:

video append of 3027887b failed for segment #0 in playlist 0-http://192.168.12.207:5000/vod/2022-01/25/13/porch/index.m3u8

peter247 commented 2 years ago

is there a solution for this ? the detection and recording is working , but I'm getting "Playback cannot continue. No available working or supported playlists." trying to play back a event , but a downloaded event plays . I've found it doesn't work on windows edge , but does work on my ipad

karldonteljames commented 2 years ago

I can confirm that this does playback on the ipad in safari, edge and chrome, but in neither chrome nor edge on windows, despite having the codec installed.

peter247 commented 2 years ago

you have just given me a idea , does it work with chromium in Linux , a big NO ....

blakeblackshear commented 2 years ago

I keep finding conflicting information about edge support: https://caniuse.com/hevc

karldonteljames commented 2 years ago

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

blakeblackshear commented 2 years ago

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

karldonteljames commented 2 years ago

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

blakeblackshear commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Thanks for the update. I really appreciate your time.

G2G2G2G commented 2 years ago

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 commented 2 years ago

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

karldonteljames commented 2 years ago

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.