Recent

Author Topic: Playing video without to install the player  (Read 3774 times)

WimVan

  • Jr. Member
  • **
  • Posts: 90
Playing video without to install the player
« on: July 19, 2025, 08:13:39 am »
Hello,
I'm use dto use VLC and concerned components and this is very good but
1) You have to install VLC as user before you can use it and this is something that I don't like.  So I'm searching for an alternative (which ses f.e. dll's).
2) When starting an video for the first time (I'm triggering it with PasLibVlcPlayer) there a long latency before I see the video (10 to 20 seconds).  Onde done, launching a second video to see runs quick.
So for the moment I was looking to other viedoplayers such as MPV, ....
I tried some of them and used the demo's to see how it works, but for MPV, using Tmpvplayer I can't find a way to use the  gui from mpv.  Anyone knows how activating events, properties from MPV ?  Of course I can use some buttons triggering events from the component, but I can't find how dispalying the controls from MPV when activated.

Thaddy

  • Hero Member
  • *****
  • Posts: 18363
  • Here stood a man who saw the Elbe and jumped it.
Re: Playing video without to install the player
« Reply #1 on: July 19, 2025, 02:19:36 pm »
If you really do not want to install vlc for whatever reason, then you made the wrong choice again:
Go for ffmpeg instead of the lesser known and less supported mpv.

Note any kind of video support requires quite substantial libraries of which ffmpeg is the "smallest"   O:-) and a world standard.

I have a library from Erik van Bilzen, though, that is 100% native Pascal and basm, and was published in DelphiMagazine over three issues more than a decade ago.
It is strict win32 only and requires some easy modifications for Lazarus.
It also only supports older encodings inside the container so not very useful anymore.
If you want I can attach the code. Because of its age it may very well be the smallest and is native code.
« Last Edit: July 19, 2025, 02:27:47 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

n7800

  • Hero Member
  • *****
  • Posts: 555
  • Lazarus IDE contributor
    • GitLab profile
Re: Playing video without to install the player
« Reply #2 on: July 19, 2025, 11:40:42 pm »
I wrote a player on paslibvlc a long time ago, and I am writing from memory:

1) Your application can be portable. Of course, it will have to include the (almost) entire VLC distribution in a subfolder (pay attention to the license terms). In code, just use "libvlc_dynamic_dll_init_with_path".

2) This is because of plugins. Every time it starts, it scans the folder. You need to run "vlc-cache-gen.exe <path>", where "<path>" is the path to the "plugins" folder (maybe need an absolute path). After that, the "plugins.dat" file (is about 300 KB) will appear in the "plugins" folder, and the launch will be instant.

d2010

  • Full Member
  • ***
  • Posts: 230
Re: Playing video without to install the player
« Reply #3 on: July 21, 2025, 08:29:17 am »
Hello,
2) When starting an video for the first time (I'm triggering it with PasLibVlcPlayer) there a long latency before I see the video (10 to 20 seconds).  Onde done, launching a second video to see runs quick.
So for the moment I was looking to other viedoplayers such as MPV, ....

Perhaps , WindowsDefernder do not like as yours.DLL.. In my computees, if if WindowsDefender do not like my attached .DLL; he  forced to me, to and I wait waint..  Please you rescan all your 'DLL with other antivirus, e.g. Bitdefender.

elkhalafy

  • Newbie
  • Posts: 4
Re: Playing video without to install the player
« Reply #4 on: July 25, 2025, 09:02:23 am »
I looking for Library like that, to play videos without depend on installation of media player


n7800

  • Hero Member
  • *****
  • Posts: 555
  • Lazarus IDE contributor
    • GitLab profile
Re: Playing video without to install the player
« Reply #5 on: July 25, 2025, 04:22:01 pm »
"VLC" is a library (libvlc.dll, libvlccore.dll and many DLLs for plugins). The VLC player itself (the player application) simply uses them, as your application can do.

In my old version, the VLC distribution was 160 MB, but the "cut" version for my player was about 100 MB.

Xenno

  • New Member
  • *
  • Posts: 12
Re: Playing video without to install the player
« Reply #6 on: July 29, 2025, 09:27:41 am »
For Windows, perhaps a video below can be an alternative:

"Creating a Video Player with Lazarus and Windows Media Player"
https://youtu.be/Jet_-AUvEwY?feature=shared
Lazarus 4.0, Windows 10

Pe3s

  • Hero Member
  • *****
  • Posts: 614
Re: Playing video without to install the player
« Reply #7 on: August 05, 2025, 06:48:28 pm »
A very cool component based on mpv
https://github.com/URUWorks/UW_MPVPlayer

elkhalafy

  • Newbie
  • Posts: 4
Re: Playing video without to install the player
« Reply #8 on: October 30, 2025, 05:33:46 pm »
A very cool component based on mpv
https://github.com/URUWorks/UW_MPVPlayer

Is there video tutorial to create app using it ?

n7800

  • Hero Member
  • *****
  • Posts: 555
  • Lazarus IDE contributor
    • GitLab profile
Re: Playing video without to install the player
« Reply #9 on: October 31, 2025, 01:01:09 am »
A very cool component based on mpv
https://github.com/URUWorks/UW_MPVPlayer

How is it better than VLC?

Xenno

  • New Member
  • *
  • Posts: 12
Re: Playing video without to install the player
« Reply #10 on: November 04, 2025, 04:43:57 am »
I made a small tutorial for using MPV with LibMPVDelphi as the interface:

Create a Video Player with Lazarus Using MPV Library
https://youtu.be/v2dtBNWHIN0?si=ZSjbYIowvUd5R1I_
Lazarus 4.0, Windows 10

Handoko

  • Hero Member
  • *****
  • Posts: 5488
  • My goal: build my own game engine using Lazarus
Re: Playing video without to install the player
« Reply #11 on: November 04, 2025, 05:32:56 pm »
Nice tutorial Mas Broto.

Thank you for sharing it.

Thaddy

  • Hero Member
  • *****
  • Posts: 18363
  • Here stood a man who saw the Elbe and jumped it.
Re: Playing video without to install the player
« Reply #12 on: November 04, 2025, 06:11:48 pm »
How is it better than VLC?
You are right: it isn't. But a nice effort nonetheless.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

Pe3s

  • Hero Member
  • *****
  • Posts: 614
Re: Playing video without to install the player
« Reply #13 on: November 12, 2025, 09:02:55 pm »
An example of use is included in the package with the component, in the demo folder.
I used it :)

 

TinyPortal © 2005-2018