Access and VLC, unable to play. (1 Viewer)

stevem9

New member
Local time
Today, 20:20
Joined
Aug 15, 2019
Messages
6
I'm trying to get VLC media player to work in Access 2016, I'm coverting an application from using media player to VLC (or at least trying to) and I cannot for the life of me get VLC to play anything.
I have added the VideoLAN VLC ActiveX plugin to the references.

I have created a test form with a VLC OLE Class VLC ActiveX Plugin and IE Web Plugin v2 and it shows fine on the form with their cone logo.

I have a button and a text box (the text box to show the output as I step through the code as you can see.

I can control every aspect of VLC with the code except I cannot make it play a video. It shows the correct number of items in the playlist, the correct item for currentItem as I step through but isPlaying is always false

I have tried the following code to try to make it work, I have a debug on on so I can step through line by line, it was built up as each version failed.
The play button on the control does nothing. I can make it full screen/control size and all other methods etc from "https://wiki.videolan.org/Documentation:WebPlugin/#Playlist_items_object[" work fine. All the test videos play fine when used in the player direct (from windows not Access)

There must be something simple I'm missing but I cannot for the life of me see what.... so....HELP PLEASE!

Private Sub LoadFn_B_Click()
Dim VLC_Player As VLCPlugin2
Set VLC_Player = Forms!form1!VLCPlugin20.Object
VLC_Player.PlayList.items.Clear

VLC_Player.PlayList.Add ("File:///G:\videos\test01.AVI")
VLC_Player.PlayList.Add ("File:///G:\videos\test01.mpg")
VLC_Player.PlayList.Add ("File:///G:\videos\test01.wmv")
VLC_Player.PlayList.Add ("File:///G:\videos\test01.mov")
VLC_Player.PlayList.Add ("File:///G:\videos\test01.ts")
VLC_Player.PlayList.Add ("File:///G:/videos/test01.AVI")
VLC_Player.PlayList.Add ("File:///G:/videos/\test01.mpg")
VLC_Player.PlayList.Add ("File:///G:/videos/test01.wmv")
VLC_Player.PlayList.Add ("File:///G:/videos/test01.mov")
VLC_Player.PlayList.Add ("File:///G:/videos/test01.ts")
VLC_Player.PlayList.Add ("G:\videos\test01.AVI")
VLC_Player.PlayList.Add ("G:\videos\test01.mpg")
VLC_Player.PlayList.Add ("G:\videos\test01.wmv")
VLC_Player.PlayList.Add ("G:\videos\test01.mov")
VLC_Player.PlayList.Add ("G:\videos\test01.ts")


VLC_Player.PlayList.playItem (1)
Me.TestInfo_T = VLC_Player.PlayList.items.Count & ", " & VLC_Player.PlayList.currentItem & ", " & VLC_Player.PlayList.isPlaying
VLC_Player.PlayList.playItem (2)
Me.TestInfo_T = VLC_Player.PlayList.items.Count & ", " & VLC_Player.PlayList.currentItem & ", " & VLC_Player.PlayList.isPlaying
VLC_Player.PlayList.play
Me.TestInfo_T = VLC_Player.PlayList.items.Count & ", " & VLC_Player.PlayList.currentItem & ", " & VLC_Player.PlayList.isPlaying
VLC_Player.PlayList.play
VLC_Player.PlayList.playItem (7)
Me.TestInfo_T = VLC_Player.PlayList.items.Count & ", " & VLC_Player.PlayList.currentItem & ", " & VLC_Player.PlayList.isPlaying
VLC_Player.PlayList.playItem (8)
Me.TestInfo_T = VLC_Player.PlayList.items.Count & ", " & VLC_Player.PlayList.currentItem & ", " & VLC_Player.PlayList.isPlaying

VLC_Player.PlayList.playItem (13)
Me.TestInfo_T = VLC_Player.PlayList.items.Count & ", " & VLC_Player.PlayList.currentItem & ", " & VLC_Player.PlayList.isPlaying
VLC_Player.PlayList.playItem (14)
Me.TestInfo_T = VLC_Player.PlayList.items.Count & ", " & VLC_Player.PlayList.currentItem & ", " & VLC_Player.PlayList.isPlaying

End Sub
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:20
Joined
May 7, 2009
Messages
19,169
there is a simple one, media player control.
search jukebox on this forum.
 

stevem9

New member
Local time
Today, 20:20
Joined
Aug 15, 2019
Messages
6
there is a simple one, media player control.
search jukebox on this forum.

Done so and have looked at all the results and cannot find any that refer to VLC Player so if you can point me in the right direction it would be a great help.

The application is already fully functional with Windows Media Player BTW and has been for some time but WMP is clunky (eg it will not allow proper control over play speeds) and keeps on needing its codecs updating as windows updates keep removing functionality (yes I have rolled back after something has disappeared and it has come back hence the need for change, for example uninstalling and re-installing Shark Codecs after a windows update to get certain files to play is not ideal.
 

stevem9

New member
Local time
Today, 20:20
Joined
Aug 15, 2019
Messages
6
Well Well, Windows and Office updated themselves last night and lo and behold it's working fine! Absolutely no idea what was going on but I can't fault it now. It has also confirmed the format "File:///G:\videos\test01.wmv".

Access however insists on now opening the code window in the top left of the top left screen and shrunk to a tiny size and restarts without saving if I try to save a form which is open but has changed code or controls - it saves fine if in design mode.

I have run SFC Scannow and there are no errors found so I'm going to roll back to last night's backup and see what happens
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:20
Joined
May 7, 2009
Messages
19,169
I experimented building a VLC form.
you need to add reference to Microsoft Office Xx.X object library (for the FileDialog). must have VLC installed.
 

Attachments

  • VLCplayer.zip
    42 KB · Views: 828

stevem9

New member
Local time
Today, 20:20
Joined
Aug 15, 2019
Messages
6
many thanks and very useful, the one thing I'm now trying to do is find the filepath\filename of the playing item and of all the files in the playlist. I'm sure I'll find it somewhere as I'm just starting with VLC being already very familiar with WMP.

On another note the restore of last night's backup once again rendered VLC unable to play anything, even re-installing the latest version did not help so out of interest I rolled back a month and would you believe it, this time VLC worked perfectly playing things from my form in Access. Restored last night again and again no playing, went back to this morning and all fine again. Weird. At some point if I get time I'll roll back and find out which update screwed it by manually installing them until it fails but this is just for my personal satisfaction as all is working now.
 

notallbad

New member
Local time
Today, 15:20
Joined
Feb 19, 2020
Messages
2
While I don't expect anyone to have a solution or suggestion, other than using Windows Media Player, but I have used VLC for some time on my desktop and enjoy the many extended features, hotkeys specifically. I have a Microsoft Access Database of video files and I am able to use VLC with the VLCPlugin2 object. I would like to be able to access the full capabilities or at least the speed control features of VLC in my MS Access forms.

Any Suggestions or solutions?
 

notallbad

New member
Local time
Today, 15:20
Joined
Feb 19, 2020
Messages
2
Nevermind, answered my own question.

Dim ab As Double
ab = player.input.Rate
Debug.Print ab
player.input.Rate = 3

The video speed increased.
 

Users who are viewing this thread

Top Bottom