Author Topic: Virtual TAG: View metadata padding size, possible?  (Read 608 times)

ariesps

  • Newbie
  • *
  • Posts: 19
Is there any change to create a VirtualTag like this?
In MP3tag i have a custom columm wich calculates Padding within the file. The columm value is shown in KiB: $div(%_tag_size%,1024)

More info here.

https://captainrookie.com/viewing-metadata-padding-size-using-mp3tag/

Thanks in advance!

hiccup

  • Sr. Member
  • ****
  • Posts: 7856
No, I'm pretty sure that is not available in MusicBee.
So that could be a Wishlist item.

I am curious why you are bringing this up though.
Have you found a practical use or benefit for having this?

ariesps

  • Newbie
  • *
  • Posts: 19
Hi hiccup,

Thanks for your reply.

I used to have the cover art embedded in flac files. Since I prefer very high resolution covers, I decided to export them in a separate file, one cover file per album and link them.

By removing covers, size of the flac file is not reduced, so you need to convert the file again, or use metaflac tool, to really free that reserved space inside the flac (padding).

The ultimate goal is to free up the space previously used in each flac file to store the cover art, and be able to identify which files would need to be reconverted again, without having to use MP3Tag. I was thinking in adding that VirtualTag as a column.

Thanks again!
Last Edit: January 17, 2024, 11:48:08 PM by ariesps

hiccup

  • Sr. Member
  • ****
  • Posts: 7856
By removing covers, size of the flac file is not reduced, so you need to convert the file again, or use metaflac tool, to really free that reserved space inside the flac (padding).
That might be an oversight in MusicBee.
After a very quick test:
MusicBee does reduce the file size of mp3's when removing large artwork, but it looks like it doesn't for FLAC files.
I'm guessing that it should.

frankz

  • Sr. Member
  • ****
  • Posts: 3876
So, wait.  We're saying that if I "obtain" some FLAC files that have a cover, and then I remove that cover in mp3tag, the size used by the cover doesn't come out of the size of the file?  It just kind of stays as padding until I do a FLAC to FLAC conversion? 

Oh, my. This seems to verify that.

If this is pans out as true, and it looks like it does, I could really use this kind of virtual tag too.

How did I not know this?

ariesps

  • Newbie
  • *
  • Posts: 19
What I usually do, is first of all, remove/export embedded cover on files and then reconvert from FLAC to FLAC with these settings on MusicBee.



As far as I can understand if you leave 0 padding block, maybe if you change metadata later it could take longer to write changes to file. Usually, the reconversion from FLAC to FLAC is my last step, after tagging the album the way I want.

More info: https://xiph.org/flac/documentation_tools_flac.html

-P #, --padding=#
Tell the encoder to write a PADDING metadata block of the given length (in bytes) after the STREAMINFO block. This is useful if you plan to tag the file later with an APPLICATION block; instead of having to rewrite the entire file later just to insert your block, you can write directly over the PADDING block. Note that the total length of the PADDING block will be 4 bytes longer than the length given because of the 4 metadata block header bytes. You can force no PADDING block at all to be written with --no-padding. The encoder writes a PADDING block of 8192 bytes by default (or 65536 bytes if the input audio stream is more that 20 minutes long).
Last Edit: January 17, 2024, 11:58:27 PM by ariesps

sveakul

  • Sr. Member
  • ****
  • Posts: 2460
One of the few external taggers that will delete FLAC artwork padding by default when the artwork is deleted is Kid3, if its OggFlacMetadata plugin is prioritized in its settings:



The 64-bit portable Kid3 is available in the downloads section of its homepage:  https://kid3.kde.org/#download

In Mp3tag, similar to ariesps' code column that shows the total padding within the file, I use this value that only shows the extra padding that does not include the actual size of the embedded artwork:  $div($sub(%_tag_size%,%_cover_size%),1024)

Note that Mp3tag, unlike Kid3, cannot natively delete FLAC artwork padding when it is used to delete the FLAC artwork.

ariesps

  • Newbie
  • *
  • Posts: 19
One of the few external taggers that will delete FLAC artwork padding by default when the artwork is deleted is Kid3, if its OggFlacMetadata plugin is prioritized in its settings:



The 64-bit portable Kid3 is available in the downloads section of its homepage:  https://kid3.kde.org/#download

In Mp3tag, similar to ariesps' code column that shows the total padding within the file, I use this value that only shows the extra padding that does not include the actual size of the embedded artwork:  $div($sub(%_tag_size%,%_cover_size%),1024)

Note that Mp3tag, unlike Kid3, cannot natively delete FLAC artwork padding when it is used to delete the FLAC artwork.

Wow! Thanks for the info!

MotleyG

  • Full Member
  • ***
  • Posts: 144
So, wait.  We're saying that if I "obtain" some FLAC files that have a cover, and then I remove that cover in mp3tag, the size used by the cover doesn't come out of the size of the file?  It just kind of stays as padding until I do a FLAC to FLAC conversion? 

Oh, my. This seems to verify that.

If this is pans out as true, and it looks like it does, I could really use this kind of virtual tag too.

How did I not know this?
This has been addressed in mp3tag just today. A new utility function was added to remove padding in FLAC files.
https://community.mp3tag.de/t/mp3tag-development-build-status/455

sveakul

  • Sr. Member
  • ****
  • Posts: 2460
This has been addressed in mp3tag just today. A new utility function was added to remove padding in FLAC files.
https://community.mp3tag.de/t/mp3tag-development-build-status/455
Cool, but I can't remember when Kid3 DIDN'T have this ability.  Better late than never though, thanks for the news.

frankz

  • Sr. Member
  • ****
  • Posts: 3876
This has been addressed in mp3tag just today. A new utility function was added to remove padding in FLAC files.
https://community.mp3tag.de/t/mp3tag-development-build-status/455
Thanks for this.  I guess the last time I updated mp3tag was 2020 (v 3.0).  Oops.  Got the new one now.

I look at that kid3 and I feel like those folks who come here complaining that MB has too many features. Never thought to go to its forum and demand that they dumb it down for me, though.  ;D

ariesps

  • Newbie
  • *
  • Posts: 19
So, wait.  We're saying that if I "obtain" some FLAC files that have a cover, and then I remove that cover in mp3tag, the size used by the cover doesn't come out of the size of the file?  It just kind of stays as padding until I do a FLAC to FLAC conversion?  

Oh, my. This seems to verify that.

If this is pans out as true, and it looks like it does, I could really use this kind of virtual tag too.

How did I not know this?
This has been addressed in mp3tag just today. A new utility function was added to remove padding in FLAC files.
https://community.mp3tag.de/t/mp3tag-development-build-status/455

Thanks for the info. Just in time.

Zak

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2459
This has been addressed in mp3tag just today. A new utility function was added to remove padding in FLAC files.
https://community.mp3tag.de/t/mp3tag-development-build-status/455
Thank god. Beats me why this isn't the default when removing FLAC artwork.

If you do want to do this within MusicBee, kid3 includes a command-line interpreter.
Create a Tools command in MusicBee with these parameters:
Name:              Remove FLAC cover (or whatever you prefer)
Application path:  Full path to where you have saved the file kid3-cli.exe
                   (or just
kid3-cli.exe if you have it saved somewhere in your environment PATH setting)
Parameters:        -c "set picture ''" "<URL>"

It will flash up a command prompt window when it runs, but saves having to run a separate app to do the same thing.
Bee excellent to each other...

sveakul

  • Sr. Member
  • ****
  • Posts: 2460
Thanks Zak.  Just a reminder to people to be sure that in the Kid3 GUI you have "OggFlacMetadata" selected and moved to first place in the Plugins list.