Posted: Tue Aug 06, 2002 1:27 am
Restored from previous forum. Originally posted by Cloak.
Hi all,
I'm fearly new to pb, so this might be a dumb question, but here goes:
For my game i am using DivX movies.
Now when i open a screen, and play the movie at it's original size, it works perfectly. But when i resize the movie (width=800, height is calculated to be in perspective) it is blocky and slow.
But when i try the movieplayer (dunno the author, it,s 3:24 ) and i doubleclick the titlebar (maximize the window) it resizes perfectly, and is all smooth.
How can i do this when i play the movie in a screen?
---messy code followes---
DefType.f
If InitMovie() = 0
MessageRequester("Error", "Can't initialize movie playback !", 0)
End
EndIf
;MovieName$ = OpenFileRequester("Choose the movie to play", "", "Movie/Audio files|*.avi;*.mpg;*.asf;*.mp3;*.wav|All Files|*.*", 0)
moviename$="d:\movies\evol-dmn.avi"
InitSprite()
InitKeyboard()
Result = OpenScreen(800, 600, 32, "Movie")
SetRefreshRate(60)
SetFrameRate(60)
If MovieName$
If LoadMovie(0, MovieName$)
mw=MovieWidth()
mh=MovieHeight()
new_width=799
scale.f = new_width / mw
new_height=mh*scale.f
starty=(600-new_height)/2
ResizeMovie(0,starty,new_width,new_height)
;ResizeMovie(0,0,800,mh)
PlayMovie(0, ScreenID())
Repeat
ExamineKeyboard()
x=KeyboardPushed(#PB_Key_Escape)
Delay(20)
Until x0
Else
MessageRequester("Error", "Can't load the movie...", 0)
EndIf
EndIf
---End of messy code---
The movie played here is not part of my game, but a DivX test.
I also code in blitz, and when i use the same resizer code, it is smooth.
Both PB and Blitz are using directshow..
PLEASE help me with this one...
Regards, Cloak.
Hi all,
I'm fearly new to pb, so this might be a dumb question, but here goes:
For my game i am using DivX movies.
Now when i open a screen, and play the movie at it's original size, it works perfectly. But when i resize the movie (width=800, height is calculated to be in perspective) it is blocky and slow.
But when i try the movieplayer (dunno the author, it,s 3:24 ) and i doubleclick the titlebar (maximize the window) it resizes perfectly, and is all smooth.
How can i do this when i play the movie in a screen?
---messy code followes---
DefType.f
If InitMovie() = 0
MessageRequester("Error", "Can't initialize movie playback !", 0)
End
EndIf
;MovieName$ = OpenFileRequester("Choose the movie to play", "", "Movie/Audio files|*.avi;*.mpg;*.asf;*.mp3;*.wav|All Files|*.*", 0)
moviename$="d:\movies\evol-dmn.avi"
InitSprite()
InitKeyboard()
Result = OpenScreen(800, 600, 32, "Movie")
SetRefreshRate(60)
SetFrameRate(60)
If MovieName$
If LoadMovie(0, MovieName$)
mw=MovieWidth()
mh=MovieHeight()
new_width=799
scale.f = new_width / mw
new_height=mh*scale.f
starty=(600-new_height)/2
ResizeMovie(0,starty,new_width,new_height)
;ResizeMovie(0,0,800,mh)
PlayMovie(0, ScreenID())
Repeat
ExamineKeyboard()
x=KeyboardPushed(#PB_Key_Escape)
Delay(20)
Until x0
Else
MessageRequester("Error", "Can't load the movie...", 0)
EndIf
EndIf
---End of messy code---
The movie played here is not part of my game, but a DivX test.
I also code in blitz, and when i use the same resizer code, it is smooth.
Both PB and Blitz are using directshow..
PLEASE help me with this one...
Regards, Cloak.