View Full Version : need partial zoom filter
MemeX
3rd November 2003, 21:00
I've searched around the net for this "partial zoom" filter for Vdub..I'm not sure if it even exsists (probably not ). This is what I'd need it for:
I have want to make an encode for my mobile phone, the nokia 3650. The video is a japanese anime with subtitles, when resized to the phones resolution the subs are only guessable with great imagination skills. I though why not zoom in on the "main" part of the subs to make them a little bigger? shouldn't be too dificult, should it..well it is for me :D
Anyone have an idea or a way i could do this little trick?
Belgabor
4th November 2003, 23:06
I don't know of any filter for vdub that could do this, I'd recommend to have a look at avisynth, I've seen such things done with it.
MemeX
5th November 2003, 07:09
thanks for leading me into a direction, I've never really used Avisynth appart from GKnots auto "usage". I already made my first script ;) only the simple loading one tho..
This is the option I think will work for me:
http://www.avisynth.org/index.php?page=Layer
It's a pretty big new world to me and I'm a complete noobee to avisynth, but i can tell that its a great tool!
I'll search on that basis, somone might have already made a script that does what i need. if not i'll try to write it myself, but it's going to take a while to get to know the scripting.
off to avisynth-school!
MemeX
[later_edit]Layer doesn't seem to be supported on avisynth2.5, did i miss something?[later_edit]
MemeX
5th November 2003, 08:29
I have found something that sort of did the trick, this is what it looks like:
#
#
# Partial Zoom v.001 alpha ;)
#
# Credit goes to: http://forum.doom9.org/showthread.php?s=&threadid=5672
#
#
main=Avisource("big.avi").ConvertToYUY2()
pip=Avisource("big.avi").ConvertToYUY2().BilinearResize(240,180)
#
# I'm not sure if ConvertToYUY2 is necessary..
#
#
Layer(main,pip,"add",255,136,204)
#
Right now this script is loading from the same source file, in which I'd have to zoom into the area of the subtitles on the overlaying layer and cropped to the part of the subs. I still have to figure out how to blend the overlaying vidoes edges slightly, then the actual zooming, croping etc.. if someone has some idea how it can be done, please help :D
(I keep editing this post since i figure out more and more myself, avisynth isn't as hard as i assumed :P)
MemeX
5th November 2003, 09:42
this is my new version of the script, it's just the rough idea for now, but it works pretty good for me. This is the code for a 512x384 avi.
#
#
# MemeX's Partial Zoom v0.8
#
# Credit goes to: http://forum.doom9.org/showthread.php?s=&threadid=5672
#
#
main=Avisource("big.avi").ConvertToYUY2()
pip=Avisource("big.avi").ConvertToYUY2().Crop(98, 312, -90, -22).BilinearResize(512,82)
#
#
# Simply crops off the main image, then zooms in and
# is placed as a layer on the bottom of the "main" vid.
#
#
Layer(main,pip,"add",255,0,302)
#
#
this can probably be optimized, but its not bad for my first attempt. I tested this on a file which has no audio, so i'm not sure how things behave when there's audio. Now I want to apply a smoother on the zoomed-in subtitles, and maybe even make the background of the white subs black or "transparent", I have no idea how I can get started on the "make black, or transparent" part, can someone help me with that?
MemeX
MemeX
5th November 2003, 23:06
I've now been trying to make the background of the subtitles black.(subs are white+black shadow)
i used this:
Layer(main,pip,"darken",255,0,302)
I got a very interesting effect, the "box" and subtiles are now nearly transperant except the black outline shadow of the subtitles.
seems like i'm quite good at helping myself! :D well, I can see how this script isn't very interesting for anyone but me right now. My new task will be to make the area that isn't black (the shadow) the only thing that is layered on top of the "main" vid, because right now its "darken is performed only when the result is DARKER than the base" so its not 100% clean..
ideas someone?
Belgabor
8th November 2003, 17:34
Really nice how you started to find out things, as this is now more of a AviSynth issue/interest I'll move this now :)
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.