How to proxy streaming video

We have a secure application on the Internet that you have to log into to use. We want to be able to display a video from a streaming media server via this application. The streaming media server is behind a firewall so I want my Rails app to proxy the stream to the user so that the stream is not available unless you log in.

I know I can use send_file to just show the video file, but I prefer to be able to use the streaming server so that the user does not have to wait for the file to download before it starts to play.

Any suggestions would be greatly appreciated.

Thanks

Void wrote:

We have a secure application on the Internet that you have to log into to use. We want to be able to display a video from a streaming media server via this application. The streaming media server is behind a firewall so I want my Rails app to proxy the stream to the user so that the stream is not available unless you log in.

I know I can use send_file to just show the video file, but I prefer to be able to use the streaming server so that the user does not have to wait for the file to download before it starts to play.

Any suggestions would be greatly appreciated.   

Hi,

If it helps, I believe most good video formats will fake streaming in a browser, I know flash does this ala YouTube. Also the DivX web player and quicktime do it.

HTH

Matt

Void wrote:

We have a secure application on the Internet that you have to log into to use. We want to be able to display a video from a streaming media server via this application. The streaming media server is behind a firewall so I want my Rails app to proxy the stream to the user so that the stream is not available unless you log in.

I know I can use send_file to just show the video file, but I prefer to be able to use the streaming server so that the user does not have to wait for the file to download before it starts to play.

You could do this by having the action read from a streaming Net::HTTP get, while writing the fragments to Rails' output buffer.

Have you also looked into adding a one-time authentication key to URLs passed to the streaming server?

Thanks Mark. Yes, my next step was to go with some kind of one-time authentication if I couldn't do the proxying.