INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: FLAC file became bigger when copied  (Read 557 times)

Von

  • Regular Member
  • World Citizen
  • ***
  • Posts: 172
  • nothing more to say...
FLAC file became bigger when copied
« on: May 10, 2024, 06:47:01 pm »

This question is not directly related to Media Center, but I hope you don't mind if I ask here anyway.

I experienced something strange when copying several terabytes of FLAC files from a NAS to another drive. I had to pause the operation once and resume it later. I made a note of which file was currently being copied when I hit pause, so that I could make sure that the file had also been copied in the end.

After the process had resumed and finished, the paused file was indeed copied – but I discovered that the copy and the original were not the same size.

Original size: 17 151 686
Copy size: 17 825 792

Both files can be played in Media Center without any problems, and when I convert them to .wav files, the wav files are identical in a file comparison.

Nothing seems to have happened with any other files, it was just the one in process of being copied when I paused the operation.

I have not seen such differences when copying files before, at least not without the copy being corrupt. Does anyone have an idea what may have happened?
Logged

Frobozz

  • Citizen of the Universe
  • *****
  • Posts: 634
  • There is a small mailbox here.
Re: FLAC file became bigger when copied
« Reply #1 on: May 10, 2024, 10:25:00 pm »

If you import both versions of the file into MC and do a new audio analysis on both files you can check if the Audio CRC value is the same for both files. If the Audio CRC is the same then the audio data hasn't been altered or corrupted.

The other way the file size could change would be that the tags got altered or modified.

One possibility there is that the file somehow got opened in Microsoft's Windows Media Player Legacy and that program updated the tags. The default settings for Microsoft's Windows Player Legacy is to "Update music files by retrieving media information from the Internet". And that can change the tags. Whenever I set up a new computer I make sure that Windows Media Player Legacy is configured so it does not update music files with data from the Internet.

Or you could have a third-party Windows Shell extension for File Explorer installed that updated the tags in that file.
Logged

Von

  • Regular Member
  • World Citizen
  • ***
  • Posts: 172
  • nothing more to say...
Re: FLAC file became bigger when copied
« Reply #2 on: May 11, 2024, 09:52:54 am »

Thanks for your input, Frobozz.

The Audio CRC is identical. I think it would have to be, given that the wav files are identical after converting from FLAC to wav. I checked with the FC command in Command Prompt.

I do not think Windows Media Player Legacy has been involved here. At least, there is no change in the metadata for the file, the date/time for "last edited" is identical for both the original and the copy.

Here is an intereseting bit: All data in Analyze Audio is identical, with the exception of Bitrate. This is slightly higher for the bigger file (the copy). At first I thought this was because bitrate was calculated by file size divided by duration. However, after testing, I see this is not correct. Changing the embedded cover art to a bigger file makes the FLAC file bigger, but it does not change the bitrate in Analyze Audio.

Could extra padding somehow have been added?
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7402
  • The color of Spring...
Re: FLAC file became bigger when copied
« Reply #3 on: May 11, 2024, 10:05:24 am »

Check the CRC32 and/or MD5 and/or SHA-256 and/or SHA-512 hashes of both files and see if they're the same. You can use apps like HashTab (this is what I personally use) in Windows or even from the command line/PowerShell get the hash of a file.

If the hashes match but both report different file sizes, this could be due to the file system used on the NAS and the file system used on the other drive being different from each other. If the files were just copied and pasted from the NAS to the other drive, it makes no sense bitrate would change. If they're converted/re-encoded, then it could explain it.
Logged
I don't work for JRiver... I help keep the forums safe from Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2024 Update (24H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2023 Update (23H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/256GB NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | iFi ZEN DAC 3 | Edifier R2000DB Bookshelf Speakers | Audio-Technica ATH-M50x Headphones

michael123

  • Galactic Citizen
  • ****
  • Posts: 485
Re: FLAC file became bigger when copied
« Reply #4 on: May 11, 2024, 11:15:29 am »

Might be related if the block size on file system partitions differ
Logged

Von

  • Regular Member
  • World Citizen
  • ***
  • Posts: 172
  • nothing more to say...
Re: FLAC file became bigger when copied
« Reply #5 on: May 11, 2024, 01:45:55 pm »

Check the CRC32 and/or MD5 and/or SHA-256 and/or SHA-512 hashes of both files and see if they're the same.

I have checked MD5, SHA-256 and SHA-512, and the files have different checksums. (I am comparing the "corrupt" copy and a second correct copy, both files now on my Windows 10 computer.)

Might be related if the block size on file system partitions differ

I don't know. The partition formats may be different, but how should this affect one file out of tens of thousands? I copied the files from a Synology NAS to an NTFS drive on my Windows 10 computer. As far as I can tell, this only happened with one file.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71470
  • Where did I put my teeth?
Re: FLAC file became bigger when copied
« Reply #6 on: May 11, 2024, 02:36:01 pm »

Might be related if the block size on file system partitions differ
That was my first thought, too.

674,000 bytes seems too much though.
Logged

markf2748

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 693
Re: FLAC file became bigger when copied
« Reply #7 on: May 12, 2024, 11:55:42 am »

Other thoughts:

Do you have two copies of the same album/track on the source NAS which were ripped with different FLAC compression ratios, or contain different embedded images?

Maybe you are comparing a Granny Smith apple to a Red Delicious apple?

I don't know of any way to directly determine the compression ratio of an existing FLAC.  If you really want to pursue it, you could re-rip the album using different compression ratios and see which rip(s) match or come close to your old file sizes (if tags are not identical, the file sizes may be a little different).

WAV files may have less header info than FLAC files.  If there are header differences or music section compression differences in your FLACs, they might still get converted to identical WAV files, as you report, especially since FLAC audio compression/decompression is lossless.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71470
  • Where did I put my teeth?
Re: FLAC file became bigger when copied
« Reply #8 on: May 12, 2024, 03:12:36 pm »

The difference in size is more like a lower resolution image file.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71470
  • Where did I put my teeth?
Re: FLAC file became bigger when copied
« Reply #9 on: May 14, 2024, 11:32:44 am »

Logged
Pages: [1]   Go Up