libVLC in pb (Windows Only)

Share your advanced PureBasic knowledge/code with the community.
RSrole
User
User
Posts: 35
Joined: Fri Apr 29, 2022 8:27 pm

Re: libVLC in pb

Post by RSrole »

Thanks, you nailed it. No crashes now. The rest is up to me.
novablue
Enthusiast
Enthusiast
Posts: 165
Joined: Sun Nov 27, 2016 6:38 am

Re: libVLC in pb

Post by novablue »

Is it possible to play a video from memory instead from a file?
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: libVLC in pb

Post by infratec »

Yes, it is possible.

But you have to use the media api.

https://stackoverflow.com/questions/312 ... error-main
novablue
Enthusiast
Enthusiast
Posts: 165
Joined: Sun Nov 27, 2016 6:38 am

Re: libVLC in pb

Post by novablue »

infratec wrote: Sun May 22, 2022 1:54 pm Yes, it is possible.

But you have to use the media api.

https://stackoverflow.com/questions/312 ... error-main
Thank you but unfortunately a little too complex for me. It would be great if someone with the know-how could implement it for the use in Purebasic.
elfo116
User
User
Posts: 39
Joined: Sun Oct 12, 2008 9:50 am
Location: CADIZ

Re: libVLC in pb

Post by elfo116 »

Hello everyone, does anyone know how to change the playback speed of a video using libVLC?
StephanB
New User
New User
Posts: 1
Joined: Mon Sep 19, 2022 10:20 am

Re: libVLC in pb

Post by StephanB »

Hello,

is there a way to find out when the playback has finished?
I would then like to automatically close the VLC gadget.

Thanks
gregreen
User
User
Posts: 13
Joined: Fri Apr 21, 2023 7:26 pm

Re: libVLC in pb - learning...

Post by gregreen »

Tremendous help from Justin on the WMP, but I am now very interested in learning more about libVLC for pb. I am in way over my head, but very interested in learning as I have some ideas about playing video that seem possible with the libVLC architecture. Would the book by Martin Vinkel be helpful? There are no pb examples mentioned. I too would like to control speed and playback of multiple streams similar to a video wall but different. Also image overlays and experimenting with reverse playback (perhaps switching to a mp4 that was encoded in reverse? Ideally, I would like to create an Abacus type playback that was from the olden days if anyone remembers.

So much to learn... it is daunting and any guidance here would be supremely appreciated! Thank you all so much!
User avatar
Piero
Enthusiast
Enthusiast
Posts: 288
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: libVLC in pb

Post by Piero »

Did somebody say ffmpeg, ffplay (mplayer) handbrake, ocenaudio (audacity) shutter encoder and stuff? (these are just multimedia tips, often accessible via command-line)
gregreen
User
User
Posts: 13
Joined: Fri Apr 21, 2023 7:26 pm

Re: libVLC in pb

Post by gregreen »

Yes, ffmpeg is awesome but wouldn't know exactly how to implement with purebasic. VLClib so far is very interesting. I'll keep plugging away! Thanks for the tips Piero!
Love the forum. I have zillions of questions but I try to figure out on my own as much as I can before asking. There is so much to learn!
User avatar
Piero
Enthusiast
Enthusiast
Posts: 288
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: libVLC in pb

Post by Piero »

gregreen wrote: Fri May 19, 2023 10:26 pmffmpeg is awesome
I saw mplayer (older stuff) and ffplay ("part of" ffmpeg project...) used in open source projects (like subtitlers), and you can install full binaries or "linked to libraries" versions... so, in case of problems, see if you can use ffmpeg/ffplay libraries (I'm sure ppl here will help you, if it's possible…)
Anyway VLC reads almost anything in theory...
You are so right; there's so much stuff to learn... :)
User avatar
Rings
Moderator
Moderator
Posts: 1427
Joined: Sat Apr 26, 2003 1:11 am

Re: libVLC in pb

Post by Rings »

anyone did a port for linux ?
SPAMINATOR NR.1
ccode_new
User
User
Posts: 21
Joined: Sat Jul 30, 2022 10:39 am

Re: libVLC in pb (Windows Only)

Post by ccode_new »

Hi!

I've now tried "libvlc" to play videos.

The example from collectordave works very well, but you have to adapt the "vlc_createplayer" procedure for Linux or MacOS.

Code: Select all

CompilerSelect #PB_Compiler_OS
  CompilerCase #PB_OS_Windows
    libvlc_media_player_set_hwnd( \libvlc_media_player, hwnd)
  CompilerCase #PB_OS_MacOS
    libvlc_media_player_set_nsobject(\libvlc_media_player, hwnd)
  CompilerCase #PB_OS_Linux
    libvlc_media_player_set_xwindow(\libvlc_media_player, hwnd)
CompilerEndSelect
Patrice Terrier
User
User
Posts: 21
Joined: Sun Aug 10, 2003 11:45 am
Location: France
Contact:

Re: libVLC in pb (Windows Only)

Post by Patrice Terrier »

FFmpeg offers a direct alternative to VLC

I have written a complete FFmpeg encapsulation with WinDev, but this could be done with any programming language.
The link to the FFmpeg documentation is provided here
http://www.objreader.com/index.php?topic=358.0

And the TMDB version, using a specific 64-bit DLL written in C++ to query the Movie database from the internet.
http://www.objreader.com/index.php?topic=359.0
Patrice Terrier
objreader@gmail.com
http://www.objreader.com
Addon: WinLIFT (Skin Engine), GDImage (Graphic library), ObjReader (3D engine)
Post Reply