Log in

View Full Version : [Question] How to encode VOB file with perfect quality ??


tuan_coi
4th February 2009, 17:00
Hi Everybody !
I'm New Here.
So, I want to know how to use Virtualdub with best (perfect) quality.
When i import 1 file .avs into virtualdub,,look at the output pane, it's so perfect...
But after encoding, i doesn't look perfect like before encoding.
It's worse...
Can anyone tell me how to encode with 100% quality like output pane

I use codec x.264...

Thanks...

Astrophizz
4th February 2009, 17:23
First, read the forum rules.

tuan_coi
5th February 2009, 13:25
Can you tell me what next step when i had *.avs file ???
what i have to do ?
In this forum, It seem like they write code or something to encode the video...& i don't understand anything..
I want to encode with 100% quality of file AVS ( i used to encode with virtualdub and use x.264 codec)

Inspector.Gadget
5th February 2009, 16:53
VFW is an outdated method of encoding, particularly for x264, in my opinion. I would first try the following:
1) Rip DVD to get VOBs. (I assume you have this already)
2) Using MeGUI's "D2V Creator" or DGIndex directly, index the VOB file. MeGUI may be easiest as it will automatically force film if necessary and load the .D2V into an Avisynth script with the correct ColorMatrix parameters.
3) Using MeGUI's "AVS" Script Creator, crop and resize as necessary. You don't necessarily need to do either, they're optional. Analyze the file with the analysis function to check interlacing and do whatever's necessary (I get the feeling you're not looking to get the experience of doing this by hand). Make sure to use "clever anamorphic encoding" if you're not planning to resize to a 4:3 or 16:9 dimension; MeGUI will select the proper pixel aspect ratio automatically using the D2V file.
4) Pick an x264 profile: Try "Unrestricted 1Pass Const. Quality HQ", which defaults to a quality that should be visually transparent. Queue the video encoding.
5) Set up audio encoding if you want, otherwise keep the original AC3 or DTS demuxed by the DGInedex function.
6) Click "Start", wait a few hours for it to encode, and then use either the MKV Muxer or MP4 Muxer to combine the video and audio. Enqueue that, let it run, then watch the resulting file. If you have interlacing artifacts you'll need to check that by hand and/or post a sample here. If quality is noticeably worse than the original VOB then you made a mistake somewhere along the line and you should come back here for help. If you run into problems, remember to keep and :logfile:.

tuan_coi
6th February 2009, 05:23
WOW...that what i known...
Here is video before encoding:

http://i249.photobucket.com/albums/gg225/tuan_coi_1311/2-4.jpg

And here is video after encoding:

http://i249.photobucket.com/albums/gg225/tuan_coi_1311/snapshot20090206111314.jpg

they're so difference
How can we keep exactly quality like source video ? That what i'm trying to say...not "how to encode"

Guest
6th February 2009, 05:43
You have to tell use exactly what scripts and settings you used when you did your encode. There's no way for us to guess what you did.

tuan_coi
6th February 2009, 06:40
You have to tell use exactly what scripts and settings you used when you did your encode. There's no way for us to guess what you did.

You right...
That what exactly i don't understand here.....
I don't know about scripts...
I just know about this guide and folow it :
http://www.doom9.org/index.html?/guides.htm

Can you teach me like when you start with the fist steps ( like everybody in this forum use scripts & code)

Guest
6th February 2009, 06:45
That's a link to the main guides page and so is useless to show us what you did. If you want help, you're going to have to do a lot better than that.

flebber
6th February 2009, 12:11
It seems you would like an easy but good solution. Perhaps avidemux would be the best, you can then load the vobs and use the auto -> dvd option done :)

tuan_coi
6th February 2009, 12:35
I don't know..Is It called "setting".??.
http://i249.photobucket.com/albums/gg225/tuan_coi_1311/1-5.jpg
http://i249.photobucket.com/albums/gg225/tuan_coi_1311/2-5.jpg
http://i249.photobucket.com/albums/gg225/tuan_coi_1311/3-4.jpg
http://i249.photobucket.com/albums/gg225/tuan_coi_1311/4-3.jpg

Can you teach me about "scripts" ??

jeffy
6th February 2009, 13:03
.avs = AviSynth script file
Do you expect some help? Then please describe what are you doing. The bitrate might not be sufficient, increase it or use CRF (18.0) Single pass - ratefactor-based (CRF); Ratefactor: 18.0. With this CRF method, the size cannot be determined before encoding. Perfect quality is subjective. You can decrease (15.0 and less) the number, if still not satisfied.

Last picture: Method: umh, Threads 0.

tuan_coi
6th February 2009, 13:44
.avs = AviSynth script file
Do you expect some help? Then please describe what are you doing. The bitrate might not be sufficient, increase it or use CRF (18.0) Single pass - ratefactor-based (CRF); Ratefactor: 18.0. With this CRF method, the size cannot be determined before encoding. Perfect quality is subjective. You can decrease (15.0 and less) the number, if still not satisfied.

Last picture: Method: umh, Threads 0.

Sorry But where is "Single pass - ratefactor-based (CRF); Ratefactor: 18.0" ??
I don't see it..
it just has:"single pass - Bitrate"
"single pass - Quantizer"

J_Darnley
6th February 2009, 13:54
If you insist on using x264-vfw then UPDATE IT! That is *&^% old! See: http://sourceforge.net/projects/x264vfw/

My suggestions would be: enable p4x4, it might be of some more use on a small video like this; enable B-references ("Use as references" box) and Bidirectional ME; use more ref. frames, up to four would show some difference.

If you upgrade do the above and do the following as well: Direct mode set to auto; use B-adapt 2; use subme 7. Also use threads if you have a multi-core processor.

But if you have an avs file already then I can't think of a x264 front end that won't accept it because the command-line binary will read an Avisynth Script. MeGUI is pretty simple, just load the avs file, choose a video encoding profile and hit Encode (or whatever the button is labelled). It also has a wide variety of audio encoders and can even mux the final file for you.

tuan_coi
6th February 2009, 17:55
.avs = AviSynth script file
Do you expect some help? Then please describe what are you doing. The bitrate might not be sufficient, increase it or use CRF (18.0) Single pass - ratefactor-based (CRF); Ratefactor: 18.0. With this CRF method, the size cannot be determined before encoding. Perfect quality is subjective. You can decrease (15.0 and less) the number, if still not satisfied.

Last picture: Method: umh, Threads 0.

Well, this way make size of video after encoding very big

There are a lot of people who can rip dvd with pefect quality and just small size...
So, are there any other setting or any scripst can do this (perfect quality with samll size)
I mean...small file is 1 video clip with play time: 4 minute encoding to file .mkv with 60 mb..

Guest
6th February 2009, 18:30
There are a lot of people who can rip dvd with pefect quality and just small size... "Perfect quality" is not possible when doing a lossy encode. You are chasing a phantom.

So, are there any other setting or any scripts can do this (perfect quality with samll size) What you ask for is impossible.

If you want help encoding a specific clip, then post a link to a sample of the unprocessed source video and tell us what settings you've tried so far.

tuan_coi
7th February 2009, 08:17
If you want help encoding a specific clip, then post a link to a sample of the unprocessed source video and tell us what settings you've tried so far.

This is source video:
http://www.mediafire.com/?zznymmqjimq

Please tell me which setting i should use to encode
( file after encode: .mkv, resolution:656.352, file size approximate 60 mb)

:thanks:

Guest
7th February 2009, 15:23
( file after encode: .mkv, resolution:656.352, file size approximate 60 mb) Why do you specify that resolution? After cropping black bars, the video is 688x544 @ 16:9, so that makes a display size of 1224x544.

If you resize down to your target size and zoom for playback, you'll lose a lot of quality.

You showed a source screenshot above at 656x352, but the clip you posted is 720x576. Please explain that.

tuan_coi
9th February 2009, 11:01
The Screenshot above 656x352 because it's .avs file i imported into virtualdub and capture with print screen ( after cropping & resize from .d2v file) . That picture is input pane & 2nd picture is after encording (captured with media classic)
If the video size is 688x544, so that makes file size bigger than 656x352 ,right??
What about settings when encode ??? to make video after encoding has quality better than 2nd picture i posted


Can you try ripping that clip i posted and upload to any host :D
I really want to download your product after processing to learn how you encode

Guest
9th February 2009, 15:12
Please post your full Avisynth script.

tuan_coi
9th February 2009, 18:05
Please post your full Avisynth script.

DGDecode_mpeg2source("C:\Documents and Settings\Tuan Koj\My Documents\Rip\rehab.d2v", info=3)
ColorMatrix(hints=true, interlaced=true, threads=0)
Load_Stdcall_Plugin("C:\Program Files\megui\tools\yadif\yadif.dll")
Yadif(order=-1)
crop( 16, 16, -16, -16)

Spline36Resize(660,352) # Spline36 (Neutral)
#denoise


I change name the video to "rehab.ts"

Guest
9th February 2009, 18:40
Now your width is 660!

I'm going to lose interest if you can't stick to a consistent story.

tuan_coi
10th February 2009, 05:47
Sorry about that...
I just try to encode more than 1 time
Now can you teach me since "creat avisynth script" step ?
After that..encoding ...

Guest
10th February 2009, 15:24
I made an encode for you. I don't do much encoding, so I'm sure it could be improved.

http://neuron2.net/misc/rehab.mkv

I left out the audio intentionally.

Here is my script:

mpgsource("rehab.dgm", deinterlace=1)
ColorMatrix(mode="Rec.709->Rec.601")
crop( 16, 16, -16, -16)
lanczosResize(656,352)
trim(3,0) # work around bug in mpgsource

And here is my x264 command line:

x264 --crf 21 --keyint 25 --min-keyint 1 --bframes 5 --b-adapt 2 --ref 3 --direct "auto" --weightb --mixed-refs --8x8dct --no-fast-pskip --output rehab.264 --fps 25 --progress --no-psnr --no-ssim --threads auto --aud "rehab.avs"

Is it OK?

You can replace mpgsource() with this:

mpeg2source("rehab.d2v")
# your deinterlacer