Loading and playing AVIs under Linuxs

Linux specific forum
John Duchek
User
User
Posts: 83
Joined: Mon May 16, 2005 4:19 pm
Location: St. Louis, MO

Loading and playing AVIs under Linuxs

Post 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
John R. Duchek
St. Louis,MO
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

You can try with the movie lib, may be xine support that (not sure tough).
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post by walker »

It is working... (maybe you have to install the win32codecs)
John Duchek
User
User
Posts: 83
Joined: Mon May 16, 2005 4:19 pm
Location: St. Louis, MO

A snippit, please

Post 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
John R. Duchek
St. Louis,MO
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post 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
John Duchek
User
User
Posts: 83
Joined: Mon May 16, 2005 4:19 pm
Location: St. Louis, MO

Thank you.

Post 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
John R. Duchek
St. Louis,MO
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post by walker »

Hey... no problem... :D glad I could help....
Post Reply