v19 [Addition] - Filter your music by sample rate, bit rate or channels.
#1
Just to let people know that from now on in the v19 nightlies, it will be possible to use smart playlists or nodes to filter your music by sample rate, bit rate, or the number of channels 17540 (PR). This will require you to do a full re-scan of all your tags however so that the information can be read into the database first. 

Once done though you will be able to make smart playlists based on the number of channels eg quadraphonic or 5.1 audio,  or for files with sample rates of 96Khz (and/or above) and have nodes that do the same thing.

Example node to show albums where the songs have a sample rate of 96Khz or above.

<?xml version="1.0" encoding="UTF-8" ?>
<node type="filter">
    <label>Flac Albums 96Khz</label>
    <content>songs</content>
    <order direction="ascending">album</order>
    <rule field="samplerate" operator="greaterthan">
        <value>95999</value>
    </rule>
    <group>albums</group>
</node>

Once again, I'd like to express my thanks to @DaveBlake for all his help.  Music

I don't think there will be any issues, but if you do come across one, please report it here or on github thanks.
Learning Linux the hard way !!
Reply
#2
Thanks guys, that has been a long standing wish of mine! I feel that is such an important addition, could it be backported to Leia, even if it means upping the database version?
Reply
#3
(2020-03-25, 18:10)HeresJohnny Wrote: Thanks guys, that has been a long standing wish of mine! I feel that is such an important addition, could it be backported to Leia, even if it means upping the database version?

No sorry.  Only fixes get backported, not new features.
Learning Linux the hard way !!
Reply
#4
So I implemented in Aeon MQ5 but I notice no label for ListItem.BitsPerSample.  Any reason for this?

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix
Leia see: 304472
Reply
#5
(2020-03-27, 20:13)scott967 Wrote: So I implemented in Aeon MQ5 but I notice no label for ListItem.BitsPerSample.  Any reason for this?

Yes, taglib doesn't return that as part of it's audioproperties.  See https://taglib.org/api/classTagLib_1_1Au...f7e2f9446d  Also https://github.com/xbmc/xbmc/blob/master...L1311L1317 which is where the attributes are read via taglib as it reads in the tags from the files.  Probably the only way to get bitspersample would be to use ffmpeg to obtain it, but that doesn't support many tags so it would mean using two different libraries to inspect each file.  That would increase scanning time so I didn't look into it.
Learning Linux the hard way !!
Reply
#6
Hum, does tablib have it for Flac https://taglib.org/api/classTagLib_1_1FL...rties.html ?
(not that I want an extra song tablefield right now)
Reply
#7
Yes it does.  It also has it for MP3/MP4 and APE. But not for Ogg::Vorbis or Ogg::Opus so I went for the stuff that is fully supported.  Don't intend on adding another song table field any time soon, although no promises it won't happen sometime Big Grin
Learning Linux the hard way !!
Reply
#8
The player returns bits per sample so is it not possible to add the info to the db once the file has been played.
Reply
#9
Could playing something update the DB, well sure. It would have to be treated like userrating, lastplayed and playcount but possible. But it is not something I would be in a rush to do, so much else to attend to, bigger fish to fry.
Reply
#10
I was just curious about it, don't think there is a big demand for it (though maybe some HD music advertises more bits like video does with HDR).

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix
Leia see: 304472
Reply
#11
(2020-03-28, 16:42)scott967 Wrote: I was just curious about it, don't think there is a big demand for it (though maybe some HD music advertises more bits like video does with HDR).

Yeah well, I might well have missed a trick there.  BitsPerSample is an easy way to identify hi-res stuff (although so is sample rate) and I guess for completeness I should probably add it at some point.  I just added the stuff that I knew could be returned for all music files so it was reasonably simple to implement.  BitsPerSample is useful though so I will look to add it in the future where possible.  Will have to wait a bit however as there are other changes to the db that need to be added first.
Learning Linux the hard way !!
Reply
#12
ping @ronie Could you add the listitems from 17540 (PR) to your skin changes thread for v19 (https://forum.kodi.tv/showthread.php?tid...id=2937215) when you get a minute please ?  Thanks.
Learning Linux the hard way !!
Reply
#13
sure thing, added.

just in case i ever forget (or miss your ping) feel free to edit the thread yourself :-)
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
[Addition] - Filter your music by sample rate, bit rate or channels.00
This forum uses Lukasz Tkacz MyBB addons.