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

Michael Van Canneyt michael at freepascal.org
Tue Nov 21 16:23:37 CET 2023



On Tue, 21 Nov 2023, Bo Berglund via lazarus wrote:

> 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 developed it on linux, so at least then it worked.

>
> 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.

Make sure you have libvlc-dev installed on the rpi.

This should install a symlink libvlc.so somewhere below /usr/lib

Michael.


More information about the lazarus mailing list