I have been working on the solution to develop video streaming web services using C#. I am using Windows XP, with the latest version of vlc 1.0.3 to stream video over LAN network. However, currently, I could only manage to stream video on my own PC. Problem now is I need to perform this stream button in web services instead. Does anyone have any idea on how to change this to web method? How can I link this web services to a html webpage?
The following codes is use to stream a video using Windows Application.
private void btnStream_Click(object sender, EventArgs e) { // Create process and command to run file System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(@"C:\videotest.bat"); psi.RedirectStandardOutput = true; psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; psi.UseShellExecute = false; System.Diagnostics.Process listFiles; listFiles = System.Diagnostics.Process.Start(psi); System.IO.StreamReader myOutput = listFiles.StandardOutput; listFiles.WaitForExit(2000); if (listFiles.HasExited) { string output = myOutput.ReadToEnd(); //this.processResults.Text = output; } } ----- C:\videotest.bat ------
cd "C:\PROGRA~1\VideoLAN\VLC" vlc c:\alvinchipmunks.vob --sout "#transcode{vcodec=h264,vb=800,scale=1,acodec=mp4a,ab=128,channels=2,samplerate=44100}:duplicate{dst=std{access=udp,mux=ts,dst=152.226.238.64:1234},dst=std{access=udp,mux=ts,dst=152.226.238.59:1234},dst=display}" Any reply would be much appreciated.
Thanks! =)