Skip to content

Comments

Add 16 bit PCM audio track detected including MS ACM for >2 channels #1410

Merged
ojw28 merged 5 commits intogoogle:devfrom
drhill:ms_acm_pcm
Apr 6, 2016
Merged

Add 16 bit PCM audio track detected including MS ACM for >2 channels #1410
ojw28 merged 5 commits intogoogle:devfrom
drhill:ms_acm_pcm

Conversation

@drhill
Copy link
Contributor

@drhill drhill commented Apr 1, 2016

Seems that 1 or 2 channel tracks come in directly as PCM_INT_LIT while >2 channel tracks are wrapped in MS ACM to preserve channel mapping.

@ojw28
Copy link
Contributor

ojw28 commented Apr 4, 2016

Please can you provide sample media for both codec types? Ideally also for both 16-bit and non-16-bit. You can email some samples to dev.exoplayer@gmail.com if you're unable to provide them publicly. Thanks!


mimeType = MimeTypes.AUDIO_RAW;
if (audioBitDepth != 16)
throw new ParserException("ExoPlayer is only capable of handling 16-bit audio.");
Copy link
Contributor

Choose a reason for hiding this comment

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

As a side note, we're working on adding support for re-sampling of 8/24-bit audio to. This will likely happen all the way down in AudioTrack. Or in other words, don't bother working on this, since it's near the top of our list already ;).

@drhill
Copy link
Contributor Author

drhill commented Apr 4, 2016

Cleaned up. I proved samples via email link for 16bit PCM and 24 bit PCM (mono and multichannel). A_MS_ACM is tricky because the clips I sent were originally that (except the mono 24 bit), but ffmpeg changed the MKV header info when I cut the clip down. I'll look for another way to get a clean clip that has A_MS_ACM that isn't full length as the shortest I have would be 40+ minutes of HD video & lossless audio.

Is there any other changes you would like me to make?

}
}

public static final int WAVEFORMAT_SIZE = 18;
Copy link
Contributor

Choose a reason for hiding this comment

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

All this stuff should be private rather than public (including the method). The constants should be defined at the top of the file (method at the bottom as it is now).

@ojw28
Copy link
Contributor

ojw28 commented Apr 5, 2016

Also looks good otherwise, thanks!

@ojw28
Copy link
Contributor

ojw28 commented Apr 5, 2016

[NB - Matching style of code comment applies to this one too]

@drhill
Copy link
Contributor Author

drhill commented Apr 5, 2016

Changes up!

@ojw28 ojw28 merged commit 1ff8698 into google:dev Apr 6, 2016
@ojw28
Copy link
Contributor

ojw28 commented Apr 6, 2016

Thanks for the changes! FYI I made some tweaks in 841c10f. Let me know if I broke anything; I confess to not having tested the result...!

@drhill
Copy link
Contributor Author

drhill commented Apr 6, 2016

Np. I'll give it a test when I get home this afternoon.

@drhill
Copy link
Contributor Author

drhill commented Apr 6, 2016

Works fine, thanks!

@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants