Need help to find a bug in my library!
#1
Code:
I spent last few days trying to figure this out. I am on Ubuntu, Kodi runs on Pi3B+ (libreelec)

I had some old lossless wma files which I wanted to convert into flac to fix some tag issues. Procedure as follows:
1. Take some working wma files with extended Picard tags
2. Pass them through soundconverter -> receive flacs with only some basic tags remaining
3. Compare random files in audacity (invert one wav and mix together to get silence) to make sure conversion went well
4. Run Picard on them -> be happy to get all metadata back
5. Copy to Kodi -> done? nope, get every new track skipped

Seems like a some tag compatibility issue, so then:
1. Take official tools (flac package)
2. Since it's now hard to distinguish converted files, get excited to treat whole library
3. Retrieve tags into txt, sort them nicely A-Z, strip all tags from flac and re-apply from txt back into files:
xml:
for i in STORAGE/music/*/*.flac; do $(metaflac --export-tags-to tag "$i"); sort tag > tag_sorted; $(metaflac --preserve-modtime --remove-all-tags --import-tags-from tag_sorted "$i"); done
4. Reencode library with latest encoder just to make sure:
xml:
for i in STORAGE/music/*/*.flac; do $(flac "$i" -V --force --preserve-modtime -5); done
5. Check if tracks are error-free:
xml:
find . -type f -iname '*.flac' -print0 | xargs --null flac -wst
6. Tracks which worked fine still do, new ones still get skipped
7. Give up and search for help
Reply
#2
My path structure is artist/album/file
Tracks play fine through file browser, only filename is displayed
Reply
#3
Hi, sorry you are having issues.  Can you

a) Grab a debug log (wiki) of you scanning the flac files that don't work.
b) Maybe share one of the offending files somewhere so that someone can check the tags (or apply the tags to a silent track in case of copyright issues).

Cheers.
Learning Linux the hard way !!
Reply
#4
(2020-06-02, 18:48)black_eagle Wrote: Hi, sorry you are having issues.  Can you

a) Grab a debug log (wiki) of you scanning the flac files that don't work.
b) Maybe share one of the offending files somewhere so that someone can check the tags (or apply the tags to a silent track in case of copyright issues).

Cheers.


Thanks for answer!

Debug log:
https://paste.kodi.tv/eberomefan.kodi

To summarize: ScanTags - No tag found for: ...

Well I'm not sure if messing with an artificial track can reproduce the problem, so I brought the real case:
No tag found in this file
File scanned successfully
Reply
#5
Ahg! That is a horrible pop-up loaded download site you used Sad

Anyway, the Taglib library https://taglib.org/ that Kodi uses to read embedded metadata from music files is having problems with that file. This is odd because Mp3Tag can see the tag data no problem, and you said to added the tags using Picard. We can try to raise this with the Taglib guys, but I'm not sure how quickly they will respond.

I have to suspect that the more unusual way you created the FLAC files (from lossless wma using a soundconverter) has to be contributing. Also perhaps someone else here can dig deeper in to music file and spot the issue.
Reply
#6
(2020-06-03, 08:43)DaveBlake Wrote: Ahg! That is a horrible pop-up loaded download site you used Sad

Anyway, the Taglib library https://taglib.org/ that Kodi uses to read embedded metadata from music files is having problems with that file. This is odd because Mp3Tag can see the tag data no problem, and you said to added the tags using Picard. We can try to raise this with the Taglib guys, but I'm not sure how quickly they will respond.

I have to suspect that the more unusual way you created the FLAC files (from lossless wma using a soundconverter) has to be contributing. Also perhaps someone else here can dig deeper in to music file and spot the issue.

Well I'm using every possible adblock feature and for me it looked OK.

Thanks a lot for the check. I found a way around. I have added one more step to the loop with metaflac --remove-all instruction: Remove all metadata blocks (except the STREAMINFO block) from the metadata. Unless --dont-use-padding is specified, the blocks will be replaced with padding.
I'm not sure how it affects file's metadata but for me it does the trick.
It reads now:
xml:
for i in STORAGE/music/*/*/*.flac; do $(metaflac --export-tags-to tag "$i"); sort tag > tag_sorted; $(metaflac --preserve-modtime --remove-all "$i"); $(metaflac --preserve-modtime --remove-all-tags --import-tags-from tag_sorted "$i"); done
If someone finds this command useful, please note the correct depth to search for the files in path
Reply
#7
For someone who is after the most complicated way to do a conversion this could be useful Big Grin
Reply
#8
(2020-06-04, 20:02)HeresJohnny Wrote: For someone who is after the most complicated way to do a conversion this could be useful Big Grin

I am sure there is plenty of proprietary windows software which handle wma but for linux I am aware of only soundconverter and avconv without gui...
Reply
#9
(2020-06-04, 20:56)yuga1 Wrote:
(2020-06-04, 20:02)HeresJohnny Wrote: For someone who is after the most complicated way to do a conversion this could be useful Big Grin

I am sure there is plenty of proprietary windows software which handle wma but for linux I am aware of only soundconverter and avconv without gui...

I was only teasing and my knowledge of Linux is close to zero. How about ffmpeg? Since you know your way around a command line, that tool should be able to handle virtually everything. Alternatively, you might be able to run something like foobar2000 in wineHQ?
Have you seen this? https://github.com/dfaust/soundkonverter
Reply
#10
(2020-06-04, 22:58)HeresJohnny Wrote:
(2020-06-04, 20:56)yuga1 Wrote:
(2020-06-04, 20:02)HeresJohnny Wrote: For someone who is after the most complicated way to do a conversion this could be useful Big Grin

I am sure there is plenty of proprietary windows software which handle wma but for linux I am aware of only soundconverter and avconv without gui...

I was only teasing and my knowledge of Linux is close to zero. How about ffmpeg? Since you know your way around a command line, that tool should be able to handle virtually everything. Alternatively, you might be able to run something like foobar2000 in wineHQ?
Have you seen this? https://github.com/dfaust/soundkonverter

Yes foobar would be better for sure. Thanks for suggestions I didn't know. For now I'm done Smile
Reply
#11
I guess ffmpeg and avconv have the same roots but at some point various Linux devs preferred avconv.  ISTM ffmpeg is the better supported project.  At any rate you might try ffmpeg or avconv and see if it does a better job with the metadata.

scott s.
.
maintainer of skin  Aeon MQ5 mods for post-Gotham Kodi releases:
Matrix see: Aeon MQ5 Mod Matrix release thread
Nexus see: Aeon MQ5 Mod Nexus release thread
Aeon MQ 5 skin and addon repo 11.1.0
Reply

Logout Mark Read Team Forum Stats Members Help
Need help to find a bug in my library!0