Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th October 2014, 16:16   #1  |  Link
cyberyman
Registered User
 
Join Date: Oct 2011
Posts: 1
How can I open MKV with MPEG inside in AviSynth?

Hello,

I recently ripped all my old TV-Show DVDs with "MakeMKV". Now I have a lot *.mkv files (one per episode) with the untouched MPEG-stream inside.

Some DVDs are heavely interlaced and I want to deinterlace with highest quality possible.

I never used AviSynth before, but I want to learn how to use QTGMC as I read it is recommened by a lot of users.

My first problem ist, how can I import those MKV with MPEG video?

MPEG2Source or DirectShowSource("C:\Users\kruger\Downloads\title00.mkv") gave me an error (file not supported)
I read that DGDecode.dll should be used for MPEG-2 but i also gave me an error, I think it can't handle mkv container? (It would make much more work first to remux all mkvs again)

(I want to use AviSynth to apply the QTGMC deinterlacing filter on all mkv files and reencode them with a HQ x264 crf setting. Audio should stay untouched.)

Last edited by cyberyman; 27th October 2014 at 16:57.
cyberyman is offline   Reply With Quote
Old 27th October 2014, 17:37   #2  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,085
Quote:
Originally Posted by cyberyman View Post

My first problem ist, how can I import those MKV with MPEG video?

MPEG2Source or DirectShowSource("C:\Users\kruger\Downloads\title00.mkv") gave me an error (file not supported)
I read that DGDecode.dll should be used for MPEG-2 but i also gave me an error, I think it can't handle mkv container? (It would make much more work first to remux all mkvs again)
With MPEG2Source you have to index the file first with DGIndex, that will create a .d2v file. Once that's done load the .d2v file with MPEG2Source("title00.d2v"). Regarding DirectShowSource (don't use it!), there are better alternatives (FFMS2 , LSMASHSource).
Reel.Deel is offline   Reply With Quote
Old 28th October 2014, 02:26   #3  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,119
sure, u can either use ffvideosoure/lwlibavvideosource or extract ur mpeg stream with mkvextract first, then use dgmpgdec
feisty2 is offline   Reply With Quote
Old 28th October 2014, 13:23   #4  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Posts: 2,231
@cyberyman

Since you have "a lot" of MKV files you need to convert, it probably makes sense to use an integrated solution (X264 GUI) where you do the setup only once and then convert your files with just two or three clicks...

The ones I am familiar with are MeGUI, RipBot264 and StaxRip, and for your needs I would recommend StaxRip. It lets you edit filter profiles so you can easily add QTGMC to your deinterlace filters. Audio can be passed through, and the encoder is fully configurable. It supports up to 2 audio tracks, subtitles are supported, and it automatically uses the source chapters. And if you run into any problems, there is a StaxRip thread in the "H264 Encoder GUIs" section where you will get any help you need...



Cheers
manolito
manolito is offline   Reply With Quote
Old 29th October 2014, 03:10   #5  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 237
Quote:
Originally Posted by cyberyman View Post
Some DVDs are heavely interlaced and I want to deinterlace with highest quality possible.
Why? Commercial DVD is almost always "heavily" interlaced (what does "heavily" mean, anyway?), or telecined. What would you consider to be only "moderately" interlaced? Or do you mean to say the DVD looks defective or poorly processed? Commercial BluRay and standard AVCHD are also interlaced except for high-res film based source and 720p. It's done because set top players and TV's are programmed to recognize certain formats as interlaced. Fortunately, decent PC media players deinterlace on the fly. If your video is NTSC at 29.97 fps, deinterlacing will double the number of frames and play at 59.94fps. If you decimate frames to maintain 29.97fps, you'll have motion problems playing on TV and your video will be re-encoded at half its original temporal resolution. If your TV-shows were created on film (a great many of them are), then they aren't interlaced. They're telecined, which should not be deinterlaced. Have you taken any of this into consideration?

Is this for PC-only or web display? If so, you'll have to deinterlace as well as resize for the web. Either way, you'll have to re-encode. If you think re-encoding from lossy MPEG to lossy h264 won't involve quality issues, you've been misled.

Why did you rip your DVDs into mkv containers? I'm always curious about why people do such things, since "ripping" DVD results in an MPEG2 copy, not an mkv. Why place MPEG2 in an mkv container when MPEG2 is its own container? Was this simply a container change, or did you re-encode to h264 to get the mkv? An MPEG2 in an mkv container would be the same file size as an MPEG2 in an MPEG2 container, so what was the point? Or was this really a rip-plus-reencode? I'm afraid you're not giving enough information for anyone to give solid advice.

Last edited by LemMotlow; 29th October 2014 at 03:27.
LemMotlow is offline   Reply With Quote
Old 29th October 2014, 04:37   #6  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 964
Quote:
Originally Posted by LemMotlow View Post
Why did you rip your DVDs into mkv containers? I'm always curious about why people do such things, since "ripping" DVD results in an MPEG2 copy, not an mkv. Why place MPEG2 in an mkv container when MPEG2 is its own container? Was this simply a container change, or did you re-encode to h264 to get the mkv? An MPEG2 in an mkv container would be the same file size as an MPEG2 in an MPEG2 container, so what was the point? Or was this really a rip-plus-reencode? I'm afraid you're not giving enough information for anyone to give solid advice.
The OP mentioned they used MakeMKV in their first post. It outputs all of its title-based rips (and by default, it does only decrypt them, even though it does have options to rip-and-transcode) inside Matroska, not just the H.264 or VC-1 Blu-ray cases where putting them in MKV actually makes sense. So even MPEG-2 streams from Blu-ray or DVD get muxed into MKV on output when you use it for single titles (for whole-disc backup, it'll keep things as-is, but MakeMKV only makes whole-disc easy for Blu-ray - for DVD, you have to enable streaming and grab the decrypted vobs from localhost).
qyot27 is offline   Reply With Quote
Old 29th October 2014, 10:48   #7  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Posts: 2,231
Ripping a DVD into an MKV container with MakeMKV does make a lot of sense IMO. It removes the encryption (no need to buy AnyDVD) and it retains the chapters. And having to deal with a single file instead of a whole VIDEO-TS folder also helps.

Plus there are several H264 GUIs which do not support DVD input directly (StaxRip is one of them). For such scenarios ripping the DVD to MKV first is a logical workflow.

For me the interesting question is if it makes sense to deinterlace the content before reencoding it to H264. For X264 I remember hearing more than once that encoding in interlaced mode is a lot less efficient than in progressive mode. And how good are current TVs and projectors at deinterlacing on the fly?


Cheers
manolito
manolito is offline   Reply With Quote
Old 30th October 2014, 22:03   #8  |  Link
kuchikirukia
Registered User
 
Join Date: Oct 2014
Posts: 396
Use MeGUI. Automatic deinterlacing will probably do you.

Alternately, Handbrake. You're stuck with 8 bit H.264, but on the chance that your source has any hybrid material, their decomb/detelecine supports Variable Frame Rate output without needing to spend a week banging your head against the wall trying to figure out how to get it to work with AviSynth.
kuchikirukia is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:36.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.