我有一个 rtsp 相机流,我使用 ffmpeg-server 将其转换为运动 jpeg 流。
ffmpeg-server 在 http://localhost:8090/still.jpg 和 http://localhost:8090/live.mjpg 下提供运动 jpeg 流
我想使用 lighttpd 代理此流,以便可以在 http://localhost:8080/live.mjpg 上使用它(注意端口更改)
我的 lighttpd 配置有一个代理条目,我可以获得 still.jpg 但不能获得 live.mjpg。
$HTTP["url"] =~ "(^/still.jpg)" {
proxy.server = ( "" => ("" => ( "host" => "localhost", "port" => 8090 )))
}
$HTTP["url"] =~ "(^/live.mjpg)" {
proxy.server = ( "" => ("" => ( "host" => "localhost", "port" => 8090 )))
}
我不确定,但我认为正在发生的事情是lighttpd正在接收请求并正确转发它,但是因为对后端的请求永远不会完成,所以响应永远不会转发给客户端。有没有办法让lighttpd 以可用的小块形式转发响应?
事实证明,您可以使用一个选项来传输响应数据。
server.stream-response-body = 2
https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_stream-response-bodyDetails