Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help Wanted - How to configure vlcPlayer.LoadMedia() for a usb camera #261

Open
robZeilinga opened this issue Feb 12, 2018 · 2 comments
Open

Comments

@robZeilinga
Copy link

Hello - Can you please add an example to the getting started pages in the wiki to demonstrate how to start the VlcPlayer using a directShow input?

i.e. VlcPlayer.LoadMedia("DSHOW://", new string[] {":dshow - vdev = USB 2.0 PC Cam"});

many thanks
RobZ

@Estalhun
Copy link

Estalhun commented Jun 12, 2018

Try
Player.VlcMediaPlayer.Media?.Dispose()
Player.VlcMediaPlayer.Media = Player.VlcMediaPlayer.VlcInstance.CreateMediaFromLocation(myUri.ToString)
Player.VlcMediaPlayer.Media.AddOption(":dshow-adev=none")
Player.VlcMediaPlayer.Media.AddOption(":dshow-vdev=HD WebCam")
Player.VlcMediaPlayer.Media.AddOption(":dshow-aspect-ratio=4:3")
Player.VlcMediaPlayer.Media.ParseAsync()
Player.Play()

            If Player.VlcMediaPlayer.CanPlay = True Then
                myVLC_ok = True
            End If

Catch ex As Exception
MsgBox("Error")
End Try

@qinjianzhanqing
Copy link

同样遇到这个问题,求解答

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants