Stream Video with VLC ActiveX using C#

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
Guest

Stream Video with VLC ActiveX using C#

Postby Guest » 30 Mar 2006 12:49

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

myangga
Blank Cone
Blank Cone
Posts: 25
Joined: 03 Feb 2006 11:23
Location: Est

Postby myangga » 07 Apr 2006 11:56

I'm looking for the same problem...

myangga
Blank Cone
Blank Cone
Posts: 25
Joined: 03 Feb 2006 11:23
Location: Est

SOLUTION !!!!

Postby myangga » 07 Apr 2006 13:55

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

lopez.tuparles

Postby lopez.tuparles » 09 Apr 2006 20:58

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 ?? :( :(

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 09 Apr 2006 21:23

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


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 8 guests