嵌入网站的 RTSP 到 HTTP MJPEG 转码

Man*_*uel 4 camera stream transcoding rtsp

我有一部可以显示 http MJPEG 流的手机,我想让它工作。我这里有一个摄像头,它只发送一个 RTSP 流,我可以用 vlc 将其转换为 http MJPEG 流,但我的手机需要将其嵌入到网站中。

像这样: http : //88.53.197.250/axis-cgi/mjpg/video.cgi?resolution=320x240但是vlc转码,只是发出裸http流。

有没有机会正确地嵌入这个,以便我可以在屏幕上显示它?我用谷歌搜索了很多,但找不到解决方案。

非常感谢

我想使用 Suse Linux 来做到这一点

Hok*_*sai 5

这是我使用 vlc 将 RTSP 转换为 MJPEG 的命令:

vlc.exe -vvv -Idummy hereYourVideoSource --sout #transcode{vcodec=MJPG,venc=ffmpeg{strict=1}}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8080/} --run-time= hereYourTimeOutValue vlc://quit;
Run Code Online (Sandbox Code Playgroud)

如果需要,更改hereYourVideoSource您的 RTSP 源并hereYourTimeOutValue启用处理超时。

在本示例中,我在 localhost 上使用端口 8080,您可以将其更改为另一个端口。获取这个 mjpeg 的请求应该是:

http://127.0.0.1:8080/
Run Code Online (Sandbox Code Playgroud)

或者:

http://localhost:8080/
Run Code Online (Sandbox Code Playgroud)

在 html 中,您可以使用img标签获取 mjpeg :

<img src="http://localhost:8080/" />
Run Code Online (Sandbox Code Playgroud)

希望能帮助到你。苏尔特。