Академический Документы
Профессиональный Документы
Культура Документы
TV SERVER
TV CLIENT
With the help of Video Lan Player we can easily stream video over a lan using c#.net.For
This Project You must do the following steps.
Step 1:
Install vlc player in your computer.For more information about vlc
player visit http://www.videolan.org/.
Step 2:
Just copy the libvlc.dll from the vlc installaling folder and paste it in
to the windows->system32 folder.
Step 3:
Create a class named LibVlc.cs.You will get the Source code of
LibVlc.cs from http://libvlc.blogspot.com/.
Step4:
Server Side
You design a form contain a picture box and a button.Just copy paste
the source code in the button click event.
private void button1_Click(object sender, EventArgs e)
{
try
{
LibVlc vlc = new LibVlc();
vlc.Initialize();
vlc.VideoOutput = pictureBox1;
vlc.PlaylistClear();
string[] Options=new string[] { ":sout=#duplicate{dst=display,dst=std
{access=udp,mux=ts,dst=224.100.0.1:1234}}" };
vlc.AddTarget("c:\\1.flv", Options);
vlc.Play();
}
catch (Exception e1)
{
MessageBox.Show(e1.ToString());
}
}
Step 5:
Client Side:
In client side we can play video from a stream produced by the
server.Design a form contain a picture box and a button.Just copy
paste the code in the button click event.
private void button1_Click(object sender, EventArgs e)
{
try
{
LibVlc vlc = new LibVlc();
vlc.Initialize();
vlc.VideoOutput = pictureBox1;
vlc.PlaylistClear();
string[] options =
{ ":sout=#duplicate{dst=display,dst=std{access=file,mux=asf,dst=\"F:\\My-Output-Video-
Filename.asf\"}}" };
vlc.AddTarget("udp://@224.100.0.1:1234", options);
vlc.Play();
}
catch (Exception e1)
{
MessageBox.Show(e1.ToString());
}
}
Code Explanation:
Server Side:
In server side first we create the object of the class LibVlc.cs created in step3.
Set the vlc.VideoOutput=our picture box name.
Sign In to Vote
I think this is the answer you are looking for: STREAM VIDEO OVER A LAN USING C#.NET , use libvlc.dll to
do it, detail steps as :
Step 1:
Install vlc player in your computer.For more information about vlc player
visit http://www.videolan.org/.
Step 2:
Just copy the libvlc.dll from the vlc installaling folder and paste it in to the windows-
>system32 folder.
Step 3:
Create a class named LibVlc.cs.You will get the Source code of LibVlc.cs from
http://libvlc.blogspot.com/
Step4:
Server Side
You design a form contain a picture box and a button.Just copy paste the source
code in the button click event.
Step 5:
Client Side:
In client side we can play video from a stream produced by the server.Design a
form contain a picture box and a button.Just copy paste the code in the button click
event.
And also this link would give you more information about How to stream webcam video with C#?