Log in

View Full Version : Extream problem with mkv extraction


arakis
8th January 2006, 18:20
I have some videos that are in .mkv format. they are divx5.2.1 avi type with core aac soun. My dvd player doesent suport mkv or aac, so I use the mkv extract to extract the video and the sound then convet the sound to mp3 adn virtual dub to mux them back into avi.

The problem ocures when I try to extract the video out of mkv, when I play the video as the mkv file it has 25:36 minutes but when I extract it it sudenly has 26:25 minutes. I tried direct streaming it from virtualdub mod but for some reason there is a loss of quality in the video. I am preaty sure it has something to do with my codec or splitter but can someone clarify why this problem ocures and how to fix it, more importantly why it ocures

multicone
8th January 2006, 22:15
VFR (Variable Framerate) MKVs ?

arakis
9th January 2006, 15:47
maybe virtual dub warns me that it the file migtht be with VFR, but int there a way to convert it anyway

foxyshadis
9th January 2006, 22:23
Nope, not vfr if it loads into virtualdubmod. (That's vbr it's warning you about.) Most likely it's a framerate issue, when you extract it out set it so that audio and video durations match. Video menu->frame rate. Then it should come out correct.

arakis
9th January 2006, 23:01
could u pleas claryfy how to do this, I mean in witch software, thanx

arakis
9th January 2006, 23:07
one interesting fact when I run it in virtualdubmod even as preview input it is at a far less quality then when I run it in VLC could someone explain why this could be

foxyshadis
10th January 2006, 01:39
Er, you only need virtualdubmod. Video menu->frame rate->"Change so audio and video durations match", hit okay, then save as avi.

And of course preview doesn't look as nice, it has no post-processing done on it. That's all handled by the decoder. I'm sure if you play the extracted avi in VLC it will look the same as before.

arakis
10th January 2006, 02:44
Er, you only need virtualdubmod. Video menu->frame rate->"Change so audio and video durations match", hit okay, then save as avi.

And of course preview doesn't look as nice, it has no post-processing done on it. That's all handled by the decoder. I'm sure if you play the extracted avi in VLC it will look the same as before.

I just did this and the video is now the exact leinght, but the proble is that now the sound is totaly out of sync.

here is what I did so far. with mkv extract I always get a avi file that i longer then its sopesed to be.
When I do a direct stream eith VDM directly form mkv to avi without the sound, I get a wright leinght of the avi but the quality is bad,

now when I extracted from mkv with mkv extract and loaded the avi file into vdm and direct streamed it with sound and with the changed frame rate like you explained I got the files out of sync. I dont know what else to do I am stuck

foxyshadis
10th January 2006, 04:03
Oh, I thought you were loading the mkv directly into VDM. If you're doing it from mkvextract there's a very good chance it is vfr. In that case you may very well not be able to get a clean extraction.

Something to try is to get Tritical's AVI timecode package (http://bengal.missouri.edu/~kes25c/avi_tc_package.zip), and Haali's mkv2vfr (http://haali.cs.msu.ru/mkv/mkv2vfr.exe) tool (commandline only). Use the latter to get a timecode file and an avi, and then the tc2cfr to turn it into a (hopefully) totally in-sync avi.

I'd add in timecode creation to mkvextract but I don't have Delphi 2005.

arakis
10th January 2006, 04:12
Oh, I thought you were loading the mkv directly into VDM. If you're doing it from mkvextract there's a very good chance it is vfr. In that case you may very well not be able to get a clean extraction.

Something to try is to get Tritical's AVI timecode package (http://bengal.missouri.edu/~kes25c/avi_tc_package.zip), and Haali's mkv2vfr (http://haali.cs.msu.ru/mkv/mkv2vfr.exe) tool (commandline only). Use the latter to get a timecode file and an avi, and then the tc2cfr to turn it into a (hopefully) totally in-sync avi.

I'd add in timecode creation to mkvextract but I don't have Delphi 2005.


thanks Ill try that now.

eidolen
24th March 2007, 08:17
In the same boat here and just found this thread. Already created timecode file using mkv2fr but I keep getting errors using tc2cfr. I already did the conversion to v2 timecode via tcConv without a hiccup but now i'm stuck.

This error is what I get entering 29.97 for avi output framerate.

Descernable number of framerates: 178 (min = 0.168371}.
v2 timecode file type detected.
Invalid fps detected in v2 timecode file (24.390244)

If I use almost any other number or fraction I get...

"tc2cfr v1.5 has encountered a problem and needs to close. We are sorry for the inconvenience."


The only thing I can think of is some sort of mistake when I input the total number of frames of the avi to do the conversion from v1 to v2. I even tried the timecode file direct out of mkvextract which is already in v2 format which gives this error:

Descernable number of frame rates: 178 (min = 0.168371}.
v2 timecode file type detected.
Invalid fps detected in v2 timecode file (23.809524)


I'm still really new to all this so I might be doing something stupid as I can't even remember why I needed the timecode file from mkv2vfr instead of the timecode file directly via mkvextract. If I was right in using the file from mkv2vfr then the only user input was the total number of frames which I pulled from loading the avi into vdubmob soo....I'm stumped.

(vdubmod info: Frame 26809 (0:24:09.758) [ ] [195.76 MB])

Anyway before posting this I re-read the tcConv.txt again and found another parameter that is not adjustable via the gui.


max_diff -

The maximum fps difference under which two frames are considered
to have the same fps when converting from v2 to v1. This argument
is optional, and if not specified a default value of 0.1 is used.
Depending on the accuracy of the v2 file this value may need to be
adjusted so that you don't end up with a ton of only very slightly
different ranges.


I'm not sure if this is where my problem is, how to verify if it is, or even what values to try. Any guidance would great.

Cheers,
Eidolen

foxyshadis
24th March 2007, 11:14
Can you upload the timecode file? That would help a lot in fixing tc2cfr.

eidolen
24th March 2007, 17:45
Well here is the original file made by mkv2vfr.(v1) I tried uploading the converted file, (v2) and the file created by mkvextract (v2) but the forum said those files were too big for a txt file. (Said the max size was 200k)

Both v2 version are 399kb. Please let me know if you would like me to upload parts of them or just paste into the message body.

Thanks for the response,
Eidolen

eidolen
24th March 2007, 17:59
Well I feel like a idiot. Here are the other 2 files via 7z.

Thanks again,
Eidolen