lighttpd + mod_h264_streaming + fastcgi authorizer
Added by laughingbovine over 11 years ago
Hi, I'm having trouble setting up h264 streaming behind a fastcgi authorizer. I have an example set up here:
http://columbia.laughingbovine.com/
Go here to get access: http://columbia.laughingbovine.com/fake_cookie
And here to remove access: http://columbia.laughingbovine.com/kill_cookie
You'll see that after you get credentials, the "Secure" section loads, but the video does not seem to ever start. The video in the "Insecure" section is pseudo-streaming just fine.
I'm using: lighttpd/1.4.31
And I followed these instructions to set up mod_h264_streaming: http://h264.code-shop.com/trac/wiki/Mod-H264-Streaming-Lighttpd-Version2
Here's the relevant part of my lighttpd config:
fastcgi.server = (
"/fake_cookie" => ( "fake_cookie" => (
"socket" => "/Users/geoff/manual/lighttpd/build/lighttpd.fake_cookie.fcgi.sock",
"bin-path" => "/Users/geoff/manual/lighttpd/build/fcgi/fake_cookie.pl",
"check-local" => "disable"
)),
"/kill_cookie" => ( "kill_cookie" => (
"socket" => "/Users/geoff/manual/lighttpd/build/lighttpd.kill_cookie.fcgi.sock",
"bin-path" => "/Users/geoff/manual/lighttpd/build/fcgi/kill_cookie.pl",
"check-local" => "disable"
)),
"/authenticate" => ( "authenticate" => (
"socket" => "/Users/geoff/manual/lighttpd/build/lighttpd.authenticate.fcgi.sock",
"bin-path" => "/Users/geoff/manual/lighttpd/build/fcgi/authenticate.pl",
"check-local" => "disable"
)),
"/authorized/" => ( "gatekeeper" => (
"socket" => "/Users/geoff/manual/lighttpd/build/lighttpd.gatekeeper.fcgi.sock",
"mode" => "authorizer",
"bin-path" => "/Users/geoff/manual/lighttpd/build/fcgi/gatekeeper.pl",
"docroot" => "/Users/geoff/manual/lighttpd/build/host_authorized/",
"check-local" => "disable"
))
)
server.modules+=("mod_h264_streaming")
h264-streaming.extensions = ( ".mp4", ".f4v" )
h264-streaming.buffer-seconds = 10
Some more details...
I've written a JS wrapper to manage secured content, so looking at the page source might not give you the whole picture.
Everything that requires auth to view is beneath the "/authorized/" URL.
In my example, I have a insecure image and (streaming) video, and a secured image and (streaming) video.
You can access the secured image and video here (respectively): http://columbia.laughingbovine.com/authorized/img.jpg http://columbia.laughingbovine.com/authorized/long.mp4
With this secured video URL, even without the player as the middle-man, I'm getting hung up on loading it. Nothing in the error (or access) logs.
Disabling mod_h264_streaming makes everything work (except streaming, of course).
I've also posted this on the mod_h264 forums: http://h264.code-shop.com/trac/discussion/topic/302
Thanks.
Replies (1)
RE: lighttpd + mod_h264_streaming + fastcgi authorizer - Added by laughingbovine over 11 years ago
I did a dtruss and it looked like the (authorized) request for the video wasn't using the FastCGI Authorizer's "secure" document root, just the regular one.