video-dev / hls.js

HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
https://hlsjs.video-dev.org/demo
Other
14.71k stars 2.57k forks source link

FLAC audio codec #4387

Closed nickcartery closed 1 year ago

nickcartery commented 2 years ago

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

FLAC audio codec in MP4 container reopen for #972

Describe the solution you'd like

CHUNK_DEMUXER_ERROR_APPEND_FAILED: FLAC audio stream detected in MP4 https://hls-js.netlify.app/demo/?src=https://vnoo.net/ts/media_0.m3u8 I can play FLAC in DASH format in dash.js but not with HLS in HLS.js https://reference.dashif.org/dash.js/v4.1.0/samples/dash-if-reference-player/index.html

https://vnoo.net/ts/570.mpd https://vnoo.net/ts/media_0.m3u8

Additional context

image image

No response

phillipseamore commented 2 years ago

RFC 8216 specifies: "Supported Packed Audio formats are AAC with ADTS framing [ISO_13818_7]; MP3 [ISO_13818_3]; AC-3 [AC_3]; and Enhanced AC-3 [AC_3]"

It's really not the purpose of this library to add any functionality outside of the specifications.

gogonowski commented 2 years ago

RFC8216 has been moved to draft-pantos-hls-rfc8216bis. It now allows the addition of FLAC, ALAC, and xHE-AAC in fMP4, which is also DASH compliant. Sample streams are listed below. We can supply ALAC if interested, but it only works in Safari.

HLS fMP4 Audio-Only with emsg id3v2.4 Timed Metadata Reference Streams

There has been much question on how this is to be implemented. This is how you do it.

These streams have been produced with StreamS HLSdirect(tm) Live Encoder.

AAC-LC https://la2.indexcom.com/player/pad/fmp4/hls/128k/program.m3u8

AAC-HEv1 https://la2.indexcom.com/player/pad/fmp4/hls/64k/program.m3u8

xHE-AAC https://la2.indexcom.com/player/pad/fmp4/hls/40k/program.m3u8

FLAC - Lossless https://la2.indexcom.com/player/pad/fmp4/hls/FLAC/program.m3u8

This can be viewed in action here: https://la2.indexcom.com/player/eval https://la2.indexcom.com/player/pad/fmp4

/greg. StreamS

robwalch commented 1 year ago

This issue should have been resolved by #4772.

Are you able to play your streams in dev https://hlsjs-dev.video-dev.org/demo/ ?

If not please provide a sample stream, and confirm which platform/browser you are running in and whether or not it supports FLAC in MSE.

robwalch commented 1 year ago

Closing as there is not additional work required to support FLAC in v1.5.0. If you have an issue, you can comment, but a new issue using the Bug Report Template would be most helpful.

gogonowski commented 1 year ago

Yes, this is working correctly.

Here is another eval stream, complete with emsg id3v2.4 metadata:

https://db2.indexcom.com/bucket/ram/00/01f/FLAC/program.m3u8

/greg.

StreamS/Modulation Index, LLC

.

From: Rob Walch @.> Sent: Tuesday, 18 July, 2023 14:18 To: video-dev/hls.js @.> Cc: gogonowski @.>; Comment @.> Subject: Re: [video-dev/hls.js] FLAC audio codec (Issue #4387)

This issue should have been resolved by #4772 https://github.com/video-dev/hls.js/pull/4772 .

Are you able to play your streams in dev https://hlsjs-dev.video-dev.org/demo/ ?

If not please provide a sample stream, and confirm which platform/browser you are running in and whether or not it supports FLAC in MSE.

— Reply to this email directly, view it on GitHub https://github.com/video-dev/hls.js/issues/4387#issuecomment-1641004281 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AC4LC55U7ESDJDTTDU4YDELXQ34QNANCNFSM5GRA4ICQ . You are receiving this because you commented. https://github.com/notifications/beacon/AC4LC54CVEFDTOONL3T2RSLXQ34QNA5CNFSM5GRA4IC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOMHH3Z6I.gif Message ID: @. @.> >

Tsuruoka-569 commented 1 year ago

FLAC HLS content seems to still have problems. I made a new ticket #5798