MJPEG streaming with GStreamer in Chrome

若如初见. 提交于 2020-01-25 10:20:08

问题


I have an image processing application that runs on an embedded device using OpenCV. To display the results I'm using Civetweb to host a web page and stream the result of my application through OpenCV videowriter (which hooks onto GStreamer).

To replicate my issues you can use the following snippets

gst-launch-1.0 \
        videotestsrc \
        ! videoconvert ! videoscale ! video/x-raw,width=320,height=240 \
        ! clockoverlay shaded-background=true \
        ! theoraenc ! oggmux ! tcpserversink host=127.0.0.1 port=8080
<!DOCTYPE html>
<html>
        <head>
                <title>demo</title>
        </head>
        <body>
                <video width=320 height=240 autoplay>
                        <source src="http://localhost:8080">
                </video>
        </body>
</html>

Hosting the webpage with your preferred server.

Firefox displays everything ok, Chrome throws a GET http://localhost:8080/ net::ERR_INVALID_HTTP_RESPONSE

  • Chrome version used: 77.0.3865.120, 78.0.3904.97
  • Firefix version used: 70.0.1
  • OS: Ubuntu Linux 16.04, 18.04

What could be the issue here?

来源:https://stackoverflow.com/questions/59272080/mjpeg-streaming-with-gstreamer-in-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!