VideoHelp.com Forum
+ Reply to Thread
Results 1 to 17 of 17
Thread
  1. Member
    Join Date: Jun 2007
    Location: Norway
    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?
    Quote Quote  

  2. Always Watching guns1inger's Avatar
    Join Date: Apr 2004
    Location: Miskatonic U
    Use AVI Demux or Xvid4PSP (my preferred option) instead
    Read my blogs here and here. Change England's Libel Laws - Sign Here
    Quote Quote  

  3. Originally Posted by Xavier
    How can I use a mkv file as a source in VirtualDub?
    Not directly.
    You can use DirectShow import driver plugin (works like DirectShowSource from Avisynth).

    Originally Posted by Xavier
    Is it something as simple as the MPEG2 importing (mpeg2source("file location")) or do I need some plugin?
    DirectShowSource
    Code:
    DirectShowSource("x:\path\name_file.mkv", FPS=23.967, ConvertFPS=True)
    Previously read FPS using MediaInfo.

    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
    Quote Quote  

  4. Member
    Join Date: Jun 2007
    Location: Norway
    Hmm... Thanks, but could you give a little more detailed explanation on what I need to do (Placio74)?

    Gonna try AviDemux now.
    Quote Quote  

  5. Member AlanHK's Avatar
    Join Date: Apr 2006
    Location: Hong Kong
    Originally Posted by Xavier
    Hmm... Thanks, but could you give a little more detailed explanation on what I need to do (Placio74)?
    For Avisynth see
    http://avisynth.org/mediawiki/Importing_media
    http://avisynth.org/mediawiki/DirectShowSource
    Quote Quote  

  6. Member
    Join Date: Dec 2005
    Location: none
    1) Start Notepad.

    2) Type in:

    Code:
    DirectShowSource("filename.mkv")
    Replace filename.mkv with the actual name of the file you want to open.

    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.
    Quote Quote  

  7. Member
    Join Date: Sep 2009
    Location: United States
    Actually, I directly import mkv files into virtualdub all the time.

    Just to show you:

    Click image for larger version

Name:	vfea76.jpg
Views:	747
Size:	41.9 KB
ID:	98

    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.
    Quote Quote  

  8. Originally Posted by mt123 View Post
    Actually, I directly import mkv files into virtualdub all the time.
    ...
    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
    Quote Quote  

  9. 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.p...T&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
    Quote Quote  

  10. Member
    Join Date: Sep 2011
    Location: Guatemala
    Originally Posted by naxa View Post
    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.p...T&f=7&t=19488&

    *: it's usually in "c:\program files\virtualdub\plugins" or something like that.
    May the FOURCC be with you...
    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
    Quote Quote  

  11. Member
    Join Date: Dec 2005
    Location: none
    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.
    Quote Quote  

  12. Member dphirschler's Avatar
    Join Date: Aug 2001
    Location: Kennesaw, GA - USA
    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
    }
    Quote Quote  

  13. Member
    Join Date: Dec 2005
    Location: none
    Originally Posted by dphirschler View Post
    function loadmkv(string mkv)
    {
    FFIndex(mkv)
    aud=FFAudioSource(mkv)
    vid=FFVideoSource(mkv)
    v=audiodub(vid,aud)

    return v
    }
    Is there some advantage to calling FFIndex() explicitly?
    Quote Quote  

  14. Member dphirschler's Avatar
    Join Date: Aug 2001
    Location: Kennesaw, GA - USA
    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
    Quote Quote  

  15. Member
    Join Date: Dec 2005
    Location: none
    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.
    Quote Quote  

  16. Member
    Join Date: Jul 2009
    Location: Spain
    Originally Posted by jagabo View Post
    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.
    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).
    Quote Quote  

  17. Member
    Join Date: Dec 2005
    Location: none
    Thanks Gavino.
    Quote Quote  




Similar Threads

  1. MKV guide, Play MKV, MKV to AVI, MKV to DVD, MKV to MP4, MKV to Blu-ray
    By Baldrick in forum Newbie / General discussions
    Replies: 55
    Last Post: 2nd Mar 2012, 15:25
  2. Blu-Ray 1080i source > MKV, confused about deinterlacing
    By Phat J in forum Video Conversion
    Replies: 0
    Last Post: 24th Aug 2011, 23:42
  3. Audio Source Missing from VirtualDub
    By Flynn in forum Capturing
    Replies: 3
    Last Post: 5th Jun 2010, 05:58
  4. virtualdub problem: source image format is not acceptable
    By jorwex in forum Video Conversion
    Replies: 12
    Last Post: 2nd Sep 2009, 05:01
  5. X264 mkv result has a wider width than the source
    By Ahmed28 in forum Newbie / General discussions
    Replies: 2
    Last Post: 9th Nov 2008, 19:33
Search   Contact us   About   Advertise   Forum   RSS Feeds   Statistics   Tools