Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/media-segment-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@ const handleSegmentBytes = ({
// if we have a audio track, with a codec that is not set to
// encrypted audio
if (tracks.audio && tracks.audio.codec && tracks.audio.codec !== 'enca') {
trackInfo.audioCodec = tracks.audio.codec;
// note Opus box name is capitalized, but things want lowercase for checks
trackInfo.audioCodec = tracks.audio.codec.toLowerCase();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We get this information from mux.js specifically lib/mp4/probe.js and we toLowerCase the codec there if it isn't one that we know. I guess i'm just not understanding how we can get here with a codec that isn't lowercase. Do you have a test source that we can look at?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, here's my test page that combines a few things:
https://brionv.com/misc/hls-test/ogv.html

The Opus audio track: https://brionv.com/misc/hls-test/caminandes-llamigos.webm.audio.opus.mp4

The actual codec fourCC for Opus in MP4 is "Opus" (0x7375704F) -- it is not lowercased in the actual binary file.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll pull up the local source and double-check versions of everything when I get a chance -- feel free to shoot any questions on my usage and I'll try my best to answer. :)

I'm not 100% confident I'm correctly labeling everything in the m3u8 for the Opus track version. (iOS accepts the MP3 audio version.)

}

// if we have a video track, with a codec that is not set to
Expand Down