Page 1 of 1

Stream Video with VLC ActiveX using C#

Posted: 30 Mar 2006 12:49
by Guest
Hello,
I would like to stream a video using the VLC activex with C#.
I'm developping under VS 2005 with .NET Framework 2.0.
I've seen examples of code and I succeeded to show the video using this MRL
string MRL = "dshow:// :dshow-vdev=\"Osprey-230 Video Device 1\" :dshow-adev=\"\" :dshow-size=\"640x480\"";
It's works fine.
But then, I would like to specify an output that's why I created these lines :
string[] options = new string[1];
options[0] = ":sout=#transcode{vcodec=mp4v,vb=512,scale=1}:duplicate{dst=std{access=udp,mux=ts,url=192.168.1.9:1234}}";
An then I wrote this line :
axVLCPlugin1.addTarget(MRL, options, VLCPlaylistMode.VLCPlayListInsert, 0);
When I play, I see the video of my acquisition in the ActiveX. But when i want to connect via an another VLC Player I don't have any answer of my player.
I think that the ActiveX dont' use my options array.

Thank you very much for your help.

Stéphane

Posted: 07 Apr 2006 11:56
by myangga
I'm looking for the same problem...

SOLUTION !!!!

Posted: 07 Apr 2006 13:55
by myangga
Man, I got solution !!!

In your options OBJECT, you specify :

Code: Select all

Citation: string[] options = new string[1];
but you have 2 options parameters !!!

Code: Select all

":sout=#transcode{vcodec=mp4v,vb=512,scale=1}:duplicate{dst=std{access=udp,mux=ts,url=192.168.1.9:1234}}";
so you have to specify

Code: Select all

string[] options = new string[2];
and it works !!!!

tell me if it's good for U too

Posted: 09 Apr 2006 20:58
by lopez.tuparles
It rules !
for example you can dowload this, made on my own. VLC ActiveX is not in the package you have to register it by your own.
http://lopez.tuparles.free.fr/vlc/cSharpvlc.zip


you can find example for both recording and streaming.
Let the Textbox "To record" empty to not record.
Streaming is for Freebox, so DON'T use it as it, it doesn't work because there isn't any Web Server. it only show the streaming Method and it works.

it's very basic just to help beginner like me.

Thanks to the forum for help. so i have a question: why can't i use VLC Active X without a form ?? :( :(

Posted: 09 Apr 2006 21:23
by Quovodis
Thanks to the forum for help. so i have a question: why can't i use VLC Active X without a form ??
with a recent nighly build or if you can wait for vlc-0.8.5-test3, you should be able to use the ActiveX control outside of a form