Necessary libraries to PlayMovie()

Linux specific forum
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: PlayMovie() LinkerError

Post by heartbone »

Shardik wrote:So you installed three new libraries. Did you also install the library "mesa-vdpau-drivers"? Without the drivers from this library your observed behaviour is typical...

You should also check whether the library "libvdpau1" is installed. VDPAU (Video Decode and Presentation API for Unix) and its drivers from "mesa-vdpau-drivers" are essential together with the different libxine2 libraries to display videos using PB commands.

In order to help you further you should follow these steps:
- Start my example program from the PB IDE (to download one of the two videos into your /tmp folder) and terminate it.
- Start my example program from the console using the PB compiler (please change the path to your PB installation folder and the path where you saved my example program together with its name):
> export PUREBASIC_HOME=/home/shardik/PureBasic/5.31
> export PATH=$PUREBASIC_HOME/compilers:$PATH
> pbcompiler /home/shardik/Download+PlayMovie.pb

Now you should see error messages in your console which you should post in this thread and then I can try to help you further... :wink:
That was an embarrASSing public brain fart. :oops:
After I installed the "mesa-vdpau-drivers" library, the movie playback started working!
Thanks for your expert diagnosis Shardik, it is much appreciated.
Keep it BASIC.
User avatar
Shardik
Addict
Addict
Posts: 2058
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: PlayMovie() LinkerError

Post by Shardik »

heartbone wrote:After I installed the "mesa-vdpau-drivers" library, the movie playback started working!
I am glad it's now working for you... :)
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: PlayMovie() LinkerError

Post by Vera »

Shardik wrote:I am very sorry but I think that it will be very difficult if you are still running PB 4.51 on OpenSuSE 11.1 x86
I'm about to return to my now repaired PC and than doing that big step to PB 5.31, but trying to stick with Suse 11.2 if possible.

But to give some feedback.
Your updated test-code now also downloads the files for me. :D
Doing some researches it looked to me as if the libvdpau_r600 came with Suse 12 and dared not to install it. Checking xine again, I found the devel-packages were missing and installed those.
And that was successful in the way that the linker errors don't apear anymore and your code now fully runs for me. With mpg LoadMovie fails, but avi is loaded ... only it wouldn't play and just display an artefact picture.

But playing sound via Movie does work now ;-) ... and with that a further punching-contribution.

Hoping to be likewise successfull with PlaySound I installed all missing SDL-dev packages, but that didn't work out.

And while looking for further hints I crossed another thread where you already helped uwekel to figure out which libraries would be needed on Fedora 19 to PlayMovie which is worth redarding:
- Movie example does not work on Linux

Thanks for your proposal - I merged it with mine.

and congrats to Mr heartbone :D

cheers ~ Vera
John Duchek
User
User
Posts: 83
Joined: Mon May 16, 2005 4:19 pm
Location: St. Louis, MO

Re: Necessary libraries to PlayMovie()

Post by John Duchek »

This stream addresses long standing problems I have seen with pure under linux. I am running Fedora 21 64 bit. As I read through here I am trying to install various codecs and programs to get linux to play video properly. As I do, I am noting a few things. On installing the gstreamer codecs in fedora, they are separated into 'free' and non-free versions. The free versions are usually in the normal repository, but the non-free versions are in the rpmfusion-nonfree repository. If one hasn't installed the rpmfusion repositories, they are unavailable, and of course not installed. I am working on getting them all installed now.
Thanks,
John
John R. Duchek
St. Louis,MO
emm
New User
New User
Posts: 7
Joined: Tue Oct 18, 2022 7:47 pm

Re: Necessary libraries to PlayMovie()

Post by emm »

Hi

It's an old thread but as the issue experienced maybe related I post here.

GOAL: I try to play a mp4 video stored online

Environment:

I use ubuntu 22.04 on a 64 bit intel CPU on a PC. All videos play well on VLC and online.

I don't know how to install codecs on linux.
I searched online but found many 'solutions' which don't provide a way to test if they work as using VLC use its own codecs if I understand well.

I use PB 6.02 LTS free edition using this code:

Code: Select all

InitMovie()

file$ = "/home/manu/Downloads/1.mp4"

 -> *** If LoadMovie(0, file$)
  OpenWindow(0, #PB_Ignore, #PB_Ignore, MovieWidth(0), MovieHeight(0), "movietest")
  PlayMovie(0, WindowID(0))
  While MovieStatus(0) <= 0
    Delay(10)
  Wend
  Repeat
    Select WaitWindowEvent(100)
      Case #PB_Event_CloseWindow
        Break
      Case 0
        If Not MovieStatus(0)
          Break
        EndIf
    EndSelect  
  ForEver
EndIf
I traced the code and see it exits at the -> *** part.

I can play the file with VLC and the permission enable reading for the user running PB so I assume the loadMovie function exits due to not supporting the format.
The format is:

Image

I tried with avi file and mpeg file too and same issue.

The documentation of PB don't tell anything about Linux:
https://www.purebasic.com/documentation ... index.html

Image

Questions:

1- How could I list all the codecs installed on this linux version?
2- How to list all codecs supported by PB 6.02 LTS via code?
3- How to get more info from LoadMovie about the failure?

Thanks
User avatar
mk-soft
Always Here
Always Here
Posts: 6207
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Necessary libraries to PlayMovie()

Post by mk-soft »

Possibly a package or app is still missing

Simple Install of Purebasic ...
* Movie / Ubuntu
sudo apt install xine*

* Movie / Raspberry PI Desktop
sudo apt-get install libvlc-dev
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply