renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2012
10:44 PM
AudioPIDPref
I just tried to use AudioPIDPref for the first time without any luck. I ripped a DVD to an m4v file using HandBrake and included the main audio track and the commentary. Both tracks are encoded as AAC and I can switch between them using VLC, but I can't figure out how to get the roVideoScreen to choose one or the other. I always get the main audio, even though it's the first audio track and not the last. The documentation for AudioPIDPref specifies that the last audio track will be selected if AudioPIDPref isn't set. MediaInfo shows:
Has anyone been able to do something like this or have any insight?
-JT
Audio #1I tried using the ID it shows (2 or 3) as AudioPIDPref, but it has no effect.
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : 40
Duration : 1h 40mn
Bit rate mode : Variable
Bit rate : 160 Kbps
Maximum bit rate : 252 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Stream size : 115 MiB (7%)
Language : English
Encoded date : UTC 2012-07-01 21:55:19
Tagged date : UTC 2012-07-01 22:08:59
Audio #2
ID : 3
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : 40
Duration : 1h 40mn
Bit rate mode : Variable
Bit rate : 160 Kbps
Maximum bit rate : 223 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Stream size : 115 MiB (7%)
Language : English
Encoded date : UTC 2012-07-01 21:55:19
Tagged date : UTC 2012-07-01 22:08:59
Has anyone been able to do something like this or have any insight?
-JT
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
6 REPLIES 6
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2012
08:10 AM
Re: AudioPIDPref
Nobody's tried this or has any experience with this?
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2012
09:37 AM
Re: AudioPIDPref
Here's another discussion on the subject, not sure if it will help you:
viewtopic.php?f=34&t=34679&p=222769&hilit=audiopidpref#p222769
viewtopic.php?f=34&t=34679&p=222769&hilit=audiopidpref#p222769

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2012
09:39 AM
Re: AudioPIDPref
I have successfully used AudioPIDPref on HLS streams before, but I've never tried it with static video files. I seem to remember greubel working with it for Chaneru at one point. It might be worth pinging him directly to see if he had any success.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2012
08:58 PM
Re: AudioPIDPref
Thanks guys. I saw the other thread before I posted. It isn't clear from that whether greubel was ever able select a specific audio stream. I'll try to ping him directly.
Perhaps it only works for HLS? If so, the documentation should be updated. This was just for my own use. I've been contemplating ripping all my DVDs, some of which I'd like to have both the main audio and commentary tracks. It would be nice if I didn't have to have two rips for those movies.
-JT
Perhaps it only works for HLS? If so, the documentation should be updated. This was just for my own use. I've been contemplating ripping all my DVDs, some of which I'd like to have both the main audio and commentary tracks. It would be nice if I didn't have to have two rips for those movies.
-JT
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2012
06:02 PM
Re: AudioPIDPref
AudioPIDPref does only work on HLS streams. PIDs are a feature of Transport Streams and don't have meaning in an MP4 file.
There is a better way to do this by setting the AudioLanguageSelected attribute in the content metadata. This should be a 3-letter ISO-639 language code. This is used to select the best matching track from the content, and it should work on both MP4 and HLS (assuming each track is correctly tagged with a language code). I'm not positive which releases support this. It may not work on R1s.
--Mark
There is a better way to do this by setting the AudioLanguageSelected attribute in the content metadata. This should be a 3-letter ISO-639 language code. This is used to select the best matching track from the content, and it should work on both MP4 and HLS (assuming each track is correctly tagged with a language code). I'm not positive which releases support this. It may not work on R1s.
--Mark
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2012
12:11 AM
Re: AudioPIDPref
Thanks Mark! I can't find AudioLanguageSelected anywhere in the documentation, but it works great on both my R1 and R2.
-JT
-JT
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.