问题
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