PDA

View Full Version : hddvd to x264 mkv


ideas_man69
17th June 2008, 22:51
Hi guys..

I've decided to rip my hd-dvds to MKV's because it's much more convenient to stick them on my media center pc.

Anyway.. my steps so far:


ripped the hd-dvd to my hard drive
used eac3to:
eac3to feature1.evo+feature2.evo 1:video.mkv 2:audio.ac3 -640

this created a video.mkv file and an audio.ac3 file. I mkvmerged them together to ensure the audio sync'd up - which it did.

created an avisynth script to crop & resize the video:directshowsource("video.mkv")
lanczos4resize(1280,720)
crop(0,80,-0,-80)

this left me with a playable .AVS file which worked in mplayer2 and virtualdub. now for my questions:


Is there a better way to open an MKV file - or is avisynth the preferred method?
I'm going to use MeGui to convert the video - which x264 profile gives great quality picture without taking forever? (i know what im trying to say in my head but cant put it in words...). Ok, there must be a point where the quality improvements start to become less? (i think thats what im trying to ask) What profile do people recommend for ideal balance of speed/quality for 720p bluray/hddvd rips?
My LCDTV has a resolution of 1360x768. Am i better off changing the "lanczos4resize(1280,720)" to "lanczos4resize(1360,768)" and modifying the crops accordingly to make use of 1:1 pixel mapping?

Any ideas or suggestions would be greatly appreciated. Thank you!

Blue_MiSfit
18th June 2008, 06:04
1 - AviSynth is the preferred method :) DirectShowSource is usually okay with HD-DVD / BluRay sources. For H.264 titles you could demux the video to elementary .264 stream (instead of remuxing to mkv), and run it through DGAVCIndex, which will be frame accurate. DirectShowSource usually works well enough, especially if you make a custom filter graph ahead of time with GraphStudio and use that as your DirectShowSource instead of just pointing it at the MKV and hoping for the best.

2 - MeGUI is a great choice. There are many profiles to choose from, and "forever" is a subjective term. What kind of PC do you have? I have a 3 GHz quad core, so I usually don't mind using a pretty slow profile. Here are some things to keep in mind:

A) If you're just storing files on your media PC, then don't worry too much about hitting a specific file size. This allows you to use CRF encoding instead of conventional 2 pass encoding. CRF is one pass, so it's therefore twice as fast! :D Most people find CRF values between 18 and 22 to be quite good. I typically do BluRay rips at CRF19 the first time around. If I'm not satisfied, or it's too big, I will tweak my script and change the CRF, depending on the situation.

B) The DXVA-HD-HQ profile is a good place to start as far as encoding options. Switch the mode to CRF if you're interested (and you should be ;))

C) Make sure you have MeGUI set up to use the development builds. The stable builds are pretty out of date IIRC. Options -> Settings -> Extra config -> Configure Servers.

D) I would strongly suggest checking out one of the new Psy RDO builds that Dark_Shikari has made. Point MeGUI at this build, and everything will automagically happen :)


3) Lanczos4Resize might be a little too "sharp" for downconverting 1080p to 720p. It can introduce ringing etc... Give Spline16 or Spline36 a try too, along with vanilla Lanczos. I think you would be best off encoding to your TV's native resolution, and going 1:1. Beware of overscan, and compensate accordingly.

Feel free to ask any other questions, and let us know how things go! :)

~MiSfit

ideas_man69
18th June 2008, 08:00
thanks very much mate!
make a custom filter graph ahead of time with GraphStudio and use that as your DirectShowSource instead of just pointing it at the MKV and hoping for the best.
awesome! will do...
What kind of PC do you have?
just a dual core core2duo machine. not a quad unfortunatly.
This allows you to use CRF encoding instead of conventional 2 pass encoding.
this is very interesting.. i did read a few things on this. so if you set it to 19, will all 1h30m movies be the same size? or will it depend on details in the video and motion? i can't seem to find the CRF option after pressing "config" next to the presets. where is this option? i can see ABR, constant quantizer and constant quality - as well as all the passes. edit: constant quality = CRF.. thanks google!
The DXVA-HD-HQ profile is a good place to start as far as encoding options. Switch the mode to CRF if you're interested (and you should be ;))
i am!
Make sure you have MeGUI set up to use the development builds. The stable builds are pretty out of date IIRC. Options -> Settings -> Extra config -> Configure Servers.
I would strongly suggest checking out one of the new Psy RDO builds that Dark_Shikari has made. Point MeGUI at this build, and everything will automagically happen :)
i've setup development builds but i can't seem to find the dark_shikari in the update list..
Lanczos4Resize might be a little too "sharp" for downconverting 1080p to 720p.
i will try plain old lanczos..

great advice.. thanks again mate.

J_Darnley
18th June 2008, 11:38
You don't need to use MeGUI's dev update servers. The psyRDO patch is included in the 'stable' build and it is rev. 886 (the latest).

Blue_MiSfit
18th June 2008, 19:30
Wait... the latest x264 build through MeGUI auto-update has Psy-RDO? Cool :) I had been downloading the Psy-RDO build from Dark_Shikari's thread.

I was referring to the actual MeGUI build. Last I checked the stable releases were out of date, but that may have changed. I always like to have bleeding edge software - except when it borks - like last night on my Vista x64 box :(

~MiSfit

Nullity
23rd June 2008, 20:49
I was referring to the actual MeGUI build. Last I checked the stable releases were out of date, but that may have changed. I always like to have bleeding edge software - except when it borks - like last night on my Vista x64 box :(

~MiSfit

I am having this problem also. The last few build of MeGUI have issues in Vista x64. Whenever I tried to open a file (any file type) into the AviSynth script creator, I get the error:

"Unable to render the file. You probably don't have the correct filters installed."

Also, if I manually create a simple .avs file containing only a DirectShowSource line, I get the error:

"The file [xxx] cannot be opened. Please make sure it's a valid AviSynth script and that AviSynth is properly installed. You can check the validity of your script and AviSynth installation by opening the file in your favorite media player... etc."

I know my filters/codecs are definitely installed/set up correctly.

MeGUI core version 0.2.6.1041 was the last one that worked correctly. Builds 1046, 1048, and the latest 1049 all produce the above errors. I have just reverted back to 1041 for the time being.


EDIT: Sorry, this was slightly off topic and in the wrong forum. I'll look to the Encoder forum.

Blue_MiSfit
23rd June 2008, 21:57
Welcome to DirectShow hell :)

GraphStudio will help you get things in order. Open a new filter graph, and start with Haali splitter. Point it at your source file, and then connect it to either WMV Decoder DMO (for VC1) or CoreAVC / ffdshow (for H.264)

Save that graph, and load IT into DirectShowSource instead of your source.

And switch to the dev builds. 3.0.1010 is the latest AFAIK

~MiSfit

desta
23rd June 2008, 22:07
And switch to the dev builds. 3.0.1010 is the latest AFAIK
I'm still on 0.2.6.1049... :/

I say "still" but it's the latest one of the stable builds.

Nullity
24th June 2008, 13:40
I switched to 3.0.1010 and everything is working fine again. Thanks!

Blue_MiSfit
24th June 2008, 22:24
Yup, my issue's fixed as well :)

~MiSfit

Sharktooth
25th June 2008, 16:42
1011 is coming... maybe tomorrow and i think, at this point, it is even more stable than the stable branch...

Beastie Boy
29th June 2008, 16:08
created an avisynth script to crop & resize the video:directshowsource("video.mkv")
lanczos4resize(1280,720)
crop(0,80,-0,-80)


I would recommend doing the crop before resizing. That way, you can get rid of all the black bars/edges without worrying about frame size, and the resize would be very slightly quicker.

Cheers, Beastie.

ideas_man69
2nd July 2008, 00:00
after a few tests i've decided to go 1080p on dual layer dvds.

a 2 hour movie gives me bit more than 7000kbps for video, and then im using 640kbps ac3.

i did a few 720p, with 1.5mbps dts but i found that dts doesn't scale back to stereo nicely and its bandwidth i could be using for video.

i find that resizing it first gives you the correct aspect ratio. If you crop first and then resize, you are distorting the image - even though its very minimal its still distortion.

doesn't matter now really - as i only have to crop now for the 1080p vids.

Blue_MiSfit
2nd July 2008, 00:45
I don't even bother with cropping these days ;) x264 is very good at encoding pure black!

Good decision going with 1080p + AC3. I think for 90% of content it will be just fine at ~ 7mbps. In some cases you might need to do 720p, or filter a bit more than usual.

Also, I would say take the AC3 down to 448kbit. DVDs are usually 448kbit, and the difference between 640 and 448 is minimal to my (decent IMO) ears. All up to you - of course!


Now... the real question is - why are you storing your backups on dual layer optical media? Hard drives are much cheaper per GB -- a 1TB drive sells for ~ $175 in the U.S. and you'd have to buy ~110 DVD9s to fill that up. They still go for a couple bucks per disc last I checked, so... yeah :) Plus - if you're targeting a hard drive you can just to CRF mode and skip the second pass.

~MiSfit