使用lighttpd反向代理运动jpeg相机流

问题描述 投票:0回答:1

我有一个 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 ))) 
}
  • 确定 http://localhost:8090/still.jpg
  • 确定 http://localhost:8090/live.mjpeg
  • 确定 http://localhost:8080/still.jpg
  • 失败 http://localhost:8080/live.mjpeg

我不确定,但我认为正在发生的事情是lighttpd正在接收请求并正确转发它,但是因为对后端的请求永远不会完成,所以响应永远不会转发给客户端。有没有办法让lighttpd 以可用的小块形式转发响应?

streaming lighttpd mjpeg
1个回答
0
投票

事实证明,您可以使用一个选项来传输响应数据。

server.stream-response-body = 2

https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_stream-response-bodyDetails

© www.soinside.com 2019 - 2024. All rights reserved.