Closed karldonteljames closed 2 years ago
To clarify, is the clip.mp4 that works from an event before or after the upgrade?
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.
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.
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.
Try opening http://192.168.12.207:5000/vod/event/1642372025.240855-6tjtap/index.m3u8
in VLC.
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.
Try opening
http://192.168.12.207:5000/vod/event/1642372025.240855-6tjtap/index.m3u8
in VLC.
VLC Plays back the clip.
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.
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
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.
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
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
That's playing. :D
This looks similar to what you are experiencing.
https://github.com/videojs/http-streaming/issues/293#issuecomment-727922831
I'm seeing the same behaviour in Chrome too.
Chrome definitely doesn't have support for playing H265 files. Only Edge, IE, and Safari: https://videojs.com/html5-video-support/
Is there anything I can do to fix the problem?
Can you download and post the m3u8 file?
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
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
Can you post the mediainfo
output for one of the recording segments in the recordings folder?
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
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.
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
Can you still download the clip.mp4 and play it? Are the mp4 files in the recordings directory playable?
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.
Can you post the mediainfo output from one of the new recording segments?
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
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.
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?
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.
Thank you for your help. It's just really frustrating because the older version plays the files with no issues.
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.
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.
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
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
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.
you have just given me a idea , does it work with chromium in Linux , a big NO ....
I keep finding conflicting information about edge support: https://caniuse.com/hevc
Its odd as the playback worked fine in the old version with the same settings / cameras.
The way playback happened in the old version was completely different.
but wasn't the file format the same, meaning that edge supported the format, or is that incorrect?
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.
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?
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"}
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.
Thanks for the update. I really appreciate your time.
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
We already have the h265 extension below installed, is this not the same? Microsoft.HEVCVideoExtension_1.0.31823.0_x64
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.
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
Relevant log output
FFprobe output from your camera
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