[Lazarus] PasLibVLC based video player does not run on Linux...
Bo Berglund
bo.berglund at gmail.com
Tue Nov 21 17:25:39 CET 2023
On Tue, 21 Nov 2023 16:23:37 +0100 (CET), Michael Van Canneyt via lazarus
<lazarus at lists.lazarus-ide.org> wrote:
>
>
>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.
Thanks for responding! Much appreciated.
>I developed it on linux, so at least then it worked.
Do you mean lclVlc or PasLibVlc?
I saw your name concerning the lclVlc package and the pdf documentation but
another name (Robert Jedrzejczyk) is mentioned in the sources for PasLibVlc...
I have tried replacing PasLibVlc with LclVlc shipped with Lazarus but I am
missing a couple of items that I use during playback (varying play speed and
audio shift for lipsync), which PasLibVlc does expose.
And there is a curious animation of my progressbar when the video is jumped to a
new position so the playing moves instantly but the progressbar is slowly
reaching the actual position in about a second or so.
This is mostly an appearance problem when I jump with the location buttons I
have in my main application, but still looks strange.
This is done now in a small test application where I am testing all the VLC
calls used in the actual application I am porting but using LclVLC instead of
PasLibVlc.
When done there I will do the surgery on the main application itself.
>
>>
>> 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.
>
On the newest RPi4 running bookworm 64 bit:
$ apt policy libvlc-dev
libvlc-dev:
Installed: 1:3.0.20-0+rpt1+deb12u1
Candidate: 1:3.0.20-0+rpt1+deb12u1
Version table:
*** 1:3.0.20-0+rpt1+deb12u1 500
500 http://archive.raspberrypi.com/debian bookworm/main arm64 Packages
100 /var/lib/dpkg/status
3.0.20-0+deb12u1 500
500 http://deb.debian.org/debian-security bookworm-security/main arm64
Packages
3.0.18-2 500
500 http://deb.debian.org/debian bookworm/main arm64 Packages
And on the other running bullseye 32 bit:
$ apt policy libvlc-dev
libvlc-dev:
Installed: 1:3.0.20-0+rpt1+deb11u1
Candidate: 1:3.0.20-0+rpt1+deb11u1
Version table:
*** 1:3.0.20-0+rpt1+deb11u1 500
500 http://archive.raspberrypi.org/debian bullseye/main armhf Packages
100 /var/lib/dpkg/status
3.0.20-0+deb11u1+rpi1 500
500 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf
Packages
$ find /usr/lib -name libvlc.so
/usr/lib/arm-linux-gnueabihf/libvlc.so
>Make sure you have libvlc-dev installed on the rpi.
>This should install a symlink libvlc.so somewhere below /usr/lib
On the bullseye system:
$ find /usr/lib -name libvlc.so
/usr/lib/arm-linux-gnueabihf/libvlc.so
On the bookworm 64 system:
$ find /usr/lib -name libvlc.so
/usr/lib/aarch64-linux-gnu/libvlc.so
Are these locations that will let the application (or Lazaur/Fpc) find the
libraries?
What are the requirements for the executable's environment for it to find the
libvlc files?
And is it necessary for them to be there for the building process only or for
the end user's execution too?
--
Bo Berglund
Developer in Sweden
More information about the lazarus
mailing list