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 13th August 2013, 19:52   #1  |  Link
travolter
Registered User
 
Join Date: Apr 2009
Posts: 138
16:9 from 4:3 using same source as background


(Sorry but I didnt find a better image since I dont know the name of this effect)
The central video should be a 4:3 and as background the same stretched video is used.

How can be created with avisynth?

An example script would be appreciated. Im not looking for quality since I plan to use the script realtime.

Last edited by travolter; 13th August 2013 at 19:56.
travolter is offline   Reply With Quote
Old 13th August 2013, 20:09   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,156
Got any particular dimensions in mind ?
ie what size source, what dest, what thickness of grey border around inner output clip ?

EDIT: Maybe something like this:

Code:
ColorBars() # 640x480@43
OUT_W = 960		OUT_H = 540

OUT169 = Spline36Resize(OUT_W,OUT_H)
OUT169 = OUT169.Blur(1.58,1.58).Blur(1.58,1.58)
OUT169 = OUT169.Levels(0,1.0,255,16+16,235-16)

IN43   = AddBorders(8,8,8,8,$808080)

XX = OUT_W/2-IN43.width/2		XX = Int(XX / 2) * 2	# Coords MOD2
YY = OUT_H/2-IN43.Height/2		YY = Int(YY / 2) * 2
OUT169.Overlay(IN43,x=XX,y=YY)
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 14th August 2013 at 05:01.
StainlessS is online now   Reply With Quote
Old 13th August 2013, 21:12   #3  |  Link
Robert Martens
Registered User
 
Join Date: Feb 2010
Location: New York
Posts: 116
My resizing helper script, SimpleSlugUpscale, offers this as a possibility. I don't know what the effect is properly called, either, I just know it as windowboxing with a blurred background.

With SSU installed, you can just load your clip and call my function like this:
Code:
SimpleSlugUpscale(qual="Bob()", size="boxbg", outwidth=1280, outheight=720, \
                  boxheight=480, boxvideoDAR=4.0/3.0)
The "Bob()" setting ensures you won't suffer the performance hit of QTGMC, or even need to install it in the first place. If you don't need to deinterlace at all, you can replace qual="Bob()" with prog=true to treat your input as progressive.

My documentation needs work, to be sure, and the script itself could use a rewrite, but those settings (which assume NTSC DV, but can be easily altered to suit other footage sizes and shapes) should get you started. Feel free to ask if you need more details, I'm always happy to help!

Last edited by Robert Martens; 13th August 2013 at 21:14. Reason: Broken tables
Robert Martens is offline   Reply With Quote
Old 13th August 2013, 21:29   #4  |  Link
travolter
Registered User
 
Join Date: Apr 2009
Posts: 138
Thanks a lot for the fast reply StainlessS!! I tested the script and is working perfectly. Ill try modifying it and do experiments with other resolutions.

@Robert Martens thanks for your help too. Im going to test your script!!
travolter is offline   Reply With Quote
Old 13th August 2013, 21:32   #5  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,156
Travolter, I did make several changes to original post, hope you noticed.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is online now   Reply With Quote
Old 13th August 2013, 23:26   #6  |  Link
travolter
Registered User
 
Join Date: Apr 2009
Posts: 138
@StainlessS

Got the changes.. thanks pal!

@Robert Martens

Im testing your filter and it is working pretty nice too!!!.
At moment Im playing wit version 1.11 cause ver 1.12 reports me the following problem when using size="boxbg"

"audiodub: need and audio and a video track. Simpleslugresize line 948"


Both solutions are working nice.. Ill do more tests and use the less cpu consuming one

Really big thanks for the fast replies guys
travolter is offline   Reply With Quote
Old 14th August 2013, 00:03   #7  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,156
did a little bit more:

Code:
ColorBars()                                                             # 640x480@43, square pixels
#Spline36Resize(480,480)                                                # Test for non-square pixels (Changes FAR and SAR), can comment out

# Below Config
IN_DAR  = 4.0/3.0                                                       # Input Display Aspect Ratio
OUT_DAR = 16.0/9.0                                                      # Output Display Aspect Ratio
OUT_H   = 540                                                           # Choose output height
BORD_W  = 8                                                             # Gray border, left and right
BORD_H  = 8                                                             # Gray border, top and bottom
BORD_COL= $808080                                                       # Gray color
MOD_W   = 4                                                             # VDubMod may require 4, VDUB current OK with 2
MOD_H   = 2
# End Config

OUT_H = Int(OUT_H / MOD_H) * MOD_H                                      # Ensure Mod 2 output height
FAR43 = Float(Width)/Height                                             # Frame Aspect Ratio of input clip
SAR43 = IN_DAR / FAR43                                                  # Sample (pixel) Aspect Ratio of input clip
FAR169= OUT_DAR / SAR43                                                 # Output Frame Aspect Ratio (Input and Output SAR is SAME)
OUT_W = Int((OUT_H * FAR169 + (MOD_W/2)) / MOD_W) * MOD_W
Assert(OUT_H - BORD_H*2 >= Height,"Output Height to small")

OUT169 = Spline36Resize(OUT_W,OUT_H)
OUT169 = OUT169.Levels(0,1.0,255,16+16,235-16)
OUT169 = OUT169.Blur(1.58,1.58).Blur(1.58,1.58)

IN43   = AddBorders(BORD_W,BORD_H,BORD_W,BORD_H,BORD_COL)

XX = OUT_W/2-IN43.width/2       XX = Int(XX / 2) * 2                    # Coords MOD2 (dont really matter for overlay)
YY = OUT_H/2-IN43.Height/2      YY = Int(YY / 2) * 2
OUT169.Overlay(IN43,x=XX,y=YY)
EDITED:
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 14th August 2013 at 01:36.
StainlessS is online now   Reply With Quote
Old 14th August 2013, 01:02   #8  |  Link
Robert Martens
Registered User
 
Join Date: Feb 2010
Location: New York
Posts: 116
Quote:
Originally Posted by travolter View Post
At moment Im playing wit version 1.11 cause ver 1.12 reports me the following problem when using size="boxbg"

"audiodub: need and audio and a video track. Simpleslugresize line 948"
You'd be amazed to know how long ago I stumbled over that bug myself, only to completely forget to fix it. Try downloading the script again, version 1.13 adds a quick check that should take care of clips with no audio. Sorry for the inconvenience!
Robert Martens is offline   Reply With Quote
Old 15th August 2013, 16:23   #9  |  Link
travolter
Registered User
 
Join Date: Apr 2009
Posts: 138
@StainlessS
I got the new script and working nicely now

@Robert
problen fixed with the new version
travolter 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 14:48.


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