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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 24th April 2005, 17:52   #1  |  Link
SoulSmasher
Registered User
 
Join Date: Jan 2005
Posts: 25
A help in resizing without breaking the aspect ratio

hi, i want to convert my divx mvie to mpeg2...
but i have a little problem..
the movie is 640x256..
when i open the avs (or avi) in tmpgens dvd source creator for creating pal 16/9 mpeg2, the aspect ratio breaks down...
i want to put simple black lines to top and bottom to keep the aspect ratio, cause i dont wanna crop the movie from left and right...
how can i do this?
is theree a filter for this?
if anyone knows please help me...
thanx...
(i use tmpgenc dvd source creator for creating mpeg2 and it opens the avs files...)
__________________
Spirit... It's the hero's strength, the mother's restlince and the poor man's armor. It cannot be broken and it cannot be taken away.
This I must believe
Drizzt
SoulSmasher is offline   Reply With Quote
Old 24th April 2005, 18:02   #2  |  Link
E-Male
mad computer-scientist
 
Join Date: Mar 2002
Posts: 1,375
what is your target resolution?

define "breaks down"!
E-Male is offline   Reply With Quote
Old 24th April 2005, 18:07   #3  |  Link
SoulSmasher
Registered User
 
Join Date: Jan 2005
Posts: 25
i am not @ home now but i need 2 add 47 lines to top and bottom.
it may be 625*256 or 640*256 i dont remember now
how can i do that?

sorry for my bad english..
aspect ratio doesnt become 4/3 or 16/9. it becomes weird. like i pulled the movie from top and bottom.
__________________
Spirit... It's the hero's strength, the mother's restlince and the poor man's armor. It cannot be broken and it cannot be taken away.
This I must believe
Drizzt

Last edited by SoulSmasher; 24th April 2005 at 18:11.
SoulSmasher is offline   Reply With Quote
Old 24th April 2005, 18:27   #4  |  Link
E-Male
mad computer-scientist
 
Join Date: Mar 2002
Posts: 1,375
with 16/9 you mean anamorphic?
anamorphic video is streched (long faces and so on)
that's intentional and should be corrected by the player if authored correctly

even if you stay with 4/3 you have to change the picture AR
because divx and mpeg2 have different pixel ARs

tmpgenc tools should do all that automatically in most cases, so don't worry
E-Male is offline   Reply With Quote
Old 24th April 2005, 18:31   #5  |  Link
SoulSmasher
Registered User
 
Join Date: Jan 2005
Posts: 25
no tmpgenc tols are useless..
when i click prewiew encoded, i see that video is pulled from top and bottom, the aspect ratio isnt correct...
and cropping top and bottom makes them worse.
thnik like i do 640*025 movie to 16/9 video. do u understand???
i need a script that adds lines to top and bottom...
__________________
Spirit... It's the hero's strength, the mother's restlince and the poor man's armor. It cannot be broken and it cannot be taken away.
This I must believe
Drizzt
SoulSmasher is offline   Reply With Quote
Old 24th April 2005, 19:48   #6  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
What about looking in the manual that came with avisynth?

Code:
AddBorders(0,47,0,47)
#or if it's total 47 lines
AddBorders(0,23,0,24)
tsp is offline   Reply With Quote
Old 24th April 2005, 22:53   #7  |  Link
E-Male
mad computer-scientist
 
Join Date: Mar 2002
Posts: 1,375
>>...do u understand???...
-I don't like that tone

>>when i click prewiew encoded, i see that video is pulled from top and bottom, the aspect ratio isnt correct...
-have you actually encoded a part of it and tried in a player?
also, do you know what anamorphic means??
E-Male is offline   Reply With Quote
Old 25th April 2005, 13:47   #8  |  Link
SoulSmasher
Registered User
 
Join Date: Jan 2005
Posts: 25
http://warriorhellscream.spymac.net/my_problem.png
http://warriorhellscream.spymac.net/my_problem2.png

if u check here, u can understand me better.....
__________________
Spirit... It's the hero's strength, the mother's restlince and the poor man's armor. It cannot be broken and it cannot be taken away.
This I must believe
Drizzt
SoulSmasher is offline   Reply With Quote
Old 25th April 2005, 13:59   #9  |  Link
SoulSmasher
Registered User
 
Join Date: Jan 2005
Posts: 25
yepp i tried... it isnt correct...
__________________
Spirit... It's the hero's strength, the mother's restlince and the poor man's armor. It cannot be broken and it cannot be taken away.
This I must believe
Drizzt
SoulSmasher is offline   Reply With Quote
Old 25th April 2005, 14:12   #10  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,407
I assume 6).

In case the task is educationally purposed, you should use FitCD.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 25th April 2005, 14:15   #11  |  Link
SoulSmasher
Registered User
 
Join Date: Jan 2005
Posts: 25
i dont want to break any rules of forum. it's educational for me, in case, i couldnt find any picture that explains my problem...
i dont think that the picture on the link is illegal but if that is, ill immediately delete the link.....
__________________
Spirit... It's the hero's strength, the mother's restlince and the poor man's armor. It cannot be broken and it cannot be taken away.
This I must believe
Drizzt
SoulSmasher is offline   Reply With Quote
Old 25th April 2005, 14:17   #12  |  Link
SoulSmasher
Registered User
 
Join Date: Jan 2005
Posts: 25
Quote:
Originally posted by E-Male
>>...do u understand???...
-I don't like that tone


i dont want to be rule, if this is rule in ur country, or 4 u, sorry about that, E-Male.......
__________________
Spirit... It's the hero's strength, the mother's restlince and the poor man's armor. It cannot be broken and it cannot be taken away.
This I must believe
Drizzt
SoulSmasher is offline   Reply With Quote
Old 25th April 2005, 14:52   #13  |  Link
Wilbert
Super Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,390
It's ruDe

Anyway, tsp explained you how to do the resizing in AviSynth. Open the script in TMPGEnc:

Settings:
Advanced -> 1:1
Video -> Aspect ratio 16:9 display[*]
GOP structure -> max 15 (18 for NTSC)
[*] if this is greyed out (standard on 4:3), you should do the following: Load -> Extra folder -> unlock.mcf (that template unlocks all settings). Go back to Settings: Video -> 16:9, and Encode mode -> progressive.

Quote:
no tmpgenc tols are useless..
when i click prewiew encoded, i see that video is pulled from top and bottom, the aspect ratio isnt correct...
and cropping top and bottom makes them worse.
thnik like i do 640*025 movie to 16/9 video. do u understand???
i need a script that adds lines to top and bottom...
Ok, it's also possible to do the resizing and adding borders in TMPGEnc itself. But, I always forget how to do it properly:

(load the unlock template again ...)
Settings:
Advanced -> 1:1, and Center (custom size) -> select the size of your input clip (640x256 or whatever)
Video -> Aspect ratio 16:9 display, and Encode mode -> progressive.
GOP structure -> max 15 (18 for NTSC)

I don't recall how TMPGEnc resizing works though Perhaps other people can help and correct.
Wilbert is offline   Reply With Quote
Old 25th April 2005, 15:05   #14  |  Link
trevlac
budala
 
Join Date: Oct 2003
Location: U.S.
Posts: 545
@SoulSmasher

I am not 100% clear ... but here goes.

1st. You seem to say that you do not want to re-encode. Converting from mpeg4 to mpeg2 is certainlly a re-encode. Not sure what you want here.


On aspect ratios ....

1) Change the source by padding to get the AR you want
2) Resize this to your TV active picture frame size
3) Pad some more so you meet the dvd standard


1) Start with 640/256. You want 16/9 ratio. 640/16*9 = 360 .. 640/360

Code:
DirectShowSource("c:\myVid.avi")
AddBorders(0,52,0,52)

2) PAL is 702x576. Presumably you have progressive source, so a resize will not mess up the scan lines. You want to fill the PAL TV frame.
Code:
DirectShowSource("c:\myVid.avi")
AddBorders(0,52,0,52)
LanczosResize(702, 576)

3) For a DVD 720x576 would be most standard. The xtra 18 are not overscan and don't even come out of a dvd player analog out.
Code:
DirectShowSource("c:\myVid.avi")
AddBorders(0,52,0,52)
LanczosResize(702, 576)
AddBorders(0,9,0,9)
-----------------------------
Some notes ....
- TV 16/9 will not look correct on a PC unless the pc resizes it
- I assume your encoder just sets the 16/9 flags and is not doing it's own resize
- You could probably get there with less steps ... but i wanted to be clear
trevlac is offline   Reply With Quote
Old 30th April 2005, 15:53   #15  |  Link
SoulSmasher
Registered User
 
Join Date: Jan 2005
Posts: 25
@trevlac and others
10x for the tip for the solution for pal, also i need to do this to a divx (or xvid i dont remember im not @ home)that is 23,976 fps and i need to re-encode it to ntsc 29,97 fps..
i use cce now it's so better than tmpgenc...
how can i do this (fps conversation)
does the script for avisynth i wrote below works fine???

ChangeFPS(29.97)
does this work,
or is there a other techinque that gives better solutions,
or is DGPulldown useful
or if theres a better solution, how can i do it???
10x for the tips, everyone....
__________________
Spirit... It's the hero's strength, the mother's restlince and the poor man's armor. It cannot be broken and it cannot be taken away.
This I must believe
Drizzt

Last edited by SoulSmasher; 30th April 2005 at 16:27.
SoulSmasher is offline   Reply With Quote
Old 3rd May 2005, 22:03   #16  |  Link
Richard Berg
developer wannabe
 
Richard Berg's Avatar
 
Join Date: Nov 2001
Location: Brooklyn, NY
Posts: 1,211
Moving to Usage...
Richard Berg is offline   Reply With Quote
Old 4th May 2005, 10:49   #17  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
ChangeFPS(29.97)

No

or is DGPulldown useful

Yes.

Encode at 23.976fps, and then run DGPulldown afterwards using the default 23.976->29.97 setting.
manono is offline   Reply With Quote
Old 4th May 2005, 14:26   #18  |  Link
SoulSmasher
Registered User
 
Join Date: Jan 2005
Posts: 25
10x for the tips everyone! i now do my encoding corectly witout anamorphic errors and desynchorisation...
__________________
Spirit... It's the hero's strength, the mother's restlince and the poor man's armor. It cannot be broken and it cannot be taken away.
This I must believe
Drizzt
SoulSmasher is offline   Reply With Quote
Reply


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 17:49.


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