Log in

View Full Version : [MKV] Muxing MP3 track that "contains 3528 bytes of non-MP3 data"


Sakura-chan
4th August 2011, 05:00
Hi!

I have almost 60 AVIs (DivX and MP3) which I mux into MKVs adding 2 subtitle tracks. All of them go fine, except one, on which mkvmerge gives me this warning a bit before reaching half the process:

Warning: 'C:\...\filename.avi' track 1: This MPEG audio track contains 3528 bytes of non-MP3 data which were skipped. The audio/video synchronization may have been lost.

And as it says, the MKV lost audio/video sync. It starts good, but at some point near the middle, audio desyncs and plays before the video.

Maybe the AVI is corrupt? I store hashes for the files and they are good. Maybe it was always bad since the DVD rip? No idea. I yet have to watch the whole AVI to see if there's something wrong.

3528 bytes are 27.56 kbits, given the MP3 is 56 kbps, there should be half a second of non-valid data. That's consistent with the desync while playing.

So the whole question is, what happened with the MP3 track? In the AVI the audio/video play perfectly. Why mkvmerge gives problems? And more important, is there any way to tell mkvmerge to turn the non-valid data into silence instead of taking it out? Not crop the MP3 track, put half a second of silence so it keeps the original length and it doesn't get desynced.

Here's the file info of the AVI if it's of any help:


General
Complete name : C:\...\filename.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 305 MiB
Duration : 50mn 27s
Overall bit rate : 844 Kbps
Video #0
ID : 0
Format : MPEG-4 Visual
Format settings, BVOP : 1
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Muxing mode : Packed bitstream
Codec ID : DX50
Codec ID/Hint : DivX 5
Duration : 50mn 27s
Bit rate : 781 Kbps
Width : 720 pixels
Height : 528 pixels
Display aspect ratio : 4:3
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.082
Stream size : 282 MiB (93%)
Writing library : DivX 5.1.1 (Maupiti) (UTC 2003-11-19)
Audio #1
ID : 1
Format : MPEG Audio
Format version : Version 2
Format profile : Layer 3
Mode : Joint stereo
Mode extension : Intensity Stereo + MS Stereo
Codec ID : 55
Codec ID/Hint : MP3
Duration : 50mn 27s
Bit rate mode : Constant
Bit rate : 56.0 Kbps
Channel(s) : 2 channels
Sampling rate : 24.0 KHz
Compression mode : Lossy
Stream size : 20.2 MiB (7%)
Alignment : Split accross interleaves
Interleave, duration : 100 ms (2.50 video frames)



Thanks :)

hello_hello
4th August 2011, 17:20
So the whole question is, what happened with the MP3 track?

Was it ever edited after it was encoded? Cutting and splicing AVIs can have VirtualDubMod adding non audio data to the audio stream (well it does with AC3 anyway) but half a second sounds like something else.

In the AVI the audio/video play perfectly. Why mkvmerge gives problems? And more important, is there any way to tell mkvmerge to turn the non-valid data into silence instead of taking it out? Not crop the MP3 track, put half a second of silence so it keeps the original length and it doesn't get desynced.

If there's non-audio data at the start of the audio stream MKVMerge will skip it and insert an appropriate delay for the audio track. Unfortunately it doesn't do the same when removing crud from other places in the stream. It skips the crud and you potentially end up with audio sync issues.

If it were me.... I'd look at where in the video the problem occurs. I'm pretty sure the MeGUI log file will tell you exactly. If it's (for example) 25 min and 45 seconds in, use MKVMergeGUI's split function to split the MKV into two sections when you remux the AVI. Then open the second MKV (second half of the video) with MKVMerge, add the appropriate amount of delay to the audio track, then resave the second MKV as a new file. Finally, open the first MKV with MKVMerge and append the second part to it (the version with the correct audio delay). Hopefully after that you'll be back in sync.

If you have MP3DirectCut installed you could try demuxing the MP3 audio from the AVI completely, then opening the MP3 with MP3DirectCut and resaving the MP3 as a new file. I'm not 100% sure what MP3DirectCut will do when it hits the non audio data... whether it'll just delete it like MKVMerge of if it'll substitute silence..... but it's worth a shot.[/QUOTE]

sneaker_ger
4th August 2011, 17:29
You could also try to append using AVI Mux GUI first, unlike mkvmerge it does insert silence (though I'm not sure if it does when appending, I guess it's worth a try).

hello_hello
4th August 2011, 20:56
Does it insert silence or leave a gap? I guess either way should work, and if it does insert silence then there'd be no need to make a split MKV and append them to each other to fix the audio. I'll have to try AVIMux GUI myslef next time I have a similar problem. I didn't know it'd do that.

Guest
4th August 2011, 23:21
Maybe it was always bad since the DVD rip? No idea. Try re-ripping it from the original disc.