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 14th April 2005, 20:34   #1  |  Link
alanisrox69
Registered User
 
Join Date: Apr 2005
Posts: 45
Help using AVISynth with PAL to NTSC conversion

Hi all,

I have a quick question, I'm converting a PAL dvd to NTSC dvd, I frameserved it using DVD2AVI, got my AVS file setup (I'm going to use CCE for the encoding), but here's the problem, the source video has a resolution of 768x576, how would I resize that keeping the aspect ratio to 720x480? It seems everything I tried stretched the picture out a little, your help is greatly appreciated, I'll buy you a beer! Thanks sooo much.

Here's what my AVS file looks like right now:
LoadPlugin("C:\Program Files\AviSynth2\plugins\MPEG2Dec3.dll")
mpeg2source("C:\PHILIPS_DVD_VR\VIDEO_TS\test.d2v")
ConvertToYUY2()
Bob()
BilinearResize(768, 576, 0, 0, 720, 480)
ConvertFPS(59.94)
SelectEvery(4,1,2)
Weave()

If you see anything wrong in there please let me know! Thanks sooo much.
-Derek-
alanisrox69 is offline   Reply With Quote
Old 14th April 2005, 20:39   #2  |  Link
alanisrox69
Registered User
 
Join Date: Apr 2005
Posts: 45
Oh yeah, I should mention, it stretched the picture out vertically not horizontally

Thanks in advace for your help guys!
-Derek-
alanisrox69 is offline   Reply With Quote
Old 15th April 2005, 01:38   #3  |  Link
alanisrox69
Registered User
 
Join Date: Apr 2005
Posts: 45
Please anyone???
alanisrox69 is offline   Reply With Quote
Old 15th April 2005, 05:26   #4  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
You can't even wait 6 hours?!
Guest is offline   Reply With Quote
Old 15th April 2005, 05:35   #5  |  Link
alanisrox69
Registered User
 
Join Date: Apr 2005
Posts: 45
Quote:
Originally posted by neuron2
You can't even wait 6 hours?!
I know I'm new, and the forum was moving fast (thread was down near the bottom), and had like 20+ views, just trying to get help!

I'm sure it's something so simple too.
-Derek-
alanisrox69 is offline   Reply With Quote
Old 15th April 2005, 06:47   #6  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
dude, if your sourceis 768x576, then it's out of spec for DVD.

DVD is only 4:3 or 16:9 - all other aspect rations require adding black bars somewhere or other.

so all you need do is resize to 720x576 and set the aspect flag to whatever the source was set to.

i'd suggest using a motion-adaptive bob for standards conversion - try LeakKernelBob (search ), and have the threshold at around 4. also, use a better resizer than bilinear - with 480 lines, you'll want all the resolution you can get.

try:
Code:
LoadPlugin("C:\Program Files\AviSynth2\plugins\MPEG2Dec3.dll")
mpeg2source("C:\PHILIPS_DVD_VR\VIDEO_TS\test.d2v")
ConvertToYUY2(interlaced=true)
LeakKernelBob()
lanczosresize(720,480)
ConvertFPS(59.94)
separatefields()
SelectEvery(4,1,2)
Weave()
you'll want to check the field-order after this to make sure it's all good. (should be top field first for DVD, even though it'll handle both, it's good to keep to the norm).
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 15th April 2005, 07:10   #7  |  Link
alanisrox69
Registered User
 
Join Date: Apr 2005
Posts: 45
Quote:
Originally posted by Mug Funky
dude, if your sourceis 768x576, then it's out of spec for DVD.

See that's my problem. However it's actually in spec for Philips standalone DVD recorders (PAL versions), strange I know! That's why it got me stumped! It took some investigative googling to find that out!

I will try what you suggested, but after some time playing around, I decided to swap the resize ratios and play with the numbers a bit and it worked! and yes I figred out that Lanczos is better than bilinear after I posted hehe.

So here's what my AVS file looks like now, it's still converting in CCE, I will do both, your way and the way I discovered and compare them:
LoadPlugin("C:\Program Files\AviSynth2\plugins\MPEG2Dec3.dll")
mpeg2source("C:\PHILIPS_DVD_VR\VIDEO_TS\test.d2v")
ConvertToYUY2()
Bob()
LanczosResize(720, 480, 0, 0, 720, 520)
ConvertFPS(59.94)
SelectEvery(4,1,2)
Weave()

it did crop a tiny bit on top and bottom, but nothing major, if anything it helped, since there was a color bar on the bottom (from VHS tape), and a slight curve at the top (I assume from VHS tracking problems?) and just filled in black bars.

Thanks for your help!
-Derek-
alanisrox69 is offline   Reply With Quote
Old 15th April 2005, 09:37   #8  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
you really shouldn't use a non-adaptive bob though. when you do standards conversion, it means top fields are getting mixed with bottom fields, causing a sort of phasing vertical wobbling in static areas. you'll notice it on the PC, but i'm not sure if it'll manifest as anything but a slight blur on a TV.

anyway, it's best to use a motion-adaptive deinterlacer for converting PAL to NTSC / NTSC to PAL. for something that'll be (probably) no slower than regular bob(), try LeakKernelBob. it'll make a basic decision between moving and non-moving areas, and pass the non-moving through untouched, and use a kernel based deinterlace on the moving bits. this gives you a lot more vertical resolution (which you'll need on an NTSC TV).

using kernelbob + lanczos will not only mimic the $10,000 standards converters out there, it will actually beat them. just make sure the thresholds are set right (there's an art to that... but don't wory, as i'm toying with the idea of determining the threshold per-frame depending on the picture's noise level. not sure how to do this just yet, but i have an inkling).
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 15th April 2005, 11:49   #9  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Also, do the bobbing right after loading the source, before any colorspace conversion.

And before you enter the ocean called "interlaced processing", make sure you actually have truly interlaced material
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 15th April 2005, 15:24   #10  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
good point there, boulder!

if you've got progressive content (there's not really any telecine when we're talking PAL, but there's the very very rare field-shift), you can either not bob, and just convertfps(59.94) and interlace, or you can:

assumefps(23.976,true)
changefps(59.94)
separatefields().selectevery(4,1,2).weave()
SSRC(48000)

or you can:

changefps(59.94)
separatefields().selectevery(4,1,2).weave()

or you can simply encode to 720x480 @ 25fps and use DGpulldown to make the stream into a (nearly) 3:2 pulled-down mpeg2 file.

the first solution slows the film down (probably to the original speed), but at the cost of having to transcode a lossy audio source (lossy to lossy audio transcoding is evil and should only be done when there's no other possible option), the second solution does the same as the third but inside avisynth.

i'd go with the third solution, if and only if you have progressive material. otherwise use the kernelbob-convertfps method.

there's also extremely slow but potentially stunningly good methods of conversion that involve motion compensation, and actually reconstructing frames at a different frame rate. look for "MVbob". this method is pretty risky though, and if you're going to DVD, field-blending wont kill you like it would if your destination media was low-bitrate 1CD backups.
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 15th April 2005, 15:28   #11  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
Sidenote:

resizing 768 to 720 is wrong.

resize to 704 instead.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 16th April 2005, 00:21   #12  |  Link
alanisrox69
Registered User
 
Join Date: Apr 2005
Posts: 45
Quote:
Originally posted by scharfis_brain
Sidenote:

resizing 768 to 720 is wrong.

resize to 704 instead.
but I'm converting to NTSC, isn't 704 PAL?

I think the problem lies within that weird Aspect Ratio 768x576. I'm re-encoding using Mug Funky's method, will post results later on.
-Derek-
alanisrox69 is offline   Reply With Quote
Old 16th April 2005, 07:55   #13  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
allowed resolutions for DVD authoring are:

720x576 704x576 352x576 PAL
720x480 704x480 352x480 NTSC

trust me. resizing to 704 pixels is correct.
(or read the ITU-specs regarding Aspect Ratio)

EDIT: corrected Copy'n'Paste mistake, thanks to Boulder
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.

Last edited by scharfis_brain; 16th April 2005 at 09:30.
scharfis_brain is offline   Reply With Quote
Old 16th April 2005, 09:12   #14  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
720x480 704x480 352x480 for NTSC, a small typo there
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 17th April 2005, 08:58   #15  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
hmm.. forgot about the 704x thing.

if you want guaranteed DVD compatibility, you'll have to stick with 720 (just addborders(8,0,8,0) on the 704 stuff) because loads of DVD players will mess up subpictures on anything but 720. this means menus and subtitles could be out of whack in unpredictible ways.

this is why you'll almost never see 352*xxx res on DVDs (that, and not many people know that anything but 720 is supported, though it's obvious at many stages in the production process that other sizes are supported).

704 is good for satellite/cable transmission though
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 17th April 2005, 15:18   #16  |  Link
Kika
Registered User
 
Join Date: Jul 2002
Location: Germany
Posts: 819
A couple of my DVDs do include 704 or 352 - two of them with subtitles. OK, Hongkong-Stuff, but this does not matter, doesn't it?

For my own encodings i always use 704 letterboxed to 720, that's a very safe way.
Kika is offline   Reply With Quote
Old 17th April 2005, 15:37   #17  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
if you want guaranteed DVD compatibility, you'll have to stick with 720 (just addborders(8,0,8,0) on the 704 stuff) because loads of DVD players will mess up subpictures on anything but 720. this means menus and subtitles could be out of whack in unpredictible ways.

how did you came to this conclusion?

lowering the size of the video from 720 to 704/352 and then putting it together with the original subpicture on DVD?
For sure. This cannot work properly, because the size of the subpicture hasn't been altered too.

PS: I am a DVD-N00b, just assumptions here
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 18th April 2005, 09:13   #18  |  Link
Kika
Registered User
 
Join Date: Jul 2002
Location: Germany
Posts: 819
There are some dumb players out. If you feed them with any other resolution than 720, they will scale the subtitles too. So, on 352 or 704 videos, the subtitles are stretched.
This is not a DVD problem, it's a bug in the players.
Kika is offline   Reply With Quote
Old 18th April 2005, 12:25   #19  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
yes, kika hit the nail on the head. i think the DVD specs are unclear as to how to handle subpics with different resolution (or the same resolution!) video.

i know it's been tried, and more than a few players had problems (not just the cheap ones - i think the pioneer players have problems with this, but that may be something else they had problems with and my memory isn't serving me).
__________________
sucking the life out of your videos since 2004
Mug Funky 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 18:42.


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