hey guys.
I'm having a weird problem with mkvextract. there is one specific .ac3 track in my .mkv which I can not extract properly. Let me show you first how the AC3-track looks INSIDE of the .mkv (Track ID 3):
And here how that track looks after extraction with mkvextract:Code:Format : Matroska Format version : Version 1 File size : 748 MiB Duration : 20mn 39s Overall bit rate : 5 065 Kbps Encoded date : UTC 2012-01-15 12:39:53 Writing application : mkclean 0.8.6 ro from libebml v0.7.8 + libmatroska v0.8.1 + mkvmerge v2.3.0 ('Freak U') built on Sep 9 2008 17:43:22 Writing library : libebml2 v0.21.1 + libmatroska2 v0.22.1 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings, CABAC : No Format settings, ReFrames : 2 frames Format settings, GOP : N=1 Muxing mode : Header stripping Codec ID : V_MPEG4/ISO/AVC Duration : 20mn 39s Bit rate : 4 132 Kbps Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16:9 Frame rate : 25.000 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.179 Stream size : 611 MiB (82%) Language : English Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177 Transfer characteristics : BT.709-5, BT.1361 Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177 Audio #1 ID : 2 Format : AC-3 Format/Info : Audio Coding 3 Mode extension : CM (complete main) Muxing mode : Header stripping Codec ID : A_AC3 Duration : 20mn 39s Bit rate mode : Constant Bit rate : 448 Kbps Channel(s) : 6 channels Channel positions : Front: L C R, Side: L R, LFE Sampling rate : 48.0 KHz Bit depth : 16 bits Compression mode : Lossy Stream size : 66.2 MiB (9%) Title : GER 5.1 TVS Language : German Audio #2 ID : 3 Format : AC-3 Format/Info : Audio Coding 3 Mode extension : CM (complete main) Muxing mode : Header stripping Codec ID : A_AC3 Duration : 20mn 39s Bit rate mode : Constant Bit rate : 384 Kbps Channel(s) : 6 channels Channel positions : Front: L C R, Side: L R, LFE Sampling rate : 48.0 KHz Bit depth : 16 bits Compression mode : Lossy Stream size : 56.7 MiB (8%) Title : ENG Language : English
I noticed that inside of the mkv the duration of this track is 20mn 39s but the extracted one suddenly get's a duration of 21mn 31s. I tried a few options with mkvextract, --raw output or --fullraw output, nothing worked. I even tried it on different operation systems with different version of mkvextract but still no luck.Code:Format : AC-3 Format/Info : Audio Coding 3 File size : 59.1 MiB Duration : 21mn 31s Overall bit rate mode : Constant Overall bit rate : 384 Kbps Audio Format : AC-3 Format/Info : Audio Coding 3 Mode extension : CM (complete main) Duration : 21mn 31s Bit rate mode : Constant Bit rate : 384 Kbps Channel(s) : 6 channels Channel positions : Front: L C R, Side: L R, LFE Sampling rate : 48.0 KHz Bit depth : 16 bits Compression mode : Lossy Stream size : 59.1 MiB (100%)
That's the reason I can't mux it up into a .mp4 container. Well I can but then the audio isn't in sync with th video anymore. And the problem is not smal delay it seems like mkvextrect "stretched" the audio, making it impossible for me to correct it with delaying back or forwards.
I hope some of you can help me out because I have lot's of files like this. I don't know what else to try. 1st I thought maybe the "header stripping" was the problem but it wasn't. I removed it with MKVtools and with MKVtoolnix. Tried even to "fix" the mkv with mkclean, nothing changed. I hope you can help me.![]()
+ Reply to Thread
Results 1 to 17 of 17
-
-
first i'd try to get the mkv to work without header stripping. get the latest mkvmergegui, uncheck header stripping. add the mkv, put checks in just the video, audio, etc. you want and have it re-mux just those parts. check to see if it's in sync. if so go ahead and try converting to mp4.
--
"a lot of people are better dead" - prisoner KSC2-303 -
-
thanks for the advice.
I tried mkvtomp4 but the audio is also not in sync with mkvtomp4. I think to problem with those muxers are that they all use mkvextract which causes the problem or changes the audio track.
I used ffmpeg with this command: "ffmpeg -i source.mkv -vcodec copy -acodec copy output.mp4"
but I got this error:
"[mp4 @ 0x7f9ccb011200] pts < dts in stream 0
av_interleaved_write_frame(): Operation not permitted"
What did I do wrong? -
Also what is the actual source? What was this mkv derived from ? Is it a "euro" source 25 fps ?
20min 39 vs. 21min 31 is almost the difference between 25fps and 23.976 fps .... might be some other funky business going on
It it a VFR mkv ? If so you will never get the MP4 in sync without making it VFR
Also note , mediainfo is not necessarily correct, all it does is read header information -
thanks for your help!
seems like eac3to has extracted the ac3 file correctly, all I can tell right now is that the duration of the extracted ac3 file is correct. I'll try to put them into a mp4 container now as soon as possible but my external drive where all the files are just kind of died so I'm working an that now.
about the source I'm not quite sure. It's a little mixed up but the 1st audio track is german (I guess from europe) and the 2nd audio track (which makes problems) is definitly from US source.
video and 1st audio track are perfectly sync no matter what. Guess you're right about that 25 fps and 23,96 fps. Does that help us? -
Well try muxing it in as is first (from the eac3to demux) , if it's in sync, case solved
If not, and still there is a discrepancy in A/V length, you would have to convert either the video or audio to match (either fps of video, or stretch/shrink audio to match with an audio editor e.g. audacity, or eac3to can do it too)
(If it was "euro" source, the "english" audio might be already sped up)
Having more information about the source can often help. E.g. if this was Hollywood theatrical production, then the real original would be film rate, 23.976 (or 24000/1001 exactly) , but the mkv you have might have other processing done to it. But if it was BBC production, it might be 25fps -
eac3to did something with the ac3 file without reencode it, I don't know what exactly it did but it's far better as the extracted one with mkvextract. now it fits better with the video but it isn't 100% in sync. I'll try a few things with audacity now, thank you and please let me know something comes into your mind.
-
yeah sure.
the original mkv was always in sync both of the audio tracks where in sync. maybe there's a funktion inside the mkv container which corrects the ac3 track somehow.
it's not constant delay and at the first few minutes I thought everything was in sync, but it get's worse. Maybe it get's up to 0,7sec-1,0sec I'm not sure Sound come earlier btw. Here's the eac3to log file:
Code:eac3to v3.24 command line: C:\Users\****\Desktop\eac3to\eac3to.exe D:\Downloads\source.mkv -demux ------------------------------------------------------------------------------ MKV, 1 video track, 2 audio tracks, 0:20:40, 25p 1: h264/AVC, 720p (16:9) 2: AC3, German, 5.1 channels, 448kbps, 48kHz 3: AC3, 5.1 channels, 384kbps, 48kHz, dialnorm: -27dB [v01] The video track doesn't contain framerate information. <WARNING> [v01] Extracting video track number 1... [a02] Extracting audio track number 2... [a03] Extracting audio track number 3... [v01] Writing new framerate "25fps" to bitstream. [a03] Removing AC3 dialog normalization... [v01] Creating file "source - 1 - h264, 720p.h264"... [a02] Creating file "source - 2 - AC3, German, 5.1 channels, 448kbps, 48kHz.ac3"... [a03] Creating file "source - 3 - AC3, 5.1 channels, 384kbps, 48kHz.ac3"... [a03] Audio overlaps for 11ms at playtime 0:00:01. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:00:01. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:00:01. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:00:01. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:00:02. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:00:02. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:00:02. <WARNING> [a03] Audio overlaps for 13ms at playtime 0:00:03. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:00:03. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:00:03. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:00:03. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:00:03. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:00:04. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:00:04. <WARNING> [a03] Audio overlaps for 12ms at playtime 0:00:04. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:00:04. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:00:05. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:00:05. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:00:05. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:00:05. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:00:06. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:00:06. <WARNING> [a03] Audio overlaps for 13ms at playtime 0:00:06. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:00:06. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:00:07. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:00:07. <WARNING> [...] [a03] Audio overlaps for 10ms at playtime 0:20:34. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:20:35. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:20:35. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:20:35. <WARNING> [a03] Audio overlaps for 12ms at playtime 0:20:35. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:20:36. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:20:36. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:20:36. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:20:36. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:20:36. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:20:37. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:20:37. <WARNING> [a03] Audio overlaps for 12ms at playtime 0:20:37. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:20:38. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:20:38. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:20:38. <WARNING> [a03] Audio overlaps for 11ms at playtime 0:20:38. <WARNING> [a03] Audio overlaps for 10ms at playtime 0:20:39. <WARNING> [a03] Starting 2nd pass... [a03] Realizing (E-)AC3 gaps... [a03] Creating file "source - 3 - AC3, 5.1 channels, 384kbps, 48kHz.ac3"... Video track 1 contains 30970 frames. eac3to processing took 5 minutes, 54 seconds. Done.
-
It means there were a bunch of audio gaps in track 3 (the english), that it tried to fix
Not sure what else to do, you'll have to play with ti
Or just leave it as is, is there any reason why you want to mux into mp4 ? -
-
hey. I just tested the ac3 file with eac3to and the slowdown speedup options. turns out the speedup options is all i need to do and the audio is perfectly in sync with audio.
you were right ac3 was in 23,76 fps and needed to be 25.00 fps.
thank you so much for your help. just one more question: do you know any other method to do this? I'm working on a mac and I couldn't get eac3to to work with wine. if not, thaks again and have good night! -
Well you can do it in any audio editor, it's just the ratio of 24000/1001 vs. 25.0
But I don't know if eac3to "fixed" something besides the slowdown (like gaps & errors)
or maybe avidemux ? there is a mac version
load the mkv, select the audio track, audio => set ac3 => then under audio filters set PAL to FILM => then audio=>save (enter name with extension )
EDIT: actually it's the other way around for you: FILM=>PAL
Alternatively, you can try muxing 24000/1001 FPS for the video, and keeping the audio as isLast edited by poisondeathray; 15th Jan 2012 at 17:29.
Similar Threads
-
.MKV Audio can only be split into 2 channels once extracted (I want 6)
By 54321blastoff in forum AudioReplies: 3Last Post: 28th Feb 2012, 18:31 -
An app to visually sync audio to video similar to Subtitle Edit visual sync
By cinesimon in forum AudioReplies: 3Last Post: 6th Sep 2011, 07:54 -
Shorter Extracted Audio from MKV
By ynamojn in forum Video ConversionReplies: 0Last Post: 29th Jun 2011, 14:04 -
Incorrect Audio stream extracted from VOB2MPG
By TonedAU in forum SVCD2DVD & VOB2MPGReplies: 0Last Post: 16th Dec 2009, 19:36 -
playback speed from extracted dvd menu audio
By juetenglord in forum AudioReplies: 5Last Post: 22nd Feb 2008, 05:38