Page 1 of 1

Can't get streaming to work in C#

Posted: 21 May 2009 14:10
by quambowambo
Hi,

I want to stream the content of the PictureBox of my Server application to the PictureBox of the Client application.
I'm using .net C# and I followed the example on http://csharpmagics.blogspot.com/.

But the pictureBox on the client remains empty. Here is my code:

Server:

Code: Select all

LibVlc.LibVlc vlc = new LibVlc.LibVlc(); vlc.Initialize(); vlc.VideoOutput = image; vlc.PlaylistClear(); string[] Options = new string[] { ":sout=#duplicate{dst=std {access=udp,mux=ts,dst=127.0.0.1:12345}}", null}; vlc.AddTarget("C:\\1.asf", Options); vlc.Play();
Client:

Code: Select all

LibVlc.LibVlc vlc = new LibVlc.LibVlc(); vlc.Initialize(); vlc.VideoOutput = pictureBox1; vlc.PlaylistClear(); string[] options = { ":sout=#duplicate{dst=display,dst=std{access=file,mux=asf,dst=\"C:\\1.asf"}}", null }; vlc.AddTarget("udp://@127.0.0.1:12345", options); vlc.Play();
I also tried the different C# wrappers found in the forum, but I couldn't figure out how to use them for my purpose.
Am I missing something? I'm not much of a good coder, but I really need to solve that issue for a little project of mine..

Could you post sample codes for the interop or the marx wrapper? Or at least a little clue? I'm kind of lost here.

Thanks in advance!

Re: Can't get streaming to work in C#

Posted: 05 Jun 2009 23:07
by tamiro44
Try without the 127.0.0.1