IPB

Welcome Guest ( Log In | Register )

> foobar2000 Tech Support Forum Rules

Please read foobar2000 Tech Support Forum Rules before posting and comply with all the points.
Failure to provide all the information pointed out in the above document in your post is considered wasting other people's time and in extreme cases will lead to your topic getting locked without a reply.


See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
MP3 not bit-identical with MP3 in MKV/A
Soulvomit
post Apr 13 2012, 04:15
Post #1





Group: Members
Posts: 13
Joined: 23-February 12
Member No.: 97346



The number of samples of MP3 files are a few thousand shorter than in MKV/A. The audio starts a few milliseconds early and/or gets cut at the end. I'm using version 1.1.11.


--------------------
[i][/i]
Go to the top of the page
+Quote Post
Kohlrabi
post Apr 13 2012, 08:07
Post #2





Group: Super Moderator
Posts: 1004
Joined: 12-March 05
From: Kiel, Germany
Member No.: 20561



I see the same behaviour regarding MP3 in MKV/MKA files, foobar2000 reports 2844 more samples for an MKA muxed from VBR MP3, 2340 for a CBR MP3. Maybe thse numbers are somewhat random and it always ends up at about 2400 samples. Extracting the MP3 stream using MKVExtractGUI-2 gives me a MP3 file which again is bit-identical (and has the same no. of samples) to the original source.

This post has been edited by Kohlrabi: Apr 13 2012, 08:09


--------------------
Audiophiles live in constant fear of jitter.
Go to the top of the page
+Quote Post
Soulvomit
post Apr 13 2012, 22:56
Post #3





Group: Members
Posts: 13
Joined: 23-February 12
Member No.: 97346



I notice when opening an MP3 MKV with Audacity, it has the same number of samples as it does with fb2k. GraphEdit also gives the same number of samples when opening the MP3 directly with the graph looking like File.mp3>MPEG-1 Stream Splitter>MP3 Decoder DMO>WAV Dest VEM>File Write. However, if you open the MP3 directly with Audacity, the sample count is shorter. The number doesn't even match fb2k when opening the MP3 directly. Winamp has the same problem.

This post has been edited by Soulvomit: Apr 13 2012, 22:57


--------------------
[i][/i]
Go to the top of the page
+Quote Post
kode54
post Apr 13 2012, 23:47
Post #4





Group: Admin
Posts: 4580
Joined: 15-December 02
Member No.: 4082



Is the difference of samples in the plain MP3 file between Audacity and foobar2000 exactly 529? Or is it some other odd number? Maybe they're adding the decoder delay to the encoder delay and padding, which is incorrect. The decoder delay is included in the padding.

The extra length in the MKA sounds like it's not only missing the gapless encoding information, but that it's decoding the gapless info header as sample data. This may be the fault of the Mastroska multiplexing tool.

For reference, encode your own track directly with lame.exe and compare Audacity's reported length to the original file. foobar2000 should be correct in this regard.
Go to the top of the page
+Quote Post
Soulvomit
post Apr 17 2012, 01:48
Post #5





Group: Members
Posts: 13
Joined: 23-February 12
Member No.: 97346



No, I have compared other files and it isn't a fixed number.

I tried a file of my own and foobar2000 decodes the LAME MP3 identical to the source—same sample count and alignable waveforms. However, not in the Matroska container; the padding at both ends is introduced. I also tried the latest iTunes MP3 encoder and fb2k missed the last 85 of the 12,568,500 samples (4:45) directly.

So, basically, MP3 within Matroska is inaccurate. Output also varies depending on what encoder and decoder is used. I've noticed this with AAC as well.

This post has been edited by Soulvomit: Apr 17 2012, 01:50


--------------------
[i][/i]
Go to the top of the page
+Quote Post
kode54
post Apr 17 2012, 06:13
Post #6





Group: Admin
Posts: 4580
Joined: 15-December 02
Member No.: 4082



This is apparently because the multiplexing tool is not aware of gapless information when it produces the Matroska file. It just inserts the MP3 or AAC bitstream as-is.
Go to the top of the page
+Quote Post
Kohlrabi
post Apr 17 2012, 12:58
Post #7





Group: Super Moderator
Posts: 1004
Joined: 12-March 05
From: Kiel, Germany
Member No.: 20561



I have since reported this on the mkvtoolnix bug tracker. Please feel free to add additional information or correct me.

This post has been edited by Kohlrabi: Apr 17 2012, 13:21


--------------------
Audiophiles live in constant fear of jitter.
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: 31st July 2014 - 02:01