ora*_*int 8 c# vlc video-streaming
我一直致力于使用C#开发视频流Web服务的解决方案.我正在使用Windows XP,最新版本的vlc 1.0.3通过LAN网络流式传输视频.但是,目前,我只能设法在自己的电脑上播放视频.现在的问题是我需要在Web服务中执行此流按钮.有没有人知道如何将其更改为Web方法?如何将此Web服务链接到html网页?
以下代码用于使用Windows应用程序流式传输视频.
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;
}
}
Run Code Online (Sandbox Code Playgroud)
----- 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}"
Run Code Online (Sandbox Code Playgroud)
任何回复将不胜感激.
谢谢!=)
VLC 是一个桌面应用程序。它不适合在服务器上使用。您确实想要一个流媒体服务器。对于网络,我建议将视频转码为 H264(使用 ffmpeg),然后通过 RTMP 服务器提供给 Adobe Flash 播放器,您可以将其嵌入网页中。服务器有很多选择,包括商业和免费。
您还可以简单地发布视频并使用 http 下载或一些伪造 http 流的实现。
开源:
FluorineFX http://fluinefx.com/
RubyIZUMI http://code.google.com/p/rubyizumi/
Kaltura http://osflash.org/kaltura
haxeVideo http://code.google.com/p/haxevideo
商业的:
Adobe Flash 媒体服务器 http://www.adobe.com/products/flashmediaserver/
Wowza http://www.wowzamedia.com
| 归档时间: |
|
| 查看次数: |
12960 次 |
| 最近记录: |