Kodi Community Forum

Full Version: Questions about audio codec flagging
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to figure out audio codec flagging as I notice a bunch of my videos don't display all the flags. According to the wiki:

Quote:XBMC tries to read the meta information from the media file, after it was added to the Library.

Not sure exactly what that means, but since the info is stored in the db I assumed that it reads it from there first, and if it's not there then reads the media file itself. The problem though is that I have a movie (TRON: Legacy) that doesn't display the audio codec flag. So I went into the db (MySQL db) and checked it's audio codec value in the streamdetails table. The value was 200 (whatever that is) so I assumed that was the problem and changed it to ac3, which is what XBMC displays when I hit "O" while playing the file. I then re-started XBMC and it still doesn't show the Dolby Digital flag. The Skin is Cirrus 2.06 and it shows the flag for other DD movies so that got me wondering if the value in the db is even referenced for flagging purposes. If not, how can I correct the videos that don't display a flag?

Another thing I'm wondering is where do the values in the db come from? I see many different values and multiples of the same codec (ac3 and ac-3 for example). I also see some strange values, 200 (mentioned above), microsoft, 128, 128, 130, etc. I only use Ember Media Manager to scrape my movies and I do have it get the metadata, but the nfos created for these strange values and have standard codecs listed (ac3, DTS). So where could these strange values and multiple values be coming from? Is it from XBMC reading the file itself? If so, why the different values for the same codec?
Bump.
I personally use an external metadata manager to create nfo files that contain the meta data for each movie.

I suspect that 200 relates to some sort of value. and that ac3 relates to some number. Assuming you don't want to start using nfo files, your best bet is to use a metadata tool that can read and update the xbmc database directly. l know they exist, but I cannot remember the names of any.
Do you see the flags if you switch back to the confluence skin? It's possible that the skin you are using just doesn't have an icon for that particular audio type.

Most skins match the audio codec and the number of channels in order to display an audio flag, so a DD 5.1 movie could have a different flag than a movie with DD 2.0, for instance.

I use nfo files but I let xbmc scrape and then export them as single files...

Here are some examples (and xbmc does use these when it imports a title into the library)

DD 2.0

Code:
<audio>
                <codec>ac3</codec>
                <language>eng</language>
                <channels>2</channels>
            </audio>

DTS 5.1:

Code:
<audio>
                <codec>dca</codec>
                <language>eng</language>
                <channels>6</channels>
            </audio>


FLAC 1.0

Code:
<audio>
                <codec>flac</codec>
                <language>fre</language>
                <channels>1</channels>
            </audio>
Crap I forgot about this thread. Sorry. It turns out I had a couple issues. For one, I had upgraded a couple of my XBMC installs which lead to me having two versions of the video db (I use MySQL). As it happens, I was editing the old version while viewing the new one on the XBMC box I was using. So XBMC does read the value in the streamdetails table. That was that problem.

Second, it turns out some of my nfo files indeed had the weird values (128, 130, etc) so that's where XBMC got them from. Time to manually sort it out now. Thanks for the replies.
One more question, when there are multiple audio streams for a given video, how does XBMC choose which one it flags? For example, I have a movie where the streamdetails table shows three audio streams (DTSMA, DTS, AC3). In XBMC, the DTS flag is displayed. The skin I'm using has flags and code for all three codecs. So why did it chose the DTS stream and not the DTSMA?
RockDawg Wrote:One more question, when there are multiple audio streams for a given video, how does XBMC choose which one it flags? For example, I have a movie where the streamdetails table shows three audio streams (DTSMA, DTS, AC3). In XBMC, the DTS flag is displayed. The skin I'm using has flags and code for all three codecs. So why did it chose the DTS stream and not the DTSMA?

Are you running Dharma or and Eden build? Only the Eden builds support reading DTSMA. As far as which it picks to flag when there are multiple audio tracks, it picks the first one. You can use mediainfo or mkvmerge to look at a file and determine the order.
I am running Eden. According to MKVmerge, there are two audio streams. It shows both codecs as a_dts, but track 2 says name is lossless and track three name is 3/2+1 (track 1 is the video stream). I gather that means the first audio track is dtsma and the second one is the regular dts.

In my streamdetails table it is showing 2 streams (I was wrong in my earlier post. There is no ac3 for this movie). One says dtsma and the other syas dca. The dtsma is listed first in the table, but this table has no indexes/keys. So I don't know if it truly is first or my mysql db viewer just happens to be displaying it that way.

Either way, only the dts flag displays for this particular movie and I am positive that the dtsma flag works in this skin.