Viewing and recording with videolan.interop
Posted: 19 Nov 2010 12:00
Hello,
I use videolan.interop from Fritivi (lastest git, merci Xilasz !) and when i try to recording and viewing dvb-t, the file is succesfully create but i haven't the display (and no sound).
the init :
And the code with the probleme
It' a winform program,the code below is in a module, and the variable Handle is the handle of a panel in a form.
I try diferent argument in
I use videolan.interop from Fritivi (lastest git, merci Xilasz !) and when i try to recording and viewing dvb-t, the file is succesfully create but i haven't the display (and no sound).
the init :
Code: Select all
Public Sub InitVlcPlayer(ByVal HandleVideo As IntPtr)
Dim osversion As Integer = System.Environment.OSVersion.Version.Major
Dim Render As String = ""
If osversion = 5 Then
Render = "Directx"
ElseIf osversion = 6 Then
Render = "Direct3d"
End If
Dim args() As String = {AppDomain.CurrentDomain.BaseDirectory, "--no-one-instance", "--no-loop", "--no-video-title-show", "--overlay", "--aout=matrix_directx", "--vout=" & Render}
vlc = New VideoLanClient(args)
vlcplayer = vlc.NewMediaPlayer()
Handle = HandleVideo
End Sub
Code: Select all
Public Sub Watch()
vlcplayer.Stop()
Dim Media As VlcMedia = vlc.NewMedia(dtSingleChannel.Rows(0).Item("Location").ToString) 'libvlc_media_new_location
If Not (dtSingleChannel.Rows(0).Item("Extension").ToString.Trim.Equals("")) Then
Dim SingleOption() As String = dtSingleChannel.Rows(0).Item("Extension").ToString.Split(CChar(":"))
For t As Integer = 1 To SingleOption.Count - 1
Media.AddOption(SingleOption(t)) ' libvlc_media_add_option
Next
End If
If desentrelacement <> Deinterlace.Off Then
Media.AddOption(String.Concat("deinterlace=", desentrelacement)) 'libvlc_media_add_option
Media.AddOption(String.Concat("filter-deinterlace-mode=", desentrelacementmode.ToString)) 'libvlc_media_add_option
End If
If recording And Not (RecordFileName.Equals("")) Then
Media.AddOption(String.Concat("sout=#duplicate{dst=display,dst=std{access=file,mux=ts,dst=""", RecordFileName, """ }}")) 'PROBLEM!!!!
End If
vlcplayer.Load(Media) 'libvlc_media_player_set_media
vlcplayer.Play(Handle) 'libvlc_media_player_set_hwnd , libvlc_media_player_play
End Sub
I try diferent argument in
But i have always the problemand i haven'y no idea to resolve it !Media.AddOption(String.Concat("sout=#duplicate{dst=display,dst=std{access=file,mux=ts,dst=""", RecordFileName, """ }}"))