PDA

View Full Version : Resizing to 16:9 without motion effect


dvwannab
30th December 2005, 16:48
Gang,

Need some help. I recently captured a 16:9 broadcast, but I can only capture in 4:3 (720x480), so I have the black bars on top and bottom. I used a simple script to remove the black bars and re-encoded to the proper 16:9 aspect ratio in CCE Basic.

Script:

mpeg2source("c:\video.d2v")
crop (4,56,0,-64)
LanczsosResize(720,480)

I get a nasty horizontal lines on moving scenes and some jerkiness. How can I accomplish what I am trying to do and get smooth playing video? Thanks

Ebobtron
30th December 2005, 20:06
Your source is interlaced.
This should keep the fields from blending.

mpeg2source("c:\video.d2v")
SeparateFields()
crop (4,28,0,-32)
LanczsosResize(720,240)
weave()

There is probably a better way. Maybe someone will show us.

http://members.aol.com/avsfilmcutter

scharfis_brain
31st December 2005, 02:04
do not scale that way.

better use:

any_bob()
any_resize()
reinterlace()

(I'll explain later, when I got some time, next year)

Mug Funky
31st December 2005, 06:33
hehe, even using bobbers can give aretefacts, but they're almost invisible sao who cares...

a fast, motion-adaptive bob plus resize will give the best (ie. tradeoff between speed and quality) results. try:

mpeg2source("c:\video.d2v")

leakkernelbob(order=1,threshold=3)
LanczsosResize(720,480,4,56,last.width,last.height-64)

this will do the cropping and resizing in 1 go, which can be useful if you're anal (like me) about aspect ratios and want to crop by floating point numbers...

if your source is mostly film (ie not always interlaced) then you'll get a better image out of using tdeint with matching mode on, but it'll be slower (actually tdeint will give a better result either way, but for such a tiny difference it's not really worth the wait).

scharfis_brain
31st December 2005, 11:52
using my new securedeint() totally avoids artifacts caused by motionmasking :-P

kerneldeint's motionmask is very weak. it leaves through combing especially with short shutter contents

dvwannab
31st December 2005, 20:18
my clips are NTSC 29.97 fps interlaced material. Does it matter which bobber I use for this stuff? I will search for the Leakkernelbob function, unless you have it handy and can post it or link. Thanks.

Also, with MVbob I keep getting an error message from VDmod 1.5.10.02 (no function named "merge" - line 95 and line 193). I am using:

Masktools 158
MVTools 103
MVbob package DL link I found in a thread from 12/24/05.

script:

Import("c:\program files\avisynth 2.5\plugins\mvbob.avs")

LoadPlugin("C:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
LoadPlugin("c:\program files\avisynth 2.5\plugins\LeakKernelDeint.dll")
LoadPlugin("c:\program files\avisynth 2.5\plugins\RemoveGrain_v10pre1.dll")
LoadPlugin("c:\program files\avisynth 2.5\plugins\eedi2.dll")
LoadPlugin("C:\Program Files\avisynth 2.5\plugins\undot.dll")
LoadPlugin("C:\Program Files\avisynth 2.5\plugins\tomsmocomp.dll")
LoadPlugin("C:\Program Files\avisynth 2.5\plugins\mvtools.dll")
LoadPlugin("C:\Program Files\avisynth 2.5\plugins\masktools.dll")

mpeg2source("f:\1workfolder\mich88\mpcbowl1.d2v")

assumetff()

mvbob()

HELP!!!! :sly:

dvwannab
1st January 2006, 16:44
Mug Funky,

I tried the LeakKernelBob script and I am still getting the shaky/jerky video. Also, I noticed that for the resizing I had to use -128 (instead of -64 as it was supposed to be) for the bottom black portion. The top was fine.

Can anyone help with the MVbob error above? Thanks.

Didée
1st January 2006, 17:00
I noticed that for the resizing I had to use -128 (instead of -64 as it was supposed to be) for the bottom black portion. The top was fine.
Mug Funky was a lil fast at typing - he meant

leakkernelbob(order=1,threshold=3)
LanczosResize(720,480, 4,56,last.width,-64)

Can anyone help with the MVbob error above? Thanks.
You need to install Avisynth v2.56. Merge() was not available in former versions. Same for the resizer-cropping with negative parameters.

dvwannab
2nd January 2006, 03:58
Many thanks Didee, 2.56 now has MVbob working, but, wooooo :confused: , it is slow. I'll try Leak again with avisynth 2.56 to see if it will eliminate that jerky motion effect after resizing. Thanks.

Ebobtron
3rd January 2006, 23:03
do not scale that way.

better use:

any_bob()
any_resize()
reinterlace()

(I'll explain later, when I got some time, next year)
Is it next year yet, please scharfis_brain explain.
:)

dvwannab
13th January 2006, 18:33
I am re-visiting this thread/topic in hopes of some resolution. I have tried many combinations of those mentioned above, but so far the best I have come up with is using IIP. IIP sized it properly and there was no motion stutter, etc. The only thing was that there remains some nasty interlaced lines. I believe this has to do with the fact that the original broadcast was widescreen progressive (1280x720P) and I recorded as 720x480i. So I then tried MVbob with IIP and its just too slow in CCE Basic. Like 96 hours for the first pass (90 minute clip) :(

Hope scharfis brain or someone can offer some ideas to not only resize, but deinterlace and restore 29.97. Any help appreciated.

Didée
13th January 2006, 21:21
the original broadcast was widescreen progressive (1280x720P) and I recorded as 720x480i.
Oh my dear. Sounds as if your capture could be totally b0rked. (Not necessariliy, but quite possible.)
Please upload a short sample, so that we can look at it.

dvwannab
14th January 2006, 00:39
After squirelling around various posts/threads, I think I may have found a script that worked based on a small test sample. See below:


LoadPlugin("C:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
LoadPlugin("c:\program files\avisynth 2.5\plugins\LeakKernelDeint.dll")
LoadPlugin("c:\program files\avisynth 2.5\plugins\RemoveGrain_v10pre1.dll")
LoadPlugin("c:\program files\avisynth 2.5\plugins\eedi2.dll")
LoadPlugin("C:\Program Files\avisynth 2.5\plugins\undot.dll")
LoadPlugin("C:\Program Files\avisynth 2.5\plugins\tomsmocomp.dll")
LoadPlugin("C:\Program Files\avisynth 2.5\plugins\tdeint.dll")
LoadPlugin("C:\Program Files\avisynth 2.5\plugins\blendbob.dll")

mpeg2source("f:\1workfolder\mich88\mpcbowl1.d2v")

assumetff()
TDeint(mode=1,order=1,mtnmode=1)
BlendBob()
LanczosResize(720,480,4,64,last.width,-72)
Separatefields()
weave
_________________________________________
also this works:

mpeg2source("f:\1workfolder\mich88\mpcbowl1.d2v")

TDeint(mode=1,order=1,mtnmode=1)
BlendBob()
LanczosResize(720,480,4,64,last.width,-72)


Can anyone recommend a place on the net where I could put up some video ans still clips? Thanks

scharfis_brain
14th January 2006, 00:48
your scripts will destroy interlacing.

use:

TDeint(mode=1,type=3)
crop()
resize()
converttoyuy2()
separatefields().selectevery(4,0,3).weave()

Didée
14th January 2006, 02:55
Can anyone recommend a place on the net where I could put up some video ans still clips? Thanks
There's a sticky thread (http://forum.doom9.org/showthread.php?t=96362) covering this.

BTW, your script is fun to read, great fun. :)

Richard Berg
14th January 2006, 03:59
See also: my signature.

dvwannab
14th January 2006, 05:04
your scripts will destroy interlacing.

use:

TDeint(mode=1,type=3)
crop()
resize()
converttoyuy2()
separatefields().selectevery(4,0,3).weave()

WOW!!!!! That freaking worked and faster than just about everything I've tried. Thank you....thank you ........thank you. If you ran for US President against George Bush, I would vote for you :D

Believe it or not, I tried that script in one of my many tests, but I was missing the Converttoyuy2. Would have made all the difference in the world.

There's a sticky thread (http://forum.doom9.org/showthread.php?t=96362) covering this.

BTW, your script is fun to read, great fun. :)

Hey, glad I could give some entertainment, even though I wasnt having any trying to figure out this scripting business :D

Thanks for all the help guys.

mg262
14th January 2006, 09:11
Side note:

in most cases you will be okay just writing something like this:
LanczosResize(720,480)