Page 1 of 1
Loading and playing AVIs under Linuxs
Posted: Sun Apr 08, 2007 2:09 pm
by John Duchek
I am trying to do an application that needs to load and work with AVI format movie files. The docs for PB 4.0 seem to say that just isn't supported. Is there a work around for this or will it be coming soon?
Thanks,
John
Posted: Sun Apr 08, 2007 7:12 pm
by Fred
You can try with the movie lib, may be xine support that (not sure tough).
Posted: Mon Apr 09, 2007 12:31 pm
by walker
It is working... (maybe you have to install the win32codecs)
A snippit, please
Posted: Sun May 06, 2007 2:21 pm
by John Duchek
Hey walker,
You say it is working...do you have a snippet to show me how to do it?
It would be greatly appreciated!
Also, I am trying to find if it is possible to use a python module under purebasic? There is one out called pyephem that does astronomical calcuations that I could really use.
John
Posted: Mon May 07, 2007 11:51 am
by walker
didn't know what doyou expect now... simply use the movie.pb example (from the windows version) and load an avi-file....
Code: Select all
;
; ------------------------------------------------------------
;
; PureBasic - Movie example file
;
; (c) 2001 - Fantaisie Software
;
; ------------------------------------------------------------
;
If InitMovie() = 0
MessageRequester("Error", "Can't initialize movie playback !", 0)
End
EndIf
MovieName$ = OpenFileRequester("Choose the movie to play", "/media/sda1/aufnahmen/", "Movie/Audio files|*.avi;*.mpg;*.asf;*.mp3;*.wav;*.wmf|All Files|*.*", 0)
If MovieName$
If LoadMovie(0, MovieName$)
; Delay(1000)
OpenWindow(0, 100, 150, MovieWidth(0), MovieHeight(0), "PureBasic - Movie",#PB_Window_SystemMenu)
; ResizeMovie(0, 0,0, MovieWidth(0), MovieHeight(0))
PlayMovie(0, WindowID(0))
Repeat
Until WaitWindowEvent(10) = #PB_Event_CloseWindow
Else
MessageRequester("Error", "Can't load the movie...", 0)
EndIf
EndIf
If it doesn't work, install the package
w32codecs
Thank you.
Posted: Mon May 07, 2007 4:47 pm
by John Duchek
That snippet basically works. It loads my files and displays. I appreciate it.
Sometimes a little push is what I need. Thanks again.
John
Posted: Mon May 07, 2007 10:51 pm
by walker
Hey... no problem...

glad I could help....