IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
FFMpeg/libav and SoX donít output identical WAVs when decoding FLAC/WV, Moved from General Audio (TOS #6)
2012
post Feb 7 2012, 22:58
Post #1





Group: Members
Posts: 68
Joined: 7-February 12
Member No.: 96993



Hello.

I noticed that the result of decoding (lossless) files to WAV is not bit-exact when using ffmpeg/avconv vs. sox.

The difference is very small but It doesn't take place only at the header of the file. xdelta tells me it takes place every 8388608 bytes.

Also, the filesize is different (e.g. 51525310 with avconv and 51525308 with sox).

The result is exactly the same if the source is FLAC or WavPack. So, this is not codec-specific.

Is there an explanation to this? Is one of the tools at fault or the difference is not in audio data?
Go to the top of the page
+Quote Post
db1989
post Feb 7 2012, 23:11
Post #2





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



QUOTE (2012 @ Feb 7 2012, 21:58) *
The difference is very small but It doesn't take place only at the header of the file. xdelta tells me it takes place every 8388608 bytes.

What is the difference?

Are you comparing the actual audio streams or just the entire files (i.e. including frame headers, etc.)?

If the former, do you mean that the decoders produce different streams to one another? What about when they are compared to the original input file? Does either produce an identical stream to that?

QUOTE
Also, the filesize is different (e.g. 51525310 with avconv and 51525308 with sox).

Again: does either produce an identical file-size to the input WAV?

Sorry, but a lot more information is needed here.
Go to the top of the page
+Quote Post
2012
post Feb 7 2012, 23:44
Post #3





Group: Members
Posts: 68
Joined: 7-February 12
Member No.: 96993



QUOTE (db1989 @ Feb 7 2012, 23:11) *
QUOTE (2012 @ Feb 7 2012, 21:58) *
The difference is very small but It doesn't take place only at the header of the file. xdelta tells me it takes place every 8388608 bytes.

What is the difference?

Are you comparing the actual audio streams or just the entire files (i.e. including frame headers, etc.)?


I was comparing the files.

QUOTE
QUOTE
Also, the filesize is different (e.g. 51525310 with avconv and 51525308 with sox).

Again: does either produce an identical file-size to the input WAV?



I don't have a source WAV. The sources available to me right now are FLACS and WavPacks.

QUOTE
If the former, do you mean that the decoders produce different streams to one another? What about when they are compared to the original input file? Does either produce an identical stream to that?


I didn't check this before posting (sorry). The streams are indeed identical.

Running:
CODE
avconv -i $wav_file -f u16le $raw_file

gives bit-exact raw files.

And taking any wav file then compressing with wavpack or flac then decoding back to WAV gives the same file per tool (All WAVs decoded using the same tool are bit-exact regardless of the decoder of the input).

So, I guess both tools are doing their job properly.
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: 2nd September 2014 - 12:55