Page 1 of 1

activex vb

Posted: 14 Apr 2006 01:37
by balm
I'm trying to record a streaming video to a file but vb is complaining, here is my partial code:

Code: Select all

dim opt(1) as string opt(0) = ":sout=#transcode{vcodec=mp4v,vb=1024,scale=1}:duplicate{dst=display,dst=std{access=file,mux=asf,url=" & chr$(34) & "C:\V1.asf" & chr$(34) & "}}" vlcplugin1.addtarget "http://192.168.1.100/video/stream.asf",opt(0),vlcplaylistinsert,0
vb is saying invalid procedure call or argument. I have double and tripple check the argument but I don't see anything bad.

Thanks
balm

Posted: 14 Apr 2006 02:53
by tonsofpcs
Pass opt instead of opt(0). if that doesn't work,

Code: Select all

dim opt as variant opt = array(":sout=#transcode{vcodec=mp4v,vb=1024,scale=1}:duplicate{dst=display,dst=std{access=file,mux=asf,url=" & chr$(34) & "C:\V1.asf" & chr$(34) & "}}","")
Also, try the actual value instead of the enum value. vlcplaylistinsert = 1 (see http://wiki.videolan.org/index.php/VLCPlaylistMode for them all)

Vb samples

Posted: 14 Apr 2006 20:54
by barthk
I'm a newbie at VLC activex usage. I think someone should post a vb6 project with all required features included. I see delphi and ie docs at wiki but no vb6 or C# or even C++. I know it can be implemented with ref to IE sample but look at the amount of posting here with regards to VB.

Posted: 16 Apr 2006 00:18
by lopez.tuparles
You have a sample here

http://lopez.tuparles.free.fr/vlc/cSharpvlc.zip
but it's c#

Posted: 16 Apr 2006 01:09
by lopez.tuparles
i just put an old vb sample, i hope it's basic but it should work too.

Posted: 16 Apr 2006 01:17
by lopez.tuparles
Well i do have to register to edit my post :wink:

in opt you ought to separate each array stream. each string in array is a command.

Code: Select all

dim opt() as variant opt() = array(":sout=#transcode{vcodec=mp4v,vb=1024,scale=1}", ":duplicate{dst=display,dst=std{access=file,mux=asf,url=" & chr$(34) & "C:\V1.asf" & chr$(34) & "}}")
it works for me, I hope as well for you.

Promise next post i register