[Lazarus] PasLibVLC based video player does not run on Linux...

Bo Berglund bo.berglund at gmail.com
Tue Nov 21 15:47:48 CET 2023


As I have written in other posts I am trying to port a video application from
Windows to Linux, specifically on Raspberry Pi4B with either bullseye or
bookworm operating systems.

The application runs very well on Windows and is based on PasLibVLC found here:
https://prog.olsztyn.pl/paslibvlc/

But I am not able to make it show videos on Linux..

So as a test I have now reverted to a demo application on this website in order
to minimize the possible problems:
http://lazplanet.blogspot.com/2018/01/how-to-make-simple-video-player-in.html

When I follow these instructions to create a test application on the RPi4B it
builds but when executed the video window does not appear and no video can be
played. Instead of a black player waiting for rthe file to play, there is a gray
background just like the player was not created at all.

If I copy the sources from RPi4B to my Windows10 PC and open the project in
Lazarus there (same version 2.2.6) it builds fine, and in this case it also
displays the video as expected. No problems there at all. Same sources.

So something is not working in the Linux environment and I don't understand
what. And whatever it is it does not generate any errors during compile/build on
Linux.

I *have* enabled the threading system in the project file by putting cthreads
into the uses clause as first item so it is not a thread initializatiuon
problem:

  {$IFDEF UNIX}
  cthreads,
  {$ENDIF}


Now I am wondering if it perhaps cannot find the VLC *libraries* that are
supposed to be available on a system with VLC installed. But I do not know how
thatr is supposed to work and I don't understand the code either.

All my Linux systems (with a GUI) can run VLC OK and display mp4 videos just
fine with the VLC player application.

But only on Windows10 is it working when using PasLibVlc in the test
application.

Any ideas?

-- 
Bo Berglund
Developer in Sweden



More information about the lazarus mailing list