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 26th June 2009, 23:20   #21  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
If i understand you correctly: your source is dvd and your target is dvd. Why do you want to crop and resize? In general, if you do this because you want to crop the black borders, you will also need to crop a part of the active picture (to get your DAR 4x3/16x9 again). Is this what you are trying to do?
Wilbert is offline   Reply With Quote
Old 27th June 2009, 01:36   #22  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
I thought that keeping the resolution the same during encoding as it is on the dvd (720, 480), that the aspect ratio would be off.

I thought the encoder uses square pixels at 720, 480, so the non-square pixels from the vob when encoded would be treated as square pixels by the encoder.
So then I though that through cropping and resizing and addborders the encoder was forced to use non-square pixels.

That's why I was confused when ripbot264 used the dvd resolution. Why use dvd resolution in the encode when the encode treats non-square pixels as square pixels I thought.
This must be wrong.
And that's how this thread started with me asking for cropping and resize for sd dvd ntsc 1.78:1 aspect ratio, which uses non-square pixels.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 27th June 2009, 02:00   #23  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
you tell the encoder whether to add a pixel stretch flag to the stream or not.
not specifying a pixel stretch flag is then interpreted as square pixels on the decoder side.
i.e.
flagging 720x480 with 32:27 pixel stretch -> display as 853x480 (16:9)
flagging 720x480 with 8:9 pixel stretch -> display as 640x480 (4:3)
not flagging 720x480 at all (or flagging with 1:1 stretch) -> display as 720x480 (3:2)

in all cases it's the same 720x480 resolution in the resulting bitstream by the encoder, but they're just played back slightly differently.
...
this is all granted that the container and decoder you use both can and does respect the pixel stretch flag that was set by the encoder...
(*cough* AVI fail *cough*)
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 28th June 2009, 01:27   #24  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
I updated my first post. It shows how I got the crop value ripbot264 gave me using megui's avs script creator.
Ripbot264 used my vc1 1080p blu ray avs.

I then applied that method to my afro samurai sample ans I got this code:

loadplugin("C:\Program Files\AviSynth 2.5\plugins\dgdecode")
mpeg2source("C:\Users\canteen\Desktop\afro.d2v")

spline64resizeResize(720,400)

Here is a comparison picture. The one one the left is at resize 720, 480, the one on the right uses this code above:

__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 28th June 2009, 05:29   #25  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
what are you trying to say/prove with that comparison?

you're comparing two pictures of different AR:
one that's lost some vertical resolution to use square pixels to more accurate AR
and one that's maintained its original resolution using non-square pixels, so it has inaccurate AR.

so imo, the comparison is void,
if you wanted a realistic comparison, you would of resized the 720x480 frame to 853x480
and compared that against the 720x400 frame (which is still incorrect AR, 704x400 would be more accurate)
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 28th June 2009, 11:34   #26  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Quote:
Originally Posted by Jeremy Duncan View Post
You ask what my intended output is? It is a resolution at a aspect ratio, the file format is not important to me.
Well it should be - some formats only allow specific aspect ratios.

Quote:
I want to be able to rip a dvd, look at the chart i put together and get the correct cropping and resize to get the sd dvd at ntsc or pal.
For instance. I chose sd dvd ntsc (720, 480) at 2.35 aspect in ripbot264 and it gave me this avisynth code:
Crop(video,0,56,-0,-62)
Spline36Resize(video,640,272)
Yes, it crops the black bars away, and resizes (down) to square pixel (nearest mod 16 values).

So that's what you want to do?

If so, why do you talk later about adding borders?! You want 720x480 and square pixels?! That's pointless - there's a justification for one or the other - not both! If you've found a justification for having 720x480 containing a square pixel image, it probably means you've got a deep misunderstanding of something.

(If this isn't what you're doing, my apologies!).


I think it's very misleading to rename this thread "a guide"

Still, if you're now happy with what RipBot is giving you, I guess everyone's happy. There's no question left.

Cheers,
David.

Last edited by 2Bdecided; 28th June 2009 at 11:37.
2Bdecided is offline   Reply With Quote
Old 28th June 2009, 13:57   #27  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
Quote:
Originally Posted by kemuri-_9 View Post
if you wanted a realistic comparison, you would of resized the 720x480 frame to 853x480
and compared that against the 720x400 frame (which is still incorrect AR, 704x400 would be more accurate)
I have done so. I added the picture comparison to the first post.
Megui would not open a resize with the value you gave, so I changed it to 852, 480.

2Bdecided,

I'm not sure what you don't understand.
I have told Wilbert what I was trying to do and told you a few times. Maybe we have a language barrier that prevents me from enlightening you on what I am trying to do.

I have updated the first post.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 1st July 2009, 16:30   #28  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
I've just watched your YouTube videos.

In several places, I think you're making things more complicated than they need to be, for no good reason that I can see.

Your choice of destination resolution seems quite arbitrary - and resizing 720 down to 704 when you're resizing to square pixels makes no sense at all. You'd normally keep one or the other dimension the same, or (if needed) resize to something very different - resizing to something slightly different is odd.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 1st July 2009, 23:30   #29  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
2Bdecided,

Can you rephrase yourself again. I don't follow your logic completely.

There is a encoding guide and a ffdshow guide, as well as a dll guide in the youtube site.
Each guide has nothing to do with each other.
The encoding guide has nothing to do with the ffdshow guide.

I know I use ffdshow for hd resolutions, but that doesn't mean I can't encode using sd resolutions.
I though about encoding at hd resolutions using megui avs script creator so I can get the aspect ratio correct at hd resolutions using sd source, but I don't know how.
So I kept the encoding guide for sd dvd using the resolution the avs script creator gave it when I load the source into it.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 2nd July 2009, 14:50   #30  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Quote:
Originally Posted by Jeremy Duncan View Post
So I kept the encoding guide for sd dvd using the resolution the avs script creator gave it when I load the source into it.
Unless you mean something else, what you've said above simply isn't true - it started off with a 720 pixel width, and you explicitly changed it to 704. I know you did this because you've told us, and you show it in your video.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 3rd July 2009, 00:12   #31  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
Quote:
Originally Posted by 2Bdecided View Post
Unless you mean something else, what you've said above simply isn't true - it started off with a 720 pixel width, and you explicitly changed it to 704. I know you did this because you've told us, and you show it in your video.

Cheers,
David.
The doom9 guide says to use 704:
link

"704 x 480 1.3370 * 480 / 704 = 0.9116 This is NTSC DVD PAR"

Maybe you can rephrase yorself more so i can better understand what we are talking about?
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 3rd July 2009, 04:22   #32  |  Link
Inspector.Gadget
Registered User
 
Join Date: May 2008
Posts: 1,618
You haven't accounted for overscan, and then you're into the whole software/ITU debate, and then you're off the edge of a cliff..
Inspector.Gadget is offline   Reply With Quote
Old 3rd July 2009, 11:39   #33  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
We're going around in circles Jeremy - I think we established about a page back that you weren't encoding for a DVD, and were encoding square pixels.

So what the doom9 guide says about D1 (=DVD resolution) encoding, which by definition gives non-square pixels, isn't relevant.



And while I usually argue for proper ITU 704-pixel based encoding when you're coming from VHS or something with visible 8-pixel black orders, a 720-pixel wide DVD with absolutely no black borders (which is what this thread started with) has to be kept at 720, and is probably best treated as if the full 720 pixels define the aspect ratio.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 3rd July 2009, 12:46   #34  |  Link
Comatose
Registered User
 
Join Date: Dec 2007
Posts: 639
You really should drop the guide making thing until you're well informed on what you're trying to do...
Comatose is offline   Reply With Quote
Old 3rd July 2009, 12:52   #35  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
Quote:
Originally Posted by 2Bdecided View Post
a 720-pixel wide DVD with absolutely no black borders ...is probably best treated as if the full 720 pixels define the aspect ratio.

Cheers,
David.
I now know. Thank you for sharing this info.

With borders I use the 704 rather than 720 though, right?
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 3rd July 2009, 15:36   #36  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Quote:
Originally Posted by Jeremy Duncan View Post
With borders I use the 704 rather than 720 though, right?
If there are ~8 pixel borders each side, then yes. If there are only borders top and bottom, then no.
2Bdecided is offline   Reply With Quote
Old 3rd July 2009, 16:05   #37  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
Quote:
Originally Posted by 2Bdecided View Post
If there are ~8 pixel borders each side, then yes. If there are only borders top and bottom, then no.
Are you saying if there is only top and bottom borders that the resolution is 704, or 720?

And if there are borders all around ~8 pixel each side the resolution should be 704 or 720?

By reading the doom9 guide the pal resolution stays at 720.
Is this correct, or not? Please clarify.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 3rd July 2009, 16:46   #38  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by 2Bdecided View Post
If there are ~8 pixel borders each side, then yes. If there are only borders top and bottom, then no.
i've never particularly seen such 4-way overscan....
but does it actually exist, and even to such an extent as that?

Quote:
Originally Posted by Jeremy Duncan View Post
Are you saying if there is only top and bottom borders that the resolution is 704, or 720?
it would naturally crop to 720x464 for that vertical overscan situation

Quote:
And if there are borders all around ~8 pixel each side the resolution should be 704 or 720?
think about it for just a minute...
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 3rd July 2009, 16:56   #39  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
"each side" was misleading English - I meant exactly this...

For 720 pixel-wide source, if there are ~8 pixel borders left and right, then use 704. If there are no borders left and right, then use 720.

...and being more picky, I've often argued that the ITU PAR is correct (which means that the aspect ratio is defined by the centre 704 pixels, even if you have the full 720 present) - this is what all video standards say - but I've now verified that several video processors (including those used by the BBC!) fill the 720 pixels with content in such a way that the full 720 pixels define the aspect ratio - in direct contradiction of the ITU specs - the "extra" 8 pixels each side aren't extra at all - they're part of the true 16x9 or 4x3 image.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 5th July 2009, 07:09   #40  |  Link
DarkT
Registered User
 
Join Date: Dec 2006
Posts: 280
Quote:
Originally Posted by 2Bdecided View Post
but I've now verified that several video processors (including those used by the BBC!) fill the 720 pixels with content in such a way that the full 720 pixels define the aspect ratio - in direct contradiction of the ITU specs - the "extra" 8 pixels each side aren't extra at all - they're part of the true 16x9 or 4x3 image.

Cheers,
David.
So basically, the whole idea of going to ~873 to avoid contortion can be... making things worse in soem cases?
DarkT is offline   Reply With Quote
Reply

Tags
1.78;1, crop

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 20:22.


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