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 for H.265/HEVC in MPEG2-TS #4943

Closed
u93 opened this issue Oct 4, 2022 · 37 comments · Fixed by #5847
Closed

Support for H.265/HEVC in MPEG2-TS #4943

u93 opened this issue Oct 4, 2022 · 37 comments · Fixed by #5847

Comments

@u93
Copy link

u93 commented Oct 4, 2022

Is your feature request related to a problem? Please describe.

After Chrome v104 and v105 H265 support was added at the browser level and standards like DASH played on DASH.js already support it in Chrome.

We are working with H.265 profile: hvc1.1.2.L153.00 and other similar H.265 profiles used in security cameras.

Take a look at this article for more information:

https://bitmovin.com/google-adds-hevc-support-chrome/

Right now the chunks are loaded properly in the player as can be seen on the HLS.js demo page where there is buffering going on.

image

We know this was a common ask in the past, but now that Chrome added support it seems like a good moment to ask again...

Thanks!

Describe the solution you'd like

Be able to play on Chrome H.265 video using profiles common in security cameras like hvc1.1.2.L153.00 taking into consideration that Chrome added H.265 support.

Additional context

No response

@u93 u93 added Feature proposal Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Oct 4, 2022
@robwalch robwalch added Need sample stream cannot reproduce Duplicate and removed Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Oct 4, 2022
@robwalch
Copy link
Collaborator

robwalch commented Oct 4, 2022

Hi @u93,

Please convert to a bug report and provide the version of HLS.js and a sample stream that reproduces the issue. Note that the article points out:

HEVC is only supported if the underlying device has an HEVC hardware decoder

HLS.js cannot play media not supported by the browser or underlying device capabilities. You can use https://ott.dolby.com/codec_test/index.html to see if the browser you are testing reports H.265 support (isTypeSupported is the method HLS.js uses). Since in your case HSL.js is appending media but not playing it, it is possible that the support check passes but there is either an issue with your content or with Chrome being able to play it. Without a sample we cannot determine what the source of the problem is. Testing against other players and sharing the results as well as filing an issue with the Chromium team would help.

This issue duplicates #4921.

@u93
Copy link
Author

u93 commented Oct 7, 2022

Hi @robwalch ,

This is the URL that could be used for test

https://cloud-east-001-dev.videolink.io/test/hls-test-265/playlist.m3u8

We can confirm that our computer platform (Macbook Pro 2020) plays H.265 on Chrome because we verified it on Dash.js which leaves video decoding to the browser Media APIs to play it, which is platform dependent as well and after Chrome's update after v104 it started to work on theirs automatically.

Glad to help providing any more information,

@robwalch
Copy link
Collaborator

robwalch commented Oct 8, 2022

Hi @u93,

Your stream is segmented into MPEG2-TS instead of fmp4. HEVC is only supported in fmp4 container format in HLS.js.

@u93
Copy link
Author

u93 commented Oct 12, 2022

Thanks for the information @robwalch ! That gives us something at least to start working

@robwalch robwalch changed the title Add Chrome Support for H.265 (related to Chrome v104 and v105 updates) Support for H.265/HEVC in MPEG2-TS Oct 27, 2022
@robwalch robwalch added this to the 1.5.0 milestone Oct 27, 2022
@robwalch robwalch mentioned this issue Oct 27, 2022
5 tasks
@robwalch
Copy link
Collaborator

https://cloud-east-001-dev.videolink.io/test/hls-test-265/playlist.m3u8
https://bmmmd.com/test/test.m3u8

Thanks @u93 and @xifangczy for the test streams. Is there a reason you are not packaging HEVC playlists with fmp4 segments?

@JaroslavHerber
Copy link
Contributor

While developing M3U IPTV app, I have seen some (paid) IPTV streaming services worldwide using HEVC with MPEG2-TS. Don't know why they use this :)

@tmm1
Copy link
Contributor

tmm1 commented Oct 27, 2022

We deal with TV tuner hardware and often see HEVC over MPEGTS, coming from HDHomeRun tuners using DVB or in US cities experimenting with ATSC3.

When converting these streams to HLS, it's much simpler for us to re-chunk into mpegts than to convert into fmp4.

I would love to see hls.js support HEVC over MPEGTS, though I realize adding HEVC support to the existing TS demuxer is no simple task.

@malickyeu
Copy link

While developing M3U IPTV app, I have seen some (paid) IPTV streaming services worldwide using HEVC with MPEG2-TS. Don't know why they use this :)

We using MPEG2-TS because of extra licence payments per device (especially Set-top-box devices) which customers never wants to pay. Keeping streams in TS & MP4 formats is disk space suicide...

@JaroslavHerber
Copy link
Contributor

Any update on this? :)

@robwalch
Copy link
Collaborator

Any update on this? :)

It's set for milestone 1.5.0.

@fegauthier
Copy link
Contributor

A feature that I need too :) Hope that could be implemented soon. Thanks!

@robwalch robwalch mentioned this issue Mar 6, 2023
@CamiloPenagos99
Copy link

any updates in 2023?

It's planned in version 1.5 - https://github.com/video-dev/hls.js/milestone/53

Hi Guys

Are you still working on this?

@robwalch
Copy link
Collaborator

robwalch commented Oct 9, 2023

Hi @CamiloPenagos99,

It's no longer scheduled for 1.5. There are two open PRs working on support for this feature, with the latest (#5847) being the most active:

@MarcinWad
Copy link

I want to confirm that Firefox 121 Nightly Build has support for HEVC. Tested on FF121 Nightly and Windows 11. Plays DASH test streams in HEVC well.

@CamiloPenagos99
Copy link

Hi @CamiloPenagos99,

It's no longer scheduled for 1.5. There are two open PRs working on support for this feature, with the latest (#5847) being the most active:

Hello @robwalch
How are you?
I would like to follow up the PRs status. We really need to have support for H265 with MPEG-TS in our app. Thanks

@robwalch
Copy link
Collaborator

Hi @CamiloPenagos99,

A great place to start would be to pull #5847, start testing and giving feedback, and produce and share test assets that this branch plays. Such a contribution would really demonstrate the need and commitment to this format and work.

@daveisfera
Copy link

I want to confirm that Firefox 121 Nightly Build has support for HEVC. Tested on FF121 Nightly and Windows 11. Plays DASH test streams in HEVC well.

Is this announced somewhere? I don't see anything about it in the release notes for the 121 nightly build

@MarcinWad
Copy link

MarcinWad commented Oct 31, 2023

Yes. It works. Via MFT.

https://bugzilla.mozilla.org/show_bug.cgi?id=1853448

How can I help you in finishing support?

@MarcinWad
Copy link

MarcinWad commented Oct 31, 2023

Checked branch with HEVC support with my Live HEVC source. Firefox 121 Nigtly - works well.
So now we have Chrome, Edge and Firefox support added. It's just a matter of time then.

@CamiloPenagos99
Copy link

Fork hls.js and add support for playing HEVC in MPEG2-TS videos. If needed, please refer to 'https://github.com/mmfjx/hls.js' for more information.

Hello @robwalch, I already tested this fork and It really works with HEVC in MPEG2-TS videos (265), Would you like to review it, to merge it with your original library?

@robwalch
Copy link
Collaborator

robwalch commented Nov 16, 2023

Hi folks. The work to support this feature is in PR #5847. Please test and comment on open PRs.

Unfortunately the @mmfjx branch is out of date. It needs a rebase and the author has not responded in months so the PR was closed in favor of the one above:

@video-dev video-dev locked as resolved and limited conversation to collaborators Nov 16, 2023
@robwalch robwalch removed the Wontdo label Nov 16, 2023
@robwalch robwalch reopened this Nov 16, 2023
@video-dev video-dev unlocked this conversation Nov 16, 2023
@robwalch
Copy link
Collaborator

robwalch commented Nov 16, 2023

Reopened and unlocked this issue since we do not have another open issue tracking this feature.

Work to support HEVC in TS is being performed in #5847.

@robwalch robwalch linked a pull request Nov 16, 2023 that will close this issue
4 tasks
@Carseason
Copy link

How is that going? On my project it works #5847

@amirhosseinNouri
Copy link

amirhosseinNouri commented Jul 11, 2024

Hi,

Is this now supported?
I tried to play a video with H265 codec within a M2TS container. But I got the following error (using the demo player):
Parsing error:Unsupported HEVC in M2TS found

Here is the content of my master playlist:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:10.000000,
index0.ts
#EXTINF:10.000000,
index1.ts
#EXTINF:10.000000,
index2.ts
#EXTINF:10.000000,
index3.ts
#EXTINF:10.000000,
index4.ts
#EXTINF:10.000000,
index5.ts
#EXTINF:10.000000,
index6.ts
#EXTINF:10.000000,
index7.ts
#EXTINF:10.000000,
index8.ts
#EXTINF:10.000000,
index9.ts
#EXTINF:10.000000,
index10.ts
#EXTINF:10.000000,
index11.ts
#EXTINF:10.000000,
index12.ts
#EXTINF:10.000000,
index13.ts
#EXTINF:10.000000,
index14.ts
#EXTINF:10.000000,
index15.ts
#EXTINF:10.000000,
index16.ts
#EXTINF:10.000000,
index17.ts
#EXTINF:10.000000,
index18.ts
#EXTINF:10.000000,
index19.ts
#EXTINF:10.000000,
index20.ts
#EXTINF:10.000000,
index21.ts
#EXTINF:10.000000,
index22.ts
#EXTINF:10.080000,
index23.ts
#EXT-X-ENDLIST

@robwalch

@robwalch
Copy link
Collaborator

@amirhosseinNouri it has been merged into development and is scheduled for v1.6.0.

@amirhosseinNouri
Copy link

@amirhosseinNouri it has been merged into development and is scheduled for v1.6.0.

Awesome. Thank you @robwalch 🙏🏻

@jzhong-n
Copy link

@amirhosseinNouri it has been merged into development and is scheduled for v1.6.0.

Awesome. Thank you @robwalch 🙏🏻

Exciting! @robwalch any idea if there's a release date in mind? Would love to know when it's available. Also curious if the release is further out, is there a way to consume the changes before an official release?

@yas1th
Copy link

yas1th commented Sep 9, 2024

Hi Team,

We were also having the use case to support HEVC for MPEG-TS container. Going though the above comments , it is mentioned that it is scheduled for v1.6.0.

it would be really helpful for us if there is a release plan on this ?

@robwalch
Copy link
Collaborator

robwalch commented Sep 13, 2024

Among the open issues for v1.6.0 there is a related bug:

Can someone interested in seeing this feature released look at contributing a fix to the memory leak introduced?

I do not want to ship with a leak and may consider pulling the feature out if participation in bug fixing and maintenance is lacking.

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

Successfully merging a pull request may close this issue.