Audio codec preference on DASH/HLS

774 views
Skip to first unread message

Alvaro Velad

unread,
Aug 28, 2017, 5:40:33 AM8/28/17
to Shaka Player Users
Hello,

Are there any mechanism for prefer one codec over other?

I prefer reproduce ac-3 over acc, how can I do it?


Thanks!

Joey Parrish

unread,
Aug 29, 2017, 2:42:52 PM8/29/17
to Shaka Player Users
Hi Alvaro,

Currently, when multiple codecs are presented in the manifest and are supported by the browser, Shaka Player chooses the "most efficient" codec by bitrate.  This makes good sense for video, I think, but may make less sense for audio, where multi-channel streams may be preferable on platforms with multi-channel output capabilities, in spite of their increased bitrate.

If there is a better heuristic to choose codecs in a browser environment, (for example, by audio output channels), please let us know!

-Joey


********************************************************************
This email and any attachments are confidential and meant only for the addressees,
and may be protected by law. If this email has been sent to you in error,
please notify the sender immediately and delete this e-mail from your computer.
emails are not secure and we will not accept liability if this e-mail is accessed 
by anyone or modified or amended following dispatch.  Any views or opinions in this 
email are those of the author and do not represent those of Mirada unless otherwise 
specifically stated.  Although we have taken every reasonable precaution to ensure that 
any attachment to this e-mail has been checked for viruses, we do not accept
liability for any damages. 
  
Mirada is a public limited company,
Registered Number: 03609752
Registered Office: 68 Lombard Street, London. EC3V 9LJ

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-player-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/159a4f23-b782-498b-986d-edb4d57711dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alvaro Velad

unread,
Aug 30, 2017, 2:55:00 AM8/30/17
to Shaka Player Users
Hi Joey,

I'm accord with you, chooses the "most efficient" codec by bitrate is good for video, but for audio, I'd prefer another heuristic.

I propose the following:
  1. Add a preferredAudioNumChannelLanguage into configuration
  2. Improve selectAudioLanguage function to allow language, role and numChannels
  3. Change the current heuristic for audio codec selection.
    • Choose the codec that has a track with the number of channels closest to the preference (preferredAudioNumChannelLanguage).
    • If there are several that meet this requirement, choose the one with the lowest bandwidth.
    • If there are not preferredAudioNumChannelLanguage configuration, follow the current logic of "most efficient" codec by bitrate
Example with the previous stream:

Audio tracks:
  • AAC-LC - stereo @ 160 kbps
  • AC-3 - 5.1 @ 384 kbps
  • EC-3 - 5.1 @ 192 kbps
In Safari Browser or Edge Browser (both support all previous codecs):
case 1) preferredAudioNumChannelLanguage = 2, the player should choose AAC-LC - stereo @ 160 kbps
case 2) preferredAudioNumChannelLanguage = 6, the player should choose EC-3 - 5.1 @ 192 kbps

Joey, this make sense for you?

Alvaro


El martes, 29 de agosto de 2017, 20:42:52 (UTC+2), Joey Parrish escribió:
Hi Alvaro,

Currently, when multiple codecs are presented in the manifest and are supported by the browser, Shaka Player chooses the "most efficient" codec by bitrate.  This makes good sense for video, I think, but may make less sense for audio, where multi-channel streams may be preferable on platforms with multi-channel output capabilities, in spite of their increased bitrate.

If there is a better heuristic to choose codecs in a browser environment, (for example, by audio output channels), please let us know!

-Joey

On Mon, Aug 28, 2017 at 2:40 AM, Alvaro Velad <alvaro...@mirada.tv> wrote:
Hello,

Are there any mechanism for prefer one codec over other?

I prefer reproduce ac-3 over acc, how can I do it?


Thanks!

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-pla...@googlegroups.com.

Joey Parrish

unread,
Oct 3, 2017, 2:11:11 PM10/3/17
to Shaka Player Users
Sorry I missed this.  I'm catching up now, and I see this has been filed on github as https://github.com/google/shaka-player/issues/1013

We'll continue there.  Thanks!


--
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsubscribe@googlegroups.com.
********************************************************************
This email and any attachments are confidential and meant only for the addressees,
and may be protected by law. If this email has been sent to you in error,
please notify the sender immediately and delete this e-mail from your computer.
emails are not secure and we will not accept liability if this e-mail is accessed 
by anyone or modified or amended following dispatch.  Any views or opinions in this 
email are those of the author and do not represent those of Mirada unless otherwise 
specifically stated.  Although we have taken every reasonable precaution to ensure that 
any attachment to this e-mail has been checked for viruses, we do not accept
liability for any damages. 
  
Mirada is a public limited company,
Registered Number: 03609752
Registered Office: 68 Lombard Street, London. EC3V 9LJ

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages