What version of VLC should one use? I tried it, it complained about not finding an entry point, then went into an infinite loop complaining it could not find the complaint message, not even the task manager would kill it. DLLs and plugins were in the folder of the compiled app ( plugins in their own folder ).
[quote=265483:@Sean Clancy]This here…
“Try adding a directory to the path environment variable rather than using system32”[/quote]
Follow the link I gave earlier: http://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/
I download the latest version of VLC Media Player, install it (or open the installer with 7-zip), and then grab the DLLs it installs.
Thanks. I’ll give it a more careful go. Thanks for your interface too.
I just tried here.
Opened “Show video sample.rbp” in Xojo 2016r1.
Copied a movie to desktop and renamed to test.mov (or change name or path in code)
The VLC version in /Applications is version 2.0.7.
I run project and video plays here. No problem.
Is that in windows or mac?
I tried Mac. Win should also work if bit count of app and libs match and libs are in right path.
I ran the app in windows 10.
i paused it at this line
If Not libvlc.IsAvailable Then Raise New PlatformNotSupportedException
as this is where it crashes when I don’t copy the dlls into the application libraries.
Then i stepped thru the code and single = nil and then the app just quits.
I even tried to compile it and add the dlls into the application library and it just doesn’t even run
I am quite desparate to use this as the window media player speed functinality sucks b a l l s
I tried it with Win10 and it works fine, Build the app and drop the 2 VLC DLLs and the VLC Plugin folder into the App folder.
Hey it works!!!
I dropped the plugin folder and the dlls into the same app that the compiled app is in!
How do I get this going for debugging. There’s a lot of great stuff in here that I can use in my software.
- what’s the special folder for the app folder (what is the syntax for that)
- I noticed that putting a method in the app (for copying the needed plugins to the right place) doesn’t get executed before the properties go looking for the dlls.
- Is it possible to put the dlls and plugins into a appdata folder of my choice and direct the app to reference those?
Oh - and changing the volume causes a crash
What kind of crash?
An exception of class libvlc.VLCException was not handled. The application must shut down.
Exception message: Volume percent is out of range (0-100)
Unfortunately that’s the extent of libvlc’s error logging so I can’t give much more info than that.
Is there a way to initialize VLC after the program runs.
The reason is I want to run (in a method in the app start folder) code to copy the 2 dlls and the plugin folder into the app directory so I can debug without jumping through hoops.
VLC isn’t initialized until it’s first used and all the declares are soft, so copying in App.Open should work fine.
I just tested and it worked:
//App.Open Sub Open() #If DebugBuild Then Dim SourceFolder As FolderItem = SpecialFolder.Desktop.Child("dlls") // folder containing dlls Dim vlcdll, vlccoredll As FolderItem vlcdll = SourceFolder.Child("libvlc.dll") If vlcdll.Exists Then vlcdll.CopyFileTo(App.ExecutableFile.Parent) Else MsgBox("Can't find libvlc.dll") End If vlccoredll = SourceFolder.Child("libvlccore.dll") If vlccoredll.Exists Then vlccoredll.CopyFileTo(App.ExecutableFile.Parent) Else MsgBox("Can't find libvlccore.dll") End If Dim pluginsdir As FolderItem = SourceFolder.Child("plugins") If pluginsdir.Exists Then Dim tmpplugins As FolderItem = App.ExecutableFile.Parent.Child("plugins") tmpplugins.CreateAsFolder CopyFiles(pluginsdir, tmpplugins) Else MsgBox("Can't find plugins folder") End If #endif
//App.CopyFiles method Sub CopyFiles(SourceDir As FolderItem, DestDir As FolderItem) Dim count As Integer = SourceDir.Count For i As Integer = 1 To count Dim thisItem As FolderItem = SourceDir.Item(i) If thisItem.Directory Then Dim newdir As FolderItem = DestDir.Child(thisItem.Name) newdir.CreateAsFolder CopyFiles(thisItem, newdir) Else thisItem.CopyFileTo(DestDir) End If Next End Sub
Aha! I had just been doing the same thing.
I have about 15 tools in m app that I want to replace the windows media player with the VLC player.
Would I make a container control and plock this VLC player into it? (I don’t want the graphic or video - just the audio).
It would be invisible on my page - it would just provide the audio, volume, speed and position
what would be the best way to incorporate using this throughout my app?
Sorry for all the questions… I hope that with all this I cold construct a complete tutorial post about implementing VLC as a great media player inside Xojo (I did this with FFmeg with methods and shells)
Rock on Sean
[quote=267119:@Sean Clancy]Would I make a container control and plock this VLC player into it? (I don’t want the graphic or video - just the audio).
It would be invisible on my page - it would just provide the audio, volume, speed and position[/quote]
You can drop a VLCMediaPlayer control onto any window or containercontrol. The VLCMediaPlayer is a subclass of Canvas but by default doesn’t display anything at all so it’s invisible/transparent.
Ok - I just copied and pasted it from the libvlc app.
I am tracing through the code and trying to work out the easiest way to get something for VLC to play.
say I have f as a folderitem and it’s path is to a music file (like an mp3)
What’s the easiest way to load the music file into VLC?