How can I use a mkv file as a source in VirtualDub? I'm not skilled with AviSynth, I barely understand any of it, but I assume it's possible somehow. The codec used in the mkv is AVC, and basically I want to convert it to an xvid/avi file.
Is it something as simple as the MPEG2 importing (mpeg2source("file location")) or do I need some plugin?
+ Reply to Thread
Results 1 to 17 of 17
-
-
Originally Posted by Xavier
You can use DirectShow import driver plugin (works like DirectShowSource from Avisynth).
Originally Posted by Xavier
Code:DirectShowSource("x:\path\name_file.mkv", FPS=23.967, ConvertFPS=True)
Of course when used DirectShow import driver or DirectShowSource must have installed DirectShow filters needed to 'play'.
Other (with Avisynth)... can try FFmpegSource filter/plugin or DGAVCDec.
Plus of course, can use FFmpeg or MEncoder and/or some GUI's for these encoders.VideoAudio.pl - Serwis o technologii wideo & audio -
Originally Posted by Xavier
http://avisynth.org/mediawiki/Importing_media
http://avisynth.org/mediawiki/DirectShowSource -
1) Start Notepad.
2) Type in:
Code:DirectShowSource("filename.mkv")
3) Save the file with the extension .AVS instead of .TXT in the same folder as the MKV file.
4) Open that .AVS file with VirtualDub just as if was an AVI file.
If you get a message about not being able to determine the frame rate you will have to change the .AVS script and add the fps parameter as discussed earlier. -
Actually, I directly import mkv files into virtualdub all the time.
Just to show you:
Unfortunately I can't really remember how I got to this point. I believe I installed something and all of sudden I could start importing mkv, ts, etc. files directly. -
Nothing unusual...
DirectShow import driver (plugin)? Go to plugins or plugins32 subfolder and check .vdplugin files.
Directly (natively) VirtualDub can only open an AVI and MPEG-I wideo files - other, through input plugins.VideoAudio.pl - Serwis o technologii wideo & audio -
Now you can also open MKV in VirtualDub with this input plugin:
http://fcchandler.home.comcast.net/~fcchandler/Plugins/Matroska/Matroska.zip
Unzip it and put the file "Matroska.vdplugin" in VirtualDub's "plugins" folder*.
[Re]start VD and voilá, works like charm!
Note: this is for input.
There are other great plugins available from the same author here, as well as the source code:
http://fcchandler.home.comcast.net/~fcchandler/
It's GPL so it's free!
Extra: here is a great list of input plugins for virtualdub:
http://forums.virtualdub.org/index.php?act=ST&f=7&t=19488&
*: it's usually in "c:\program files\virtualdub\plugins" or something like that.
May the FOURCC be with you...Last edited by naxa; 6th Aug 2011 at 16:44. Reason: list of input plugins
-
That almost did the job. I was able to open the mkv file in VirtualDub, but it opened with a black screen and "missing codec" on it. I was able to save it as AVI. Video plays perfect but it has no sound.
Mkv file has FLAC audio. Details from MkvInfo:
http://dl.dropbox.com/u/1946170/mkvinfo.txt
Thanks for your help! XD -
Get a VFW AVC decoder -- try ffdshow. (Note there are two basic video systems in Windows: VFW and DirectShow. VirtualDub uses the older and deprecated VFW, media players us DirectShow.) And an appropriate audio decoder for the FLAC audio.
-
Here are some AviSynth function that I use. You will of course need the plugin (http://code.google.com/p/ffmpegsource/).
Code:loadPlugin("C:\Programs_DPH\ffmpegSource\ffms2.dll") v=loadmkv("filename.mkv") return v function loadmkv(string mkv) { FFIndex(mkv) aud=FFAudioSource(mkv) vid=FFVideoSource(mkv) v=audiodub(vid,aud) return v }
-
-
Honestly, I cannot remember why. But I tried it several different ways, as outlined in the documentation. All I can say is that this worked well for me. It probably allowed me to randomly seek the file with ease.
Darryl -
I asked because I find if I just call FFAudioSource() or FFVideoSource() it will automatically build the index. Of course it doesn't hurt to explicitly call FFIndex() and maybe it's good practice just so you know it's being done.
Last edited by jagabo; 16th Sep 2011 at 09:51.
-
FFVideoSource only indexes the video tracks, so if you are calling FFAudioSource too, then you should call the latter first, or else call FFIndex explicitly before either.
The easiest way is to call FFMpegSource2(atrack=-1), which does more or less the same as dphirschler's loadmkv() function (but has additional options).
Similar Threads
-
MKV guide, Play MKV, MKV to AVI, MKV to DVD, MKV to MP4, MKV to Blu-ray
By Baldrick in forum Newbie / General discussionsReplies: 55Last Post: 29th Jun 2012, 11:19 -
Blu-Ray 1080i source > MKV, confused about deinterlacing
By Phat J in forum Video ConversionReplies: 0Last Post: 24th Aug 2011, 23:42 -
Audio Source Missing from VirtualDub
By Flynn in forum Capturing and VCRReplies: 3Last Post: 5th Jun 2010, 05:58 -
virtualdub problem: source image format is not acceptable
By jorwex in forum Video ConversionReplies: 12Last Post: 2nd Sep 2009, 05:01 -
X264 mkv result has a wider width than the source
By Ahmed28 in forum Newbie / General discussionsReplies: 2Last Post: 9th Nov 2008, 19:33