Basic support for FLAC-in-MP4 audio tracks#272
Open
bvibber wants to merge 2 commits intovideojs:masterfrom
Open
Basic support for FLAC-in-MP4 audio tracks#272bvibber wants to merge 2 commits intovideojs:masterfrom
bvibber wants to merge 2 commits intovideojs:masterfrom
Conversation
Significant speedup in (pre-Chromium) Edge, especially for high bitrates such as uncompressed or lightly-compressed frames. Previously, buffer.byteLength and buffer.length got looked up multiple times per byte processed in Edge, leading to higher CPU usage.
Allows for creating an MP4 stream with FLAC contents using the MP4 box generation functions or AudioSegmentStream. Use codec string 'fLaC' and specify a 'metadata' field in the track info with the FLAC METADATA_BLOCK_HEADER fields to go into the dfLa box. See https://github.com/xiph/flac/blob/master/doc/isoflac.txt for details of the MP4 embedding of FLAC audio. Also allows variable-length audio packets in AudioSegmentStream FLAC may have variable-length packets, so allow passing a duration in samples on incoming frames. This gets FLAC with, say, 960 samples per frame working consistently in Firefox and Chrome.
Contributor
|
This is a cool feature, but we've got a lot on our plate right now so it might be a bit before we get a chance to review this. |
Contributor
Author
|
No worries, no rush. :) |
Member
|
@Brion hey, do you have some test content readily available we can take a look at? Thanks. |
Contributor
|
@Brion I tested out your pull request and I do see how this would help us generate flac-in-mp4 content. Since this doesn't seem to break mpeg ts transmuxing on our end I think we could merge this easily enough. It would be really helpful to get two things from you here so that we can get this in:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows for creating an MP4 stream with FLAC contents using the MP4 box generation functions or AudioSegmentStream.
Use codec string 'fLaC' and specify a 'metadata' field in the track info with the FLAC METADATA_BLOCK_HEADER fields to go into the dfLa box.
See https://github.com/xiph/flac/blob/master/doc/isoflac.txt for details of the MP4 embedding of FLAC audio.