I'm trying to convert and MKV file to AVI. I tried using alltoavi but the file cuts off about half way through and only half the video converts!
So I used mkvextractgui to extract the video and audio. The audio comes out fine but the video is only 23 minutes (of the 30). So when I try to mux them together with virtualdubmod, the frame rates are completely off.
The original MKV is 29.97 fps, and the extracted AVI is too, but I don't get why there's only 23 minutes.
Any help is appreciated!
+ Reply to Thread
Results 1 to 30 of 32
-
-
Originally Posted by poisondeathray
Yes the video plays normally (30 minute run time) on my computer. MediaInfo is showing me Xvid codec, 29.970 fps, progressive interlacement, audio is vorbis, runtime of audio same as video.
I'm stumped! -
What happens when you play the vorbis audio by itself? 30 minutes? When you play the xvid file by itself? 23 minutes? Is it "sped up?"
Try muxing the streams with avi-muxgui, you can specify a frame rate. I suspect it should be 23.967 which would be the discrepancy value (23 vs 30)
Another option is to change containers with avidemux (there is no re-encoding with this method)
1) Open it up in avidemux
2) video sidebar set "copy"
3) audio sidebar set "copy"
4) format sidebar set "AVI"
5) press save with extension (eg. "myfile.avi")
If the running time is still off (video too short), manually enter fps (video=>frame rate => 23.967), and repeat the steps.
Cheers -
It seems the MKV-wrapped XviD was actually encoded @ 23.976fps
BUT played back at 29.97fps by means of timecodes.
Follow the suggestions from poisondeathray and pray. -
Well I tried both methods and was able to get the video the right length (29:13), but the video and audio didn't sync. The audio starts ahead, but then the video catches up and eventually passes the audio. Guess I'll have to play around with the fps.
-
I'm afraid the lack of sync is being caused not by the XviD stream,
but by the Vorbis audio. Maybe you'll have to use a Winamp trick
for getting a constant~samplerate audio track
( https://forum.videohelp.com/topic346029.html ) -
If you couldn't get it right fiddling with the fps, chances are Baldrick was right and it is a VFR .mkv
mkv2vfr extracts all video frames from a .mkv to a CFR .avi
It comes in the Haali media splitter package. The only problem is that there is no GUI for it (command line only), so the easiest way is to copy your original .mkv into that folder
The syntax is (mkv2vfr original.mkv output.avi), this will output an AVI file with CFR video
Demux the audio from the original .mkv with mkvextractgui, and mux the "fixed" AVI file using avi-mux gui
If it is a VFR .mkv, this should work. However, if it doesn't for whatever reason, the last option is to re-encode using avisynth into an encoder (using DirectShowSource, manually stating the fps, and convertfps=true) Of course you want to avoid re-encoding video if at all possible.
Cheers -
@Midzuki - Wow I'm stupid I accidentally closed winamp because I didn't realize it was converting the OGG! So now that I have the full WAV file, should I convert it to MP3 or mux it to the AVI?
edit--Well I used mkv2vfr to get the CFRavi. It changed the fps from 29.97 to 23.97. I used the original OGG and a converted MP3 (via Yamp) and tried to mux both with avimux. The resulting AVI was the right length, but the audio is still faster than the video.
So I used Midzuki's winamp method and took the demuxed OGG and converted to WAV via Winamp. I converted that to MP3 and muxed with avimux. Same result as before.
So I still have an AVI file with the audio a couple seconds ahead of the video. I feel that I could use Virtualdubmod to tweak the frames and get them to match, maybe. -
The Ogg2Winamp2Wav method produces a CSR audio file with the correct playing time.
Use that .wav to create a correct-length .mp3/.aac/.ac3/whatever.
As for the video part... perhaps there will not be other solution
than re-encoding the MKV via Avisynth's DirectShowSource
Try
"DSS("clip.mkv", audio=false, fps=29.97, convertfps=true)" --> Encoder --> New.AVI
and pray. -
Are these installed?
avisynth 2.5.7 or greater?
Haali media splitter?
DirectShowSource("path\filename.mkv",fps=29.97,con vertfps=true, audio=true)
I would use "audio=true" and open the .avs in virtualdub to encode. Too many things can go wrong if you separate audio & video, in this particular case -
Can you open other videos with .avs and virtualdub? (with a different corresponding script of course)?
-
I tried another MKV and made an AVS. Very strange, it gave me the same error in Virtualdub. In my taskbar, the codecs come up (Haali etc.) then the error pops up.
-
Try an .avs script on an .mpeg or DivX in .avi (just trying to narrow down where the problems is)
-
What video codec was the "other .mkv"? Just trying to narrow it down to XviD or .mkv containers
Not sure what else to suggest except clean up your codecs & configuration, perhaps uninstall/reinstall with newest versions
Similar Threads
-
3D mkv file conversion help
By mkv2avi in forum Video ConversionReplies: 4Last Post: 12th Jan 2012, 11:05 -
burning an .mkv file directly to DVD-R without conversion
By aea145 in forum Authoring (DVD)Replies: 3Last Post: 6th Mar 2011, 08:49 -
Improving the conversion of a .mkv file (DTS) to a .mkv file (AC3). Ideas?
By mdelisle1 in forum Video ConversionReplies: 11Last Post: 19th Jan 2011, 10:50 -
.mds (image file) to .mkv conversion - how ?
By shuq in forum Video ConversionReplies: 1Last Post: 29th Jul 2010, 08:30 -
MKV (h.264 file) conversion to AVI or MP4
By killwill169 in forum MacReplies: 43Last Post: 12th Aug 2009, 18:35