Streaming flv files in asp.net


















You can add any other parameter on the same way. Flash application would not start until visitor clicks on it. If you just place a cursor over a movie you'll see an ugly border. Common way to avoid need to click every time when page load is to initiate Flash player with JavaScript. JavaScript code for starting Flash movie could look like this:.

NET - Play a flv using asp. The issue is when I open another page or refresh this page you can no longer view the stream the stream is still being sent to the client fine. I think it is due to something missing from the start of the stream but I am not sure what to do. Any pointers would be greatly appreciated.

Most file formats are structured, especially video formats. They contain frames i. You should be really lucky if you manage to hit a specific frame when you start streaming to the new subscriber. Hence when they start receiving the stream they cannot identify the format as frame is partial. You can read more FLV frames in wikipedia article.

This is most likely your problem. A simple attempt would be to try to save the initial header that you receive from the streaming server when the first subscriber connects. Once done, pray that the receiver will ignore partial frames. If it doesn't you need to analyze the stream to identify where the next frame is. Finally, when a new client connects, do not start streaming until you know that the next frame arrives.

I'm not a expert in streaming, but looks like you should close stream then all data will be writed. BUT because the loop of subscribers need to transmit the stream for all subscribers simulatanly it get stucked by the await keyword. Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Public ; context. SetLastModified DateTime. Now ; context. AppendHeader "Content-Length" , length. Length ; fs. WriteLine ex. ToByte hexString. NET handler for streaming the video. But I also want to show a thumbnail splash image so that user can understand that the video is uploaded.

And on clicking the splash image, the ASP. NET handler will be called and the user can see the video using flawplayer. Generating a thumbnail image from the video file is very easy using ffmpeg. You might fail to upload large files as by default IIS supports content length up to bytes. You also need to set maxRequestLength in web. Suppose I support a maximum 2 GB size file in my site. My web. Now you can upload a maximum 2G file using Valum's upload control.

I have just copy pasted and used the same code in my handler. So when flowplayer requests to the server to get an flv file, the FLVStreaming handler will be called which will provide the flv file progressively.



0コメント

  • 1000 / 1000