IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Diff after decode FLAC file
evoj2
post Nov 22 2013, 17:36
Post #1





Group: Members
Posts: 4
Joined: 17-November 13
Member No.: 112261



Hi.

I had a FLAC file which I decoded using the reference decoder. As expected, the WAV file was larger than the FLAC one: it had 51.304.506 bytes. Then, I coded this WAV file and got a FLAC file.

However, while the first one had 31.240.944 bytes, the second one had 29.144.603 bytes. After that, I decoded this final FLAC file and the resultant WAV file had 51.304.220 bytes.

So, where is the lossless compression? Curiously, when I compared these files with 'diff' command, it shows they're equal. How is this possible, if they have different sizes?

Thanks!
Go to the top of the page
+Quote Post
saratoga
post Nov 22 2013, 17:55
Post #2





Group: Members
Posts: 4853
Joined: 2-September 02
Member No.: 3264



Flag files have tags so the file sizes won't be equal.
Go to the top of the page
+Quote Post
pdq
post Nov 22 2013, 19:13
Post #3





Group: Members
Posts: 3372
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



Different encoder settings give different compressed file sizes.
Go to the top of the page
+Quote Post
Kees de Visser
post Nov 22 2013, 19:39
Post #4





Group: Members
Posts: 648
Joined: 22-May 05
From: France
Member No.: 22220



QUOTE (saratoga @ Nov 22 2013, 18:55) *
Flag files have tags so the file sizes won't be equal.
That explains the size difference between the flac files, but what about the wav files difference ? Could you elaborate ?
I've always found it strange that the wav-flac-wav process can result in non-identical wav files. The audio conversion is lossless, that's not the issue. I've found the --keep-foreign-metadata option to be the solution, especially since I mostly use BWF (broadcast wave) files with metadata that shouldn't get lost or modified. Unfortunately the decoder doesn't automatically recognize this option, so it's not completely idiot proof.
evoj2, would you be able to repeat your test with this option ? I'm curious if it solves your "problem".
Go to the top of the page
+Quote Post
skamp
post Nov 22 2013, 19:48
Post #5





Group: Developer
Posts: 1410
Joined: 4-May 04
From: France
Member No.: 13875



Indeed, it seems that --keep-foreign-metadata was used the first time when encoding the first FLAC file. I find that surprising though: the command-line encoder/decoder doesn't use it by default (WavPack does).

This post has been edited by skamp: Nov 22 2013, 19:51


--------------------
See my profile for measurements, tools and recommendations.
Go to the top of the page
+Quote Post
saratoga
post Nov 22 2013, 20:28
Post #6





Group: Members
Posts: 4853
Joined: 2-September 02
Member No.: 3264



QUOTE (Kees de Visser @ Nov 22 2013, 14:39) *
QUOTE (saratoga @ Nov 22 2013, 18:55) *
Flag files have tags so the file sizes won't be equal.
That explains the size difference between the flac files, but what about the wav files difference ? Could you elaborate ?



While tagging WAV files with album/song info is uncommon, they still have headers that contain information about the file (including in some cases actual album info). Theres various ways you can put together a wav file, and they're not necessarily the same size.

Theres some information here if you're interested: http://www-mmsp.ece.mcgill.ca/Documents/Au.../WAVE/WAVE.html

As you can see, even for plain 16 bit, stereo PCM there are various different ways the header can be constructed even without considering metadata.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th July 2014 - 12:23