Kodi Community Forum
Need help to find a bug in my library! - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Music Support (https://forum.kodi.tv/forumdisplay.php?fid=263)
--- Thread: Need help to find a bug in my library! (/showthread.php?tid=354936)



Need help to find a bug in my library! - yuga1 - 2020-06-02

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:
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:
for i in STORAGE/music/*/*.flac; do $(flac "$i" -V --force --preserve-modtime -5); done
5. Check if tracks are error-free:
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


RE: Need help to find a bug in my library! - yuga1 - 2020-06-02

My path structure is artist/album/file
Tracks play fine through file browser, only filename is displayed


RE: Need help to find a bug in my library! - black_eagle - 2020-06-02

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.


RE: Need help to find a bug in my library! - yuga1 - 2020-06-02

(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


RE: Need help to find a bug in my library! - DaveBlake - 2020-06-03

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.


RE: Need help to find a bug in my library! - yuga1 - 2020-06-04

(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:
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


RE: Need help to find a bug in my library! - HeresJohnny - 2020-06-04

For someone who is after the most complicated way to do a conversion this could be useful Big Grin


RE: Need help to find a bug in my library! - yuga1 - 2020-06-04

(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...


RE: Need help to find a bug in my library! - HeresJohnny - 2020-06-04

(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


RE: Need help to find a bug in my library! - yuga1 - 2020-06-05

(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


RE: Need help to find a bug in my library! - scott967 - 2020-06-05

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.
.


This forum uses Lukasz Tkacz MyBB addons.