Closed Prakash2101 closed 1 year ago
I tested with a H.265 video file today. Use VLC media player played url like rtsp://my-server-ip:8554/s1 steam, video and audio both OK. But use Chrome or Firefox to access url like http://my-server-ip:8888/s1/ , video is always black, audio is OK.
Hello, the problem with HLS and H265 is that most browsers don't support H265. The only exception is Safari on iOS and macOS:
https://caniuse.com/?search=hevc
Therefore, even if this is implemented, it would benefit few users.
@aler9, Not an issue, can you please add this feature.
您好,HLS 和 H265 的问题是大多数浏览器不支持 H265。唯一的例外是 iOS 和 macOS 上的 Safari:
https://caniuse.com/?search=hevc
因此,即使实现了这一点,也不会使少数用户受益。
Web can use H.265 decoder like this https://github.com/numberwolf/h265web.js or https://github.com/ffmpegwasm/ffmpeg.wasm
@1021683053 a WASM H265 decoder is very interesting, but it requires too much CPU to produce quality results.
Web streaming is heavily influenced by browser support, and if browsers continue not to support H265, transcoding from cameras to browsers can't be done. If you have a H265 feed and want to preserve throughput or quality, you have to perform a server-side re-encoding from H265 to VP9 and use WebRTC, or from H265 to AV1 and use Media Source Extensions.
Hello Alessandro,
Chromium-based browsers (including Edge) have enabled by default h265 decoding for platforms with hardware support.
https://bugs.chromium.org/p/chromium/issues/detail?id=460703
See also here the updated table:
https://caniuse.com/?search=H265
This is quite a game-changer so it would be great if you can reconsider implementing HLS support for h265 codec.
Thanks, Mihail
Hi @aler9. This project is an amazing work :) I know that Chrome does not support h265 but Edge is rising on windows as Safari is (my default browser on Mac) too. Plus HLS h265 is consumed by a lot of players that run on Android (Google's ExoPlayer) and iOS. Hardware support is available in every end user device. It will be great if support is considered in this project 👍
The good thing is that my last comment aged badly and Chrome already supports h265! https://bitmovin.com/google-adds-hevc-support-chrome/ @aler9 this is huge news for this project and video on the web in general.
Anyone can check their browser support here https://ott.dolby.com/codec_test/index.html
hello, i would also like to request hls support on h265. recently google chrome added native hevc h265 support from versions 107+
H265/HLS is being implemented in #1342. Please be aware that your browser must support the H265 codec in order for the functionality to work. I'll add a test page to the README that allows to test your browser for supported codecs.
This is now supported since v0.21.1
Hello Alessandro,
I am very happy to see this working, thanks a lot for your amazing work! 👍 🥳
I've been testing this feature and found that it works great most of the time, with some exceptions.
For example with this HEVC file:
This is the ffmpeg command that I'm using to publish the video to rtsp-simple-server:
ffmpeg -re -i ./bbb-1920x1080-cfg02.mkv -c copy -an -f rtsp -rtsp_transport tcp rtsp://0.0.0.0:8554/test
I'm running the default configuration file with only these HLS settings changed:
hlsAlwaysRemux: yes
hlsVariant: fmp4
And this is the rtsp-simple-server log:
2023/01/09 15:16:22 INF [RTSP] [session ed59a992] is publishing to path 'test', with TCP, 1 track (H265)
2023/01/09 15:16:22 INF [HLS] [muxer test] created automatically
2023/01/09 15:16:22 INF [HLS] [muxer test] is converting into HLS, 1 track (H265)
2023/01/09 15:16:23 INF [HLS] [muxer test] ERR: muxer error: unable to extract DTS: SPS not received yet
2023/01/09 15:16:33 INF [HLS] [muxer test] is converting into HLS, 1 track (H265)
2023/01/09 15:16:33 WAR [RTSP] [session ed59a992] PACI packets are not supported (yet)
2023/01/09 15:16:33 INF [HLS] [muxer test] ERR: muxer error: unable to extract DTS: SPS not received yet
2023/01/09 15:16:43 INF [HLS] [muxer test] is converting into HLS, 1 track (H265)
2023/01/09 15:16:45 INF [HLS] [muxer test] ERR: muxer error: unable to extract DTS: invalid SPS: SubLayerProfilePresentFlag not supported yet
2023/01/09 15:16:55 INF [HLS] [muxer test] is converting into HLS, 1 track (H265)
2023/01/09 15:16:56 WAR [RTSP] [session ed59a992] invalid aggregation unit (invalid size)
2023/01/09 15:16:56 INF [HLS] [muxer test] ERR: muxer error: unable to extract DTS: invalid SPS: SubLayerProfilePresentFlag not supported yet
2023/01/09 15:17:06 INF [HLS] [muxer test] is converting into HLS, 1 track (H265)
2023/01/09 15:17:08 INF [HLS] [muxer test] ERR: muxer error: unable to extract DTS: invalid SPS: SubLayerLevelPresentFlag not supported yet
2023/01/09 15:17:18 INF [HLS] [muxer test] is converting into HLS, 1 track (H265)
2023/01/09 15:17:18 WAR [RTSP] [session ed59a992] PACI packets are not supported (yet)
2023/01/09 15:17:18 INF [HLS] [muxer test] ERR: muxer error: unable to extract DTS: invalid SPS: ScalingListDataPresentFlag not supported yet
In this case the HLS endpoint is not playable. Hope that you can figure out if there's something wrong with the file or the muxer...
Regards, Mihail
@mihailj please open a dedicated issue and provide again the file, thanks.
Describe the feature
Description The Server support HLS for h264 rtsp but when I tried using h265 rtsp it is unable to create .m3u8 file. I think for HLS it doesn't have h265 decoder.
please add HLS support for h265 rtsp.