digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   DVD2SVCD: Mpeg-1 always outputs as 16:9 ? (http://www.digitalfaq.com/archives/encode/4659-dvd2svcd-mpeg-outputs.html)

ftin 07-22-2003 02:29 PM

DVD2SVCD: Mpeg-1 always outputs as 16:9 ?
 
Ive been using mpeg2 for a while now and have not had a problem like this.
I have just tried to make i low bitrate mpeg1 vcd and no matter what
resolution i use or whether i use gripfit or not the output always comes out 16:9 :? .It plays ok in power dvd but when i open it in vlc or zoom
player it is 16:9 ,no matter if i choose 4:3 or 16:9 add borders encode as 4:3.(With add borders.. in full screen it has big borders and a thin strip of video :x )

This was not a problem the last time i did vcd.

Anyone know why this is happening?

i have tried avisynth 2.08,2.51,2.52 all with the same result :cry:

(this is the same with avi's and dvd's)

jorel 07-22-2003 02:46 PM

ftin my friend,
seems that you have some adjusts wrong in gripfit.

post your script please.


:wink:

ftin 07-22-2003 03:15 PM

Hello again Jorel.

(Sorry i didn't explain my problem very well).

At first i thought just that,but then i tried the standard bicubic resize and its still the same.I have since uninstalled and reinstalled everything,so i have just the basic dvd2svcd settings at the moment.

I just tried the vcd template with a dvd but its still the same.

????????? :?

Avalon 07-22-2003 03:22 PM

Post Your script!!!!

It is the best way to find out whats wrong!!!!

This is the standard 2.52 script:

Quote:

## DLL Section ##
#
LoadPlugin("C:\Filters25\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\GripFit_YV12.dll")
LoadPlugin("C:\Filters25\STMedianFilter.dll")
LoadPlugin("C:\Filters25\asharp.dll")
LoadPlugin("C:\Filters25\unfilter.dll")
LoadPlugin("C:\Filters25\undot.dll")
#
####

## Defined Variables and Constants ##
#
MaxTreshold = 1.50
nf = 0 # Current frame.
#
####

## Main section and static filters ###
#
Mpeg2Source(" YOUR D2V SOURCE HERE")
#
undot()
Limiter()
asharp(1, 4)
GripCrop( YOUR GRIPCROP SOURCE HERE )
##It can be:
##For PAL: 352,288; 352,576; 480,576; 528,576; 544,576; 704,576; 720,576;

##For NTSC: 352,240; 352,480; 480,480; 528,480; 544,480; 704,480; 720,480;

##For example: GripCrop(704, 576, overscan=2, source_anamorphic=false)
## ^^ If You enter true it will get borders



GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.1))
#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= SwitchThreshold ? \
unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ) : \
TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")

#
#
#

GripBorders()
#LetterBox( Your_Values_Here ) # Depends on situation. Use MovieStacker!
Limiter()

#
#
## Functions ###

function fmin( int f1, int f2) {
return ( f1<f2 ) ? f1 : f2
}

#
####

jorel 07-22-2003 03:48 PM

@ avalon
this is the best script but can't be used in d2s without changes,you know!

@ftin

try this, give me cool results.
and remember:
all filters needed in "plugins" folder of avisynth 252 :!:

this is the last script with good changes from Phil
then i call as "AVISYNTH_Adaptative Philter"

[AVISYNTH_Adaptative Philter]
0=FieldDeinterlace()
1=nf=0
2=GripCrop(^TargetWidth,^TargetHeight+^BorderTop+^ BorderBottom,overscan=^overscan,source_anamorphic= ^source_ana,dest_anamorphic=^dest_ana)
3=GripSize(resizer="BiCubicResize")
4=Undot()
5=Asharp(1,4)
6=STMedianFilter(^S_FilterThreshHold,^S_EdgeThresh Hold,0,0)
7=MergeChroma(blur(^blur_chroma))
8=MergeLuma(blur(^blur_luma))
9=SwitchThreshold=(Width<=352)?4:(Width<=480)?3:2
10=ScriptClip("nf=round(YDifferenceToNext())"+chr( 13)+"nf>=SwitchThreshold?unfilter(-(fmin(nf*2,100)),-(fmin(nf*2,100))):TemporalCleaner(6+nf,11+nf)")
11=GripBorders()
12=function fmin(int f1,int f2){return(f1<f2)?f1:f2}
^overscan=1
^source_ana=false
^dest_ana=false
^S_FilterThreshHold=8
^S_EdgeThreshHold=32
^blur_chroma=1.58
^blur_luma=0.1

you know ftin,copy and paste like was wrote in old threads...

:wink:

ps:
if you dont need the FieldDeinterlace in the script,
just remove this line and change the numbers to:

0=nf=0
1=GripCrop
...etc,etc!

Avalon 07-22-2003 05:33 PM

Sorry here my one I used in my Guide:

Quote:

[AVISYNTH_MA Script (2.5.2)]
0=LoadPlugin(!Mpeg2Dec3.dll)
1=LoadPlugin(!StMedianfilter.dll)
2=LoadPlugin(!Asharp.dll)
3=LoadPlugin(!Undot.dll)
4=LoadPlugin(!Gripfit_preview.dll)
5=MaxTreshold=^max_threshold
6=scd_trigger=^scd_trigger
7=nf=0
8=undot()
9=Limiter()
10=asharp(2,4)
11=GripCrop(^Breite,^Hoehe,overscan=^overscan,source_anamorphi c=^source_ana)
12=GripSize(resizer="BicubicResize")
13=STMedianFilter(^stm1,^stm2,0,0)
14=MergeChroma(blur(^max_threshold))
15=MergeLuma(blur(0.2))
16=ScriptClip("nf=YDifferenceToNext()"+chr(13)+"nf >2.5 ? asharp(-(fmin((nf/30),1)),0):TemporalSoften(2,7,7,3,2)")
17=ScriptClip("nf >scd_trigger?asharp(-2,0):asharp(0,0)")
18=GripBorders()
19=Limiter()
20=function fmin(float f1,float f2){return(f1<f2)?f1:f2}
!Mpeg2Dec3.dll=C:\Filters25\MPEG2Dec3.dll
!StMedianfilter.dll=C:\Filters25\STMedianFilter.dl l
!Asharp.dll=C:\Filters25\asharp.dll
!Undot.dll=C:\Filters25\UnDot.dll
!Gripfit_preview.dll=C:\Filters25\GripFit_YV12.dll
^max_threshold=1.50
^scd_trigger=30
^Breite=704
^Hoehe=576
^overscan=0
^source_ana=true
^stm1=8
^stm2=32
?=
?asharp=
?f1=
Edit the one in the fatt letters like You wanted to do it...

:wink:

ftin 07-22-2003 06:57 PM

Yes Jorel that is what i was using for mpeg2 and it works fine. :wink:

BUT :!: as i said i have uninstalled and reinstalled everything and am using the standard dvd2svcd ini. So i am not using gripfit or any filters ,i am just using the standard bicubic resize.

here is the script that d2v uses for my mpeg1 352x288:

Import("C:\PROGRA~1\DVD2SVCD\Movie\RESAMP~1.AVS")
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg 2dec\MPEG2D~1.DLL")
AVISource("C:\DOCUME~1\Sam\Desktop\JHGKGH~1.AVI",F alse)
ConvertToYUY2()
AssumeFPS(25,1,True)
BicubicResize(352,160,0.0,0.6)
AddBorders(0,64,0,64)

This one doesn't work (comes out 16:9) STRETCHED

here is the script that d2v uses for my mpeg2 352x288:

Import("C:\PROGRA~1\DVD2SVCD\Movie\RESAMP~1.AVS")
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg 2dec\MPEG2D~1.DLL")
AVISource("C:\DOCUME~1\Sam\Desktop\JHGKGH~1.AVI",F alse)
ConvertToYUY2()
AssumeFPS(25,1,True)
BicubicResize(352,160,0.0,0.6)
AddBorders(0,64,0,64)

This one works (comes out 4:3)

Can you see my problem?


(i am only using an avi cause its quicker,the same thing happens if the source is dvd) :x

jorel 07-22-2003 08:51 PM

ftin,
what show in aspect radio under
conversion tab when you load your file :?:
d2s auto load the right aspect radio of the source...
:wink:

i have doubts about the script cos i don't encode avis...only vobs.
seems strange for me this values (352,160) and (0,64,0,64) :!:
how do you got this values?
:?

waiting for you my friend!
:wink:

Avalon 07-22-2003 11:30 PM

Yeah thats very strange!!!!

Quote:

Originally Posted by ftin
BicubicResize(352,160,0.0,0.6)

Try BicubicResize(352,240,0.0,0.6)

ftin 07-23-2003 02:54 AM

Avlon. My source is 640x272 so this (BicubicResize(352,160,0.0,0.6) )is not strange. If it is then why does it work in mpeg2.


My point it that all settings are the same ,just using mpeg1 and 2.
Mpeg1 doesnt work and mpeg2 does (every thing is exactly the same.

Jorel . I choose 16:9(add borders encode as 4:3)

i will do it again from a dvd later and post it here so it might be easier to understand.

Dialhot 07-23-2003 03:28 AM

Quote:

Originally Posted by Avalon
Yeah thats very strange!!!!

Quote:

Originally Posted by ftin
BicubicResize(352,160,0.0,0.6)

Try BicubicResize(352,240,0.0,0.6)

You definitely don't read ANYthing in the post you answer.

ftin has BicubicResize(352,160,0.0,0.6) AND AddBorders(0,64,0,64).

That gives a picture of 352 x (160+64+64 = 288) and that is EXACTLY what he wants to have.

This picture isn't 16:9, it is 4:3 with two black borders at top and
bottom and that is absolutly normal :!: :!: :!:

Avalon, I really suggest to you to stop thinking your guide are the
solution for everyone and try to think a little before answering. All
the threads in this forum where you give hints (to Thomas for
instance) are going to become very "funny" :!:

ftin 07-23-2003 11:43 AM

Ok here is a 16:9 dvd source:

(16:9(add borders encode as 4:3))

Import("C:\PROGRA~1\DVD2SVCD\Movie\RESAMP~1.AVS")
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg 2dec\MPEG2D~1.DLL")
mpeg2source("C:\PROGRA~1\DVD2SVCD\Movie\DVD2AV~1.D 2V")
BicubicResize(352,216,0.0,0.6)
AddBorders(0,36,0,36)

Mpeg2 is fine Mpeg1 is stretched 16:9 :x :x :x

If i open the d2v in movie stacker i get this:

LoadPlugin("C:\Program Files\Encoding\MovieStacker\Filters\MPEG2Dec.dll")

mpeg2source("C:\Program Files\DVD2SVCD\Movie\DVD2AVI_PROJECT_FILE.d2v")
BicubicResize(352, 224, 0, 0.6, 21, 0, 678, 576)
AddBorders(0, 32, 0, 32)

This works fine! (mpeg1 and 2)
Why is it different?

I must point out again that the dvd2svcd files are showing up 4:3 in power dvd but nothing else.

Dialhot 07-23-2003 03:57 PM

You said you used zoomplayer to see the video. an you tell me what is the aspect ration you set in it : Source aspect ratio; derived aspect ratio, fullscreen 4:3, Widescreen 16:9... something else ?

ftin 07-23-2003 04:37 PM

Source aspect ratio.

If i set it to 4:3 it has BIG black boarders and a very thin strip of video.
I also used vlc (VideoLan client) which also comes up with whatever the
source aspect ratio is.
The thing i realy dont understand is that it is fine in power dvd.
I have some old vcd's that i made and they are ok in all players.

???????

:x I'm on the verge of formating now!

Dialhot 07-23-2003 06:48 PM

You mean that when you change from "source aspect ratio" to "4:3", the picture change ?

That is not normal at all ! VCD pictures are already in 4:3 aspect ratio, so switching from one to the other has no effect.

Always in zoomplayer, what does say the dialog window "Playing informations" ?

(source width and height and playing width and height please).

Note: note that sometimes that is the codec that correct the aspect ratio ! As the codecs are different from MPEG2 and MPEG1, that is why you have diff between the two !

For instance, I'm just watching a MPEG2 SVCD video (res of the video 480/576). Zoomplay is set to "source aspect ratio" but the displayed picture is... 768*576 !

That is the codec (here LIGOS) that adapt the ratio because it has detected it is a SVCD.

jorel 07-23-2003 07:03 PM

:!:
zoomplayer is cool and i like it but
show wrong informations about aspect radio.
press "i' (informations) after play your video
and you see the wrong informations for
source width and source height.

:wink:

ftin 07-23-2003 07:23 PM

Sorry my last post was wrong.

when its set on source aspect ratio it is squashed with big black borders
and when i change it to 4:3 or fit to window it is fine.
but this still means the source is wrong.

Jorel: I clicked on information and it sais:
source width 522, source height 288. 8O

Maybe we are getting some where? or not :lol:

jorel 07-23-2003 07:59 PM

as i wrote ftin,
zoomplayer show wrong informations.

my skvcd (480x480) in zoomplayer informations show as:
source w&h=640x480
current w&h=400x300
aspect radio adjusted for "source aspect radio"

8O

Dialhot 07-23-2003 08:32 PM

As I told you Jorel, its not Zoomplayer that is wrong : your MPEG2 codec adapt the aspect ratio because it detects thats a SVCD and then display your square picture (480x480) with correct aspect ratio for a be wtached on a TV (so 4:3). That is why zoomplayer said the source is 640*480 : it receives a 640*480 picture from the decoder !

jorel 07-23-2003 08:41 PM

:)

thanks Phil, now i understand how it works.

8)


All times are GMT -5. The time now is 12:24 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.