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. |
17th January 2006, 03:14 | #1 | Link |
Registered User
Join Date: Jul 2005
Posts: 240
|
Need your help with first anamorphic encode
Hi,
I'm encoding my first movie using anamorphic resizing. Howver after reading everything on the forum, I think I'm more confused than ever. So I'm looking for someone to help me out to endode the following movie. I have Red Eye, it's 2:40 Anamorphic, NTSC. I'm using MeGUI, to mkv. So step 1 go to Tools, AviSynth Script Creator, select my project file. For Input DAR, I select Custom and do I enter in 2:35? Check REtain anamorphic resolution and set SAR in Encoder. AVS Profile just keep at Default? Click Autocrop, which gives me 60 off the top and 66 off the bottom and 2 off the right. Go to Output Resolution and select ?? 720? Resize Filter, not sure what to select here but how about Bicubic Neatrual? Leave Deinterlace and Noise Filter unchecked. Mpeg2 Deblocking unchecked. Do I need Colour Correction checked? Is that it? I noticed that when I select the Edit tab, it says to "# Set SAR in encoder to 720 : 627" So now I go to Video and select the AviSynth script, set the output file, set it to mkv. For Codec set to AVC and here's where I select config and enter in 720:627 for SAR in the Advanced Tab? Is the 627 right? FYI I usually encode all my movies to about 2GB for a full 2hr movie with the AC3 track. So do I have this right?
__________________
Toronto,ON |
17th January 2006, 03:45 | #2 | Link | ||||
Registered User
Join Date: Apr 2005
Posts: 1,740
|
Quote:
Quote:
Quote:
Quote:
Code:
trim(0,5000) |
||||
17th January 2006, 04:02 | #3 | Link |
Registered User
Join Date: Jul 2005
Posts: 240
|
Thanks good to know I have the process down. When I select custom, the 2:35 shows in the box automically. So I guess that's right.
Just curious can I trust the Edit page where it suggests to use "# Set SAR in encoder to 720 : 627"? Is it usually right? Also if my movie is 1:85:1 aspect ratio what do I select in the Input DAR, simply 16:9?
__________________
Toronto,ON |
17th January 2006, 04:25 | #5 | Link | |
Registered User
Join Date: Jul 2005
Posts: 240
|
Quote:
Anyhow thanks for the input! Much appreciated.
__________________
Toronto,ON |
|
17th January 2006, 05:32 | #6 | Link | ||
Registered User
Join Date: Apr 2005
Posts: 1,740
|
Quote:
Quote:
|
||
17th January 2006, 05:40 | #7 | Link |
Registered User
Join Date: Jul 2005
Posts: 240
|
Well I'm not there yet, I'm getting the following error when trying to encode
avis[error]: unsupported input format(DIB) could not open input file d:\projects\Red Eye\Red Eye.avs. I used the Avisynth Script Creator in MeGUI. It contains the following info. LoadPlugin("C:\Program Files\GordianKnot\DGMPGDec\dgdecode.dll") mpeg2source("D:\red.d2v") ColorMatrix() #deinterlace crop(0,60,-2,-66) LanczosResize(720,352) Undot() # Set SAR in encoder to 720 : 627 I usually use Gordian Knot to create my avisynth script then open it up with MeGUI. I've never had any problem. This is the first time I tried creating one using MeGUI. I checked the settings and the path is correct. Edit: I get the following ouput using Gordia Knot. I noticed that the cropping and resizing are different. # Created with Gordian Knot # # http://gknot.doom9.org # PLUGINS LoadPlugin("C:\Program Files\GordianKnot\DGMPGDec\DGDecode.dll") LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\UnDot.dll") # SOURCE mpeg2source("D:\Projects\Red Eye.d2v") # TRIM #trim(startframe,endframe) # IVTC #Telecide(order=1,guide=1).Decimate() # or use #IVTC(44,11,95) #GreedyHMA(1,0,4,0,0,0,0,0) # DEINTERLACING (1) #FieldDeinterlace() #FieldDeinterlace(blend=false) #TomsMoComp(1,5,1) # DEINTERLACING (2) #KernelDeInt(order=1,sharp=true) # or maybe #DGBob(order=1,mode=0) # DEINTERLACING (3) - special requests #GreedyHMA(1,0,0,0,0,0,0,0) #Telecide() #SeparateFields() # CROPPING crop(8,64,704,348) # SUBTITLES #VobSub("FileName") # RESIZING LanczosResize(672,272) # DENOISING: choose one combination (or none) Undot()
__________________
Toronto,ON Last edited by DigitalDivide; 17th January 2006 at 05:47. |
17th January 2006, 09:13 | #8 | Link | ||
Registered User
Join Date: Apr 2005
Posts: 1,740
|
Quote:
Quote:
|
||
17th January 2006, 11:48 | #9 | Link |
unrecognized user
Join Date: Oct 2005
Location: home of Stella Artois
Posts: 303
|
DigitalDivide, try using the following script (based on the crop settings you got from megui):
# PLUGINS LoadPlugin("C:\Program Files\GordianKnot\DGMPGDec\DGDecode.dll") # SOURCE mpeg2source("D:\Projects\Red Eye.d2v") # CROPPING crop(0,60,-2,-66) Encode this in megui (of course you can add other filters for denoising or smoothing like undot if you want) and save as mkv or mp4. Than after the encoding is finished open the file with mkvmergeGUI, select the video stream and at display width/height put 850/354 and remux under a different name. I usually use this method because I get confused with those settings in megui. In case you don't understand how I got that aspect ratio, I explain it here: you take the resolution after cropping (in your case 718/354 (2.028)), you take the DAR of 1.77 of the original and the AR (1.5) and make the following calculus: 718/354(2.028).........x 720/480(1.5).....1.7777 and you get x. You multiply x with the height resolution and get 850/354 wich keeps the DAR and doesn't lose res by resizing. I hope I was clear (when I read it it confuses me). The resize settings in megui have no importance since you don't resize, that's the point of anamorphic display. And one last advice: after the autocrop in megui or gknot you should crop a bit yourself to make the resulting height/width both multiples of 16. It helps compression (but don't leave any black borders).
__________________
zzz |
17th January 2006, 13:49 | #10 | Link |
Registered User
Join Date: Oct 2005
Posts: 20
|
-> I think it's important to note that you can (and you should) deactivate any resizing filters, because they may affect quality and speed. With anamorphic rips resizing is generally not necessary.
-> Also important is a little bit of "playing" with MeGUIs crop and resizing sliders, because there's some kind of bug in MeGUI: MeGUI only calculates the correct SAR if you adjust the resizing values at least once. Sometimes gives me rather odd results, if I don't change the resizing or cropping values a bit. |
17th January 2006, 21:41 | #12 | Link |
Registered User
Join Date: Dec 2003
Posts: 15
|
A "simple" question :
What is the difference between "Sample Aspect Ratio" set in x264 encoding and "Aspect ratio" set in MKV ? Instead of applying 2 successives resize (one at encode and one at decode), why not setting encoding SAR is 1:1, and calculate the AR for display (stored in MKV container) ? Example : 1) for a PAL DVD, native resolution (anamorphic) is 720x576 2) I perform a crop to remove black border : reso is 720x560 In this case, how should I set SAR in x264 and AspectRatio in Matroska ? SAR=1:1 ? AR=16/9 ? Help, I'm very confuse about this ... Last edited by lenouch; 17th January 2006 at 22:17. |
18th January 2006, 00:08 | #13 | Link | |
Registered User
Join Date: Oct 2005
Posts: 20
|
Quote:
The relevant SAR parameters for x264* would be 8960:6480. Or, some nicer values to fill in: 112:81. Put that in the corresponding input boxes and you're fine. *calculation: 720*16:560*9=1,382716... |
|
18th January 2006, 01:23 | #14 | Link | |
Registered User
Join Date: Jul 2005
Posts: 240
|
Quote:
__________________
Toronto,ON |
|
18th January 2006, 03:13 | #15 | Link | |
Registered User
Join Date: Jul 2005
Posts: 240
|
Quote:
However I noticed the following locations for the file. C:\Program Files\X264 C:\program files\avisynth 2.5\plugins C:\program files\gordianknot\avisynthplugins c:\program files\godianknot\dgmpgdec Not really sure which I should be using but I tried putting the settings to c:\program files\avisynth 2.5\plugins and it still didn't work.
__________________
Toronto,ON |
|
18th January 2006, 03:24 | #16 | Link |
Registered User
Join Date: Apr 2005
Posts: 1,740
|
Ok, here's the standard thing you do when an avisynth script doesn't load: open it with VirtualDubMod. It will tell you what the error is (almost all of the time), and then you can go about remedying it. I was just making a guess, but it seems it didn't work.
|
18th January 2006, 04:26 | #17 | Link |
Registered User
Join Date: Jul 2005
Posts: 240
|
Okay figured out the error. I had two project files and it was looking for the wrong one.
I fnished encoding a small test. To be honest I don't see any difference between it using the SAR and the same movie I encoded without the SAR. Should I be able to see a difference?
__________________
Toronto,ON |
18th January 2006, 09:18 | #18 | Link | |
Registered User
Join Date: Dec 2003
Posts: 15
|
Quote:
1) From a technical point-of-view, is SAR just a flag in the encoded stream or is there an internal resize in x264 before encoding ? 2) In this case (SAR=8960:6480), what is the value I have to enter as DAR ? 16:9 again, or 1:1 because AR is "managed" in x264 stream ? This is definitly confuse for me Last edited by lenouch; 18th January 2006 at 09:24. |
|
18th January 2006, 11:16 | #19 | Link | ||
unrecognized user
Join Date: Oct 2005
Location: home of Stella Artois
Posts: 303
|
Quote:
Quote:
For question number 2 I'm not sure what you mean, you use either SAR OR DAR because they are related (height/width=SAR/DAR). (As I said before, it's less confusing if you just enter the DAR in matroska muxer after making an encode without resizing).
__________________
zzz |
||
18th January 2006, 11:47 | #20 | Link |
Registered User
Join Date: Dec 2003
Posts: 15
|
Thanks, it's more clear for me
In my case, anamorphic resolution is 720x576 => DAR is (576x16)/(720x9) = 9216/6480 = 64/45 = 1.422 Then, according to your last sentence, it's not necessary to modify SAR in x264 encoding (keep 1:1), but I have to set 64/45 (in mkvmerge. Fine ? In this case, decoder will decode my movie as 720x576, but will stretch it to display as (720*1.422) x 576 = 1024 x 576. Is that right ? Last edited by lenouch; 18th January 2006 at 11:50. |
Thread Tools | Search this Thread |
Display Modes | |
|
|