VLC to be my music player - who has made one? How to?

  1. ‹ Older
  2. 3 years ago

    Peter J

    is not verified 12 May 2016 KwaZulu-Natal, South Africa

    @Andrew L That means that the DLLs can't be located. I just tested with system32 and it failed to located the DLLs. Try adding a directory to the path environment variable rather than using system32, or run paused and copy into the build folder.

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

  3. Andrew L

    12 May 2016 San Francisco, CA, USA

    @Sean Clancy This here...
    "Try adding a directory to the path environment variable rather than using system32"

    Follow the link I gave earlier: http://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/

    @Peter J What version of VLC should one use?

    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.

  4. Peter J

    is not verified 12 May 2016 KwaZulu-Natal, South Africa

    Thanks. I'll give it a more careful go. Thanks for your interface too.

  5. Christian S

    12 May 2016 Pre-Release Testers, Xojo Pro, XDC Speakers Germany

    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.

  6. Sean C

    14 May 2016 New Zealand

    Is that in windows or mac?

  7. Christian S

    14 May 2016 Pre-Release Testers, Xojo Pro, XDC Speakers Germany

    I tried Mac. Win should also work if bit count of app and libs match and libs are in right path.

  8. Sean C

    16 May 2016 New Zealand

    When using libvlc, you need to put libvlc.dll, libvlccore.dll, and the plugins directory in the same directory as your executable file. I just copied them directly from VLC's install folder.

    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
    any ideas?

  9. Sean C

    16 May 2016 New Zealand
    Edited 3 years ago

    I am quite desparate to use this as the window media player speed functinality sucks b a l l s

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

  11. Sean C

    16 May 2016 New Zealand

    Hey it works!!!
    I dropped the plugin folder and the dlls into the same app that the compiled app is in!

    Now...
    How do I get this going for debugging. There's a lot of great stuff in here that I can use in my software.

    1. what's the special folder for the app folder (what is the syntax for that)
    2. 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.
    3. Is it possible to put the dlls and plugins into a appdata folder of my choice and direct the app to reference those?

    Cheers,
    Sean

  12. Sean C

    16 May 2016 New Zealand

    Oh - and changing the volume causes a crash

  13. Andrew L

    16 May 2016 San Francisco, CA, USA

    What kind of crash?

  14. Sean C

    17 May 2016 New Zealand

    An exception of class libvlc.VLCException was not handled. The application must shut down.

    Exception message: Volume percent is out of range (0-100)

  15. Andrew L

    17 May 2016 San Francisco, CA, USA
    Edited 3 years ago

    That means that the call to libvlc_audio_set_volume returned -1 .

    Unfortunately that's the extent of libvlc's error logging so I can't give much more info than that.

  16. Sean C

    19 May 2016 New Zealand
    Edited 3 years ago

    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.

  17. Andrew L

    19 May 2016 San Francisco, CA, USA

    VLC isn't initialized until it's first used and all the declares are soft, so copying in App.Open should work fine.

  18. Andrew L

    19 May 2016 San Francisco, CA, USA

    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
  19. Sean C

    19 May 2016 New Zealand

    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

  20. Andrew L

    19 May 2016 San Francisco, CA, USA

    @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

    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.

  21. Sean C

    19 May 2016 New Zealand

    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?

  22. Newer ›

or Sign Up to reply!