MJpegストリームを生成してVLCにストリームして再生しようとしています。 Mjpeg VLCとHTTPストリーミング
コード:VLCと、それは動作しませんが public void SendMultiPartData(String contentType, Func<byte[]> getData)
{
MemoryStream mem = null;
response.StatusCode = 200;
for (byte[] buffer = getData(); buffer != null && buffer.Length > 0; buffer = getData())
{
response.ContentType = "multipart/x-mixed-replace; boundary=--testboundary";
ASCIIEncoding ae = new ASCIIEncoding();
byte[] boundary = ae.GetBytes("\r\n--testboundary\r\nContent-Type: " + contentType + "\r\nContent-Length:" + buffer.Length + "\r\n\r\n");
mem = new MemoryStream(boundary);
mem.WriteTo(response.OutputStream);
mem = new MemoryStream(buffer);
mem.WriteTo(response.OutputStream);
response.OutputStream.Flush();
}
mem.Close();
listener.Close();
}
私はFirefoxでストリームをオープンしようとした場合には、全く問題ありません(VLCは読み続けるようだが、ビデオが表示されません)
私はVLCツーVLCストリーミングを盗聴してきた彼らが "application/octet-stream" HTTPヘッダーとして使用しているようだの代わりに、マルチパート/
任意のアイデアを、X-混合置き換えますか?
Response.Buffer = false;
Response.BufferOutput = false;
またはそれらのいくつかのバリエーション:事前に
TKS、 ホセ