Author Topic: Tags Library  (Read 65128 times)

Steve Grant

  • Posts: 157
Re: Tags Library
« Reply #450 on: 30 Jan '18 - 14:16 »
Thanks for that I will give it a try, however for the moment I have gone back to Bass getting bitrate etc.

I have a load of mp3's that Bass/dbPoweramp/mp3tag all return the correct bitrate. Tagslib returns 0. (They all play fine).

Here is one for you to play with https://www.dropbox.com/s/3g09fur83dtruav/01%20-%20Marina%20%26%20The%20Diamonds%20-%20Radioactive.mp3?dl=1

Steve Grant

  • Posts: 157
Re: Tags Library
« Reply #451 on: 30 Jan '18 - 14:48 »
Just for your info I am turning on the relevant config thus;

   
Code: [Select]
    TagsLibrary_SetConfig lTags, 1, 2, ttAutomatic
    TagsLibrary_SetConfig lTags, 1, 3, ttAutomatic
    TagsLibrary_SetConfig lTags, 1, 5, ttAutomatic
    TagsLibrary_SetConfig lTags, 1, 6, ttAutomatic
    TagsLibrary_SetConfig lTags, 1, 7, ttAutomatic

It makes no difference.

Steve Grant

  • Posts: 157
Re: Tags Library
« Reply #452 on: 1 Feb '18 - 15:59 »
Hi again,

I've come across a file that TagsLib simply will not write to. Even the old AudioGenie that I used to use before TagsLib will write to it.

I've checked the file properties also the security and all is ok.

https://www.dropbox.com/s/x6iecjjugu4r4wa/CD1423Track76.mp3?dl=1

3delite

  • Posts: 919
Re: Tags Library
« Reply #453 on: 2 Feb '18 - 23:14 »
Uploaded an update that fixes that 2 files, please download it, link in the first post.

The config option should be like:

Code: [Select]
TagsLibrary_SetConfig lTags, 1, TAGSLIBRARY_DEEP_OPUS_BITRATE_SCAN, ttAutomatic

Please check if the function returns a non-zero value, 0 means failure.

But looking at the code, sorry, it only works explicitly with Opus files (probably that's why the name contains 'Opus', it was a long ago that I coded this), and for Vorbis files only used when the 'BitRateNominal' is 0 by the Vorbis header.

Steve Grant

  • Posts: 157
Re: Tags Library
« Reply #454 on: 3 Feb '18 - 13:58 »
That works great thank you very much.

The config option should be like:

Code: [Select]
TagsLibrary_SetConfig lTags, 1, TAGSLIBRARY_DEEP_OPUS_BITRATE_SCAN, ttAutomatic

Please check if the function returns a non-zero value, 0 means failure.

Yes the function returns non-zero, after all
Code: [Select]
Public Const TAGSLIBRARY_DEEP_OPUS_BITRATE_SCAN As Long = 7means I can use TAGSLIBRARY_DEEP_OPUS_BITRATE_SCAN or 7.

Whilst we are having so much luck here are two more, they both return 128 but 1) should be 144 and 2) should be 260!

files removed 08/02/2018
« Last Edit: 8 Feb '18 - 11:51 by Steve Grant »

3delite

  • Posts: 919
Re: Tags Library
« Reply #455 on: 9 Feb '18 - 00:30 »
Yes, TAGSLIBRARY_DEEP_OPUS_BITRATE_SCAN = 7, but it's always a better idea to use the const names.

MP3 (MPEG) files are only processed by the first MPEG frame. So the bit rate is only valid for CBR MPEG files. Please use BASS_ChannelGetAttribute() with the BASS_ATTRIB_BITRATE option for getting the bit rate. You probably want to get the playtime anyway by BASS already so no need to scan the file twice.