Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
Bradskey
Level 7

Audio selection not available

I've written a private app that uses roVideoScreen to play a collection of mp4 videos streamed over http. Some of the videos have multiple audio tracks, usually a commentary track, and I would like to be able to select which audio track to play. Supposedly the roVideoScreen object supports this, but no matter how I construct the MP4 file I get the "Audio selection not available" message when hitting the menu (*) button:



I made sure to remux the mp4 file (using MP4Box) and specifying the ISO language code "eng" for both tracks. It did not help. I then tried labeling the second audio track as Spanish and hard-coded AudioLanguageSelected = "spa" into my Content Meta-Data array in the app. When I tried playing the video again it actually worked! I could now hear the second audio track instead of the first one. This tells me that the roVideoScreen component is perfectly capable of playing either audio stream from my mp4 file. But I still only see "Audio selection not available" when hitting the menu key.

What is the trick to get the audio selection feature to work when pressing the menu (*) key. I want the user to be able to pick the alternate audio tracks, which will actually all be in English, when they are available. I am currently setting minimal content meta-data fields. A bitrate of 0, the one http URL to the mp4 file, quality is always set to "HD", format is always "mp4", and I set a title. Everything is streamed over a private network to HD hardware so multiple bitrates and other settings are unnecessary. Streaming and playback seem to work flawlessly, what am I missing?
0 Kudos
3 Replies
Bradskey
Level 7

Re: Audio selection not available

From all indications there simply is no way currently to do this, or at least no obvious and well documented way that I can find out.

I've invested substantially in Roku for my own private solution, because its pervasive and generally easy to develop for. I have friends and relatives who even have Roku TV sets and it makes it easy to share my channel with them. But besides the under-powered hardware vs the competition and limited format/codec support, what I find truly frustrating is that for such a basic simple feature like directly designating the audio stream, preferably by both ordinal or language code in the API or a functioning audio track selection screen, that we go years and years with no API support and pretty much all questions about this specific topic go ignored. :x Doubly so because the device and roVideoScreen software component are demonstrably able to play the audio stream, there simply is no easy way for me to tell it to do so, either by API or on-screen controls. The screen that pops up saying "Audio selection not available" remains an undocumented mystery.
0 Kudos
renojim
Level 10

Re: Audio selection not available

I remember asking about how to get a different audio track to play years ago (long before that "audio configuration" popup existed) and got the answer that I needed to use AudioLanguageSelected. I was just going to add my own selection screen before starting the movie, but I never got around to encoding all my movies with the commentary track, so I never did anything with it. Seems like an oversight that a method to select this via the popup was never added. I think the configuration popup only lets you choose between something like AAC vs. AC-3, but I'm not sure.

Edit: I take it back. I have no idea what that popup is for. I thought I never saw it display an option because I didn't have a Dolby Digital receiver connected, but my RokuTV supports Dolby Digital and that selection still does nothing with my videos that have both AC-3 5.1 and AAC tracks. :roll:

-JT
0 Kudos
Bradskey
Level 7

Re: Audio selection not available

Yeah, since the popup doesn't work and it isn't even clear what its for, I guess what I really need is Brightscript support for something like a "AudioStreamID = 1" in the content metadata array for roVideoScreen.

The AudioLanguageSelected setting does work, but it is not useful if you don't care about multiple languages. All my tracks are in English, consisting of commentaries and sometimes music/sfx. And since I primarily encode with Handbrake, virtually none of my audio tracks have a language code on them anyway, and I'm not interested in re-muxing everything to add the ISO codes when I don't even need them. Even if the language codes were present, the AudioLanguageSelected does nothing when you have multiple tracks for the same language. I'm not interested in language codes, or doing something hack-ish like labeling all my commentary tracks as Spanish. I just want to directly specify the audio stream to play by ordinal. If I provide a bad value then default to stream 0.

Roku has a lot of advantages in distribution and ease of development, but the language/API features are only enhanced in very small ways at a glacial pace. I've written my own applications around libvlc where I have infinitely more flexibility with things like this. I write for Roku because its easier to share and gets things on the big screen. This is hardly an advanced or novel feature I'm talking about here, so how many more years before we can get something so basic as specifying the audio stream?
0 Kudos