MJPEGStream显示流Aforge.Video.dll

时间:2012-05-30 20:33:39

标签: windows vb.net ip-camera aforge

我正在尝试使用Aforge库来传输IPCAM D'Link,但我没有成功: 我想将视频流显示到PB控件中。 我的代码:

Imports AForge.Video 
Public Class Form1
    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Try
            Dim stream As New MJPEGStream("http://190.6.198.3/video/mjpg.cgi")
            stream.Login() = "admin"
            stream.Password() = ""
            stream.Start()
        Catch ex As System.Net.WebException
            MsgBox(ex.Message.ToString)
        End Try
    End Sub
End Class

2 个答案:

答案 0 :(得分:1)

你有点混合MJPEGStream和控件

答案 1 :(得分:0)

Dim mjpegSource As New MJPEGStream("rtsp://192.0.0.64:554/cam[CHANNEL]/mjpeg")
        mjpegSource.Login = "admin"
        mjpegSource.Password = ""
    VideoSourcePlayer1.VideoSource = mjpegSource

错误是无法识别的网址前缀 这是我固定的方式 但vlc可以流式传输