# FLAC Song Length Rounding Up One Second

**URL:** https://community.mp3tag.de/t/flac-song-length-rounding-up-one-second/60283
**Category:** Support
**Created:** [March 5, 2023, 4:40pm UTC](https://community.mp3tag.de/t/flac-song-length-rounding-up-one-second/60283 "2023-03-05T16:40:37Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Saltshaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/22d042/32.png) [@Saltshaker](https://community.mp3tag.de/u/Saltshaker)
#### Post date: [March 5, 2023, 4:40pm UTC](https://community.mp3tag.de/t/flac-song-length-rounding-up-one-second/60283/1 "2023-03-05T16:40:37Z")

</div>

Here there folks,  
Is there a way to prevent MP3Tag from rounding up the song length to the next second? Not sure if this is some kind of padding issue or not. But I just noticed this while generating total play times on my files and it is throwing off my totals completely.  
However this does not happen with all of my FLAC files, just some of them and the original wav files have the correct times.  
When loading/playing the "incorrect" FLACs they do have the correct time displayed. Its just in MP3tag that is doing it. Windows shows the files with the correct times so I assume this is the app doing it based on the bit length. Im running the latest versions of everything and I know this may have been possibly discussed before but hopefully someone can either shed some light to this and how to correct it? Thanks in advance  
 ![Capture](https://community.mp3tag.de/uploads/default/original/2X/6/6d41641e6b009e276deb27da8c7cd9e7034ed146.jpeg)  
 ![Capture5](https://community.mp3tag.de/uploads/default/original/2X/9/9b9627a20f77e2b525b663151e27d10383de3949.jpeg)

 ![Capture4](https://community.mp3tag.de/uploads/default/original/2X/6/655a8d6ba547bd869cd1ec61064fd7bafab77fe2.jpeg)

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [March 5, 2023, 6:12pm UTC](https://community.mp3tag.de/t/flac-song-length-rounding-up-one-second/60283/2 "2023-03-05T18:12:03Z")

</div>

See this thread on rounding length:

> [@SUGGESTION: Count the lengths of files with accordance to reality](https://community.mp3tag.de/t/suggestion-count-the-lengths-of-files-with-accordance-to-reality/45915):
>
> I made a simple experiment concerning the way Mp3tag adds lengths of files I created a WAV file that was 44 Hz stereo 16-bit. And I made difference version of it on account of its lenght. And then multiplied it and loaded to Mp3tag. The results were A] 1.000 seconds long file x 60 = 60 seconds in Mp3tag B] 1.001 seconds long file x 60 = 60 seconds in Mp3tag C] 1.499 seconds long file x 60 = 120 seconds in Mp3tag D] 1.501 seconds long file x 60 = 120 seconds in Mp3tag This might seem un…

It looks as though different programs handle different formats differently.  
Es.p this finding:

> [@SUGGESTION: Count the lengths of files with accordance to reality](https://community.mp3tag.de/t/suggestion-count-the-lengths-of-files-with-accordance-to-reality/45915/8):
>
> For the nearly 3-second files, FLAC and mp3 (cbr & vbr) formats were rounded off upwards but the wav files were rounded off downwards in Mp3tag. In Foobar though, all file formats were rounded off upwards.

---

<div class="post-metadata">

### Author: ![Saltshaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/22d042/32.png) [@Saltshaker](https://community.mp3tag.de/u/Saltshaker)
#### Post date: [March 6, 2023, 12:28am UTC](https://community.mp3tag.de/t/flac-song-length-rounding-up-one-second/60283/3 "2023-03-06T00:28:31Z")

</div>

Thanks for the reply. Based on your prior post, it appears that the problem is recognized but there is no solution to it in the app?  
Is there a way for a new column to be created with the millisecond of the track length rounded down through a formula or calculation?

Either way, it wouldnt be the end of the world for me since what I only really care about is how it is exported. I export all the track names and times into a text so that it can be pasted into an info file. I use this custom export...is there a way to adjust this so it calculates correctly? Thanks.

$filename(Tracklist.txt,utf-8)  
'Total Time - '%\_total\_time2%

$loop(%track%)$num(%track%,2)) %title% - $div(%\_length\_seconds%,60):$num($mod(%\_length\_seconds%,60),2)  
$loopend()

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [March 6, 2023, 7:01am UTC](https://community.mp3tag.de/t/flac-song-length-rounding-up-one-second/60283/4 "2023-03-06T07:01:26Z")

</div>

> [@Saltshaker](#):
>
> $div(%\_length\_seconds%,60):$num($mod(%\_length\_seconds%,60),2)

This could be shortened to %\_length%.

As there is no way in MP3tag to get the split seconds in a track, you would have to take what the built-in functions offer you.

---

<div class="post-metadata">

### Author: ![Saltshaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/22d042/32.png) [@Saltshaker](https://community.mp3tag.de/u/Saltshaker)
#### Post date: [March 7, 2023, 1:30am UTC](https://community.mp3tag.de/t/flac-song-length-rounding-up-one-second/60283/5 "2023-03-07T01:30:00Z")

</div>

Thanks for the reply but I need seconds in my info files so Im hoping I can figure something out.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [March 7, 2023, 6:28am UTC](https://community.mp3tag.de/t/flac-song-length-rounding-up-one-second/60283/6 "2023-03-07T06:28:54Z")

</div>

> [@Saltshaker](#):
>
> but I need seconds in my info files

I am not sure about the "but" as this is the output with both methods for a file that has the length of 11 minutes and 18 seconds:  
 ![grafik](https://community.mp3tag.de/uploads/default/original/2X/4/4bd8ae44d249b3ea3418a62c693936f315dbc714.png)

So I would still say that the longer expression could shortened ...

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [March 7, 2023, 7:19am UTC](https://community.mp3tag.de/t/flac-song-length-rounding-up-one-second/60283/7 "2023-03-07T07:19:30Z")

</div>

> [@Saltshaker](#):
>
> so I assume this is the app doing it based on the bit length

I think that usually programs display the data from the header.  
And as the WAV files had to be converted somehow, it could well be that the converter wrote something correspondingly into the header.  
You could install Foobar and check how many samples you find in each file - and to how many seconds and milliseconds that sums up.  
If both file types show the same information in the header, then perhaps something should be done ...

---

<div class="post-metadata">

### Author: ![Saltshaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/22d042/32.png) [@Saltshaker](https://community.mp3tag.de/u/Saltshaker)
#### Post date: [March 8, 2023, 5:46am UTC](https://community.mp3tag.de/t/flac-song-length-rounding-up-one-second/60283/8 "2023-03-08T05:46:07Z")

</div>

So yeah I actually do have Foobar installed and did a quick comparison. I take two files and they match just as others do. Same samples and time with milliseconds. The WAV and FLAC file have 21.973 but is seen as 22 seconds only in FLAC files.  
Foobar rounds up and sees both files as 22 seconds,  
But MP3tag sees WAVs correctly at 21 seconds and rounds up after 500 milliseconds for FLAC files only.  
Windows and Winamp see the FLAC files at 21 seconds but there is a difference with the two in MP3tag which throws my numbers off when calculating totals for info files. I need it to be true and not round up to the nearest second after 500+ milliseconds for any file.

 ![Capture](https://community.mp3tag.de/uploads/default/original/2X/e/eb790aff86bb1ff2d2030f01d3c726704710114e.jpeg)

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [March 8, 2023, 6:38am UTC](https://community.mp3tag.de/t/flac-song-length-rounding-up-one-second/60283/9 "2023-03-08T06:38:44Z")

</div>

AFAI can see the length is 21.973 secods.  
So MP3tag tells you the are 0.027 seconds more to listen to than there actually are.  
And WIndows and Winamp tell you that the track will end 0.973 seconds earlier that it actually does.  
Comparing 0.027 and 0.973, I would say that Winamp and Windows are more than 36 times more inaccurate than MP3tag is.  
And unarguably, none of these programs shows the exact length.

Anyway: it stays as it is: you will get only the seconds but not the splitseonds with the export function.

It would be interesting to see whether the totals are really off so much. I would assume that there are just as many files where the length got rounded up as there are with rounded down lengths. So on average the display would be right.  
Good luck with the search for a program that meets your requirements.

---

<div class="post-metadata">

### Author: ![Saltshaker](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/22d042/32.png) [@Saltshaker](https://community.mp3tag.de/u/Saltshaker)
#### Post date: [March 8, 2023, 2:18pm UTC](https://community.mp3tag.de/t/flac-song-length-rounding-up-one-second/60283/10 "2023-03-08T14:18:13Z")

</div>

Thanks for your reply and feedback, I really do appreciate it. At the end of the day, this probably is not a big deal to many folks here and to be honest it is not a deal breaker for me from using the program. I have tried a few others but so far this is the best one out of the bunch. Its probably the easiest to use.  
My totals for various exported setlists may be off by 10 seconds on average so it is what it is. I just found it confusing that MP3tag treats FLAC files differently than WAV files and hoped that maybe there would be a solution or setting that could help with this variance.  
Either way, I will work with it as is. Thanks for your time!

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:30pm UTC](https://community.mp3tag.de/t/flac-song-length-rounding-up-one-second/60283/11 "2026-02-09T12:30:03Z")

</div>


