Jump to content

Setting 2nd audio track from live stream as default in m3u file?


WorriedNoodle

Recommended Posts

Hi guys,

I wonder if someone can help me? I have a live stream file (m3u format) with a stream that includes two audio languages. The m3u player (such as Kodi or VLC player) always defaults to stream #1 audio when I need it to default to stream #2? How do I go about doing this editing the m3u file? Attached a screen grab of the audio codec data.

post-101664-0-42105000-1438155819_thumb.

Link to comment
Share on other sites

If the m3u is just a url to open the live stream, then your application would need to support -/ options to preselect the audio substream OR allow you, like VLC, to preset/configure to app to always select your preferred language (when available) as the default audio sub-stream preference.

In 2012, HowToGeek posted such a tip for VLC

How to Make VLC Pick the English Audio Track Automatically

HowToGeek | Lowell Heddings | March 7, 2012

Tweaking VLC to Choose a Language
This one is super simple, but not necessarily obvious. Just head into Preferences –> Audio (assuming it’s set to Simple preferences), and then in the “Preferred audio language” box, plug in “EN” without the quotes. As far as we know, you could also use “en”, or “English”, but this is what we tested with. It’s worth noting you could also use this to choose a completely different language as the default—just plug in the two-letter country code.
Link to comment
Share on other sites

Hi, thanks for that idea. It appears to work in VLC so I will use it, although I'm having trouble with the dual language streams at present this looks like an easy way in VLC.

I was thinking one had to edit the m3u file, as I saw some files with an additional line in them like:

#EXTVLCOPT:audio-track=2

- but I could never get that to work.

Link to comment
Share on other sites

Stream capable audio applications have to support the #EXTVLCOPT in-file tag runtime options.

Found this from an earlier version of VLC. Current versions may still disable the runtime option

--m3u-extvlcopt, --no-m3u-extvlcopt
          Enable parsing of EXTVLCOPT: options (default disabled)

          Enable parsing of EXTVLCOPT: options in m3u
          playlists. This option is default disabled to
          prevent untrusted sources using VLC options
          without the user's knowledge. (default disabled) 

VideoLan.org Security Advisory

I did find this reference from 2012 the might be helpful:

helpful poster suggested using one of these examples
#EXTVLCOPT:audio-track=n
#EXTVLCOPT:sub-track=n
-or-
#EXTVLCOPT:audio-track-id=nnn
#EXTVLCOPT:sub-track-id=nnnn

The OP posted that yes this example worked for them:

#EXTVLCOPT:audio-track-id=660
#EXTVLCOPT:sub-track-id=1026
Link to comment
Share on other sites

Ok, I got the streams running again and found that changing the VLC basic settings to Audio Preferred audio to EN and then it works, I had to strip the m3u file of the existing #EXTVLCOPT:audio-track=n entries though otherwise the VLC defaulted to no sound at all.

I still don't know how to get the #EXTVLCOPT:audio-track=n to work or to get this to work in Kodi, but at least the EN option in VLC now working thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.



×
×
  • Create New...