Page 1 of 1

Movies on Lubuntu 22.10

Posted: Thu Sep 29, 2022 3:36 pm
by dmontaine
I am running lubuntu 22.10 beta. Movies do not play unless you run 'sudo apt install xine*'. Tested with sample avi and mp4 movies and both worked.

Installing xine is not listed in the INSTALL document.

I used the movie example program. I had to modify the program to include mp4 movies in the selection dialog.

Re: Movies on Lubuntu 22.10

Posted: Thu Sep 29, 2022 7:14 pm
by mk-soft

Re: Movies on Lubuntu 22.10

Posted: Fri Sep 30, 2022 6:53 pm
by dmontaine
Here is the example movie program with a different coding style. Tested on Lubuntu 22.10 beta with xine installed. Tested with the sample video files at https://file-examples.com/index.php/sample-video-files/.

Code: Select all

; --------------------------------------------------------
;
;   PureBasic - Movie example file
;
;   Original Code: (c) Fantaisie Software
;   Modifications: (c) Donald S Montaine
;---------------------------------------------------------

EnableExplicit

; --------------------------------------------------------
; INITIALIZE VARIABLES
;---------------------------------------------------------

ExamineDesktops()
Define DskWth.i       = DesktopWidth(0)
Define DskHgt.i       = DesktopHeight(0)
Define MovWth.i       = 960
Define MovHgt.i       = 540

Define FileListStr.s  = "Movie files|*.avi;*.mpg;*.mp4|All Files|*.*"
Define FileListCapn.s = "Choose the movie to play"
Define WinTitle.s     = "PureBasic - Movie"

Define ErrTitle.s     = "Error!"
Define ErrNoInit.s    = "Can't initialize movie playback !"
Define ErrNoLoad.s    = "Can't load the movie..."

Define MovieName.s    = ""

;---------------------------------------------------------
;MAIN PROGRAM
;---------------------------------------------------------

If InitMovie() = 0
    MessageRequester(ErrTitle, ErrNoInit, 0)
Else
    MovieName = OpenFileRequester(FileListCapn, "", FileListStr, 0)
    If MovieName
        If LoadMovie(0, MovieName)
            OpenWindow(0, (DskWth/2)-(MovWth/2),(DskHgt/2)-(MovHgt/2), MovWth, MovHgt, WinTitle)
            PlayMovie(0, WindowID(0))
            ResizeMovie(0,0,0,MovWth,MovHgt)
            Repeat
                ;wait until close window event
            Until WaitWindowEvent() = #PB_Event_CloseWindow
        Else
            MessageRequester(ErrTitle, ErrNoLoad, 0)
        EndIf
    EndIf
EndIf