# Importing totaltracks and totaldiscs from flac files

**URL:** <https://discourse.beets.io/t/importing-totaltracks-and-totaldiscs-from-flac-files/2190>\
**Category:** Help\
**Created:** [November 12, 2022, 9:23pm UTC](https://discourse.beets.io/t/importing-totaltracks-and-totaldiscs-from-flac-files/2190 "2022-11-12T21:23:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoeJoeTV](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/joejoetv/32/691_2.png) [@JoeJoeTV](https://discourse.beets.io/u/JoeJoeTV)\
**Post date:** [November 12, 2022, 9:23pm UTC](https://discourse.beets.io/t/importing-totaltracks-and-totaldiscs-from-flac-files/2190/1 "2022-11-12T21:23:24Z")

</div>

Hello,

I am currently trying out beets for my music library.  
I want to import already tagged music and am currently trying to figure out, how I can correctly import totaltracks and totaldiscs from flac and mp3 files.

For mp3 files it’s simple: The $track tag should have the format / AFAIK and beets does that fine.

But now I have FLAC files with the same format as the mp3 $track tag, so I don’t have additional tags for tracktotal and disctotal.  
I have some files in this schema, becasue then I can easily convert the flac files to mp3 using ffmpeg and still have the tracktotal and disctotal in the correct spot for mp3(which is not an extra tag AFAIK).  
Another point as to why I use this schema currently is so I can edit it consistently in the tag editor I’m using.

Is there a way to change this so beets can import it correctly?  
Am I seeing something wrong?  
If not, is there a way to have the track/disc and tracktotal/disctotal in seperate tags and move them to the correct place for mp3 using ffmpeg?

P.S. I am aware that beets can transcode, but I haven’t looked it up fully and thus I don’t know if beets also supports converting the cover art ans scaling it down.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![RollingStar](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/rollingstar/32/728_2.png) [@RollingStar](https://discourse.beets.io/u/RollingStar)\
**Post date:** [November 13, 2022, 9:43pm UTC](https://discourse.beets.io/t/importing-totaltracks-and-totaldiscs-from-flac-files/2190/2 "2022-11-13T21:43:15Z")

</div>

If beets doesn’t give the tag you want, you might have to start with metaflac (beets doesn’t grab every tag, because its upstream dependency **mutagen** doesn’t either)

> [@Basic script to dedupe identical FLACs](https://discourse.beets.io/t/basic-script-to-dedupe-identical-flacs/2001):
>
> Not exactly beets, although it would be cool to have this functionality in beets in the import / dupe detecting step. I have files in beets and files elsewhere. With [freezetag](https://github.com/x1ppy/freezetag) I can have two symlinks that only take up one file on my HDD. So I needed a hash based (not fingerprint based, not approximate) matcher. I surprisingly couldn’t find one that operated on FLAC’s native MD5 hashes, built right into the tags. I also learned about 1% of my files have a fake hash: 000000000000000000000000000…

---

<div class="post-metadata">

**Author:** ![JoeJoeTV](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/joejoetv/32/691_2.png) [@JoeJoeTV](https://discourse.beets.io/u/JoeJoeTV)\
**Post date:** [November 14, 2022, 12:32am UTC](https://discourse.beets.io/t/importing-totaltracks-and-totaldiscs-from-flac-files/2190/3 "2022-11-14T00:32:01Z")

</div>

First of all, thanks for the reply!

I tested this with metaflac and I know that beets reads the TRACK tag, but since the tag is in the format “/”, it only reads both of there correctly for mp3 files and not for flac files.  
I have noticed, that the tracktotal and disctotal are normally seperate tags in FLAC Vorbis Comments, but this would make managing my music files way easier, but maybe it would be better to change how my tagger saves those tags, if that’s possible.

I’ll try looking into it in the next days, but if anyone has any more suggestions, I’d appreciate that.
