0

I'm trying to stream video using gstreamer to html usign busybox in petalinux, within of a zynqmp based platform.

So the main idea is to stream a video pipeline into an embedded web server and open it from a external PC web browser (I'm using chrome).

The index.html file looks like that:

<!DOCTYPE html>
<html>
        <p> video test ! </p>

        <body>

                <video autoplay controls width=1280 height=1024>

  <source src="http://192.168.1.12:5000" type="video/mp4">

                        Your browser does not support the video tag.

                </video>

        </body>

</html>

And the testing pipeline is:

gst-launch-1.0 -v videotestsrc pattern=snow is-live=true ! video/x-raw,width=1280,height=1024 ! theoraenc ! oggmux ! tcpserversink host=192.168.1.12 port=5000

Also I tried to stream a video camera live from a C application like so:

appsrc -> queue -> omxh264 -> h264parser -> mp4mux (streamable=true fragment-duration = 100) -> queue -> tcpserversink (host=192.168.1.12 port=5000)

(Please note that the above line is a pseudo code to illustrate what the application is doing)

I'm expecting to see the video in the PC web browser but unfortunately I've got a grey box with the video controls instead.

Does anyone know if this would be possible using busybox? or is there something fundamentally wrong with this approach?

joe
  • 309
  • 4
  • 16
  • Similar to https://stackoverflow.com/questions/59272080/mjpeg-streaming-with-gstreamer-in-chrome – Florian Zwoch Dec 13 '19 at 15:13
  • yes similar, but not the same, in my case it doesn't work in any browsers (firefox and chrome) also uses Civetweb and gstreamer + opencv and I'm using busybox and gstreamer... – joe Dec 13 '19 at 16:06
  • Yes, you are even using a non stream-able container configuration. Edit, oh you selected streamable even. But the missing protocol is the same problem. – Florian Zwoch Dec 13 '19 at 16:14
  • Thanks for your reply, missing protocol? could you please elaborate? Also I forgot to add that in firefox I've got the message: "No video with supported format and MIME type found" – joe Dec 13 '19 at 16:28
  • The browser is doing a HTTP request `src="http://192.168.1.12:5000"`. However `tcpserversink` is a raw TCP connection offer. It does not do any other control flow like HTTP (e.g. it is not a web server). – Florian Zwoch Dec 13 '19 at 16:32
  • Right, what should I use then instead tcpserversink? is there any work around to get this to work? FYI I've just tried to run the same pipeline in the question (with Civetweb) you pointed earlier (gst-launch-1.0 -v videotestsrc ! videoconvert ! videoscale ! video/x-raw,width=1280,height=1024 ! clockoverlay shaded-background=true ! theoraenc ! oggmux ! tcpserversink host=192.168.1.12 port=5000) and it does work fine with firefox... – joe Dec 13 '19 at 16:49
  • Honestly I have no idea. There are so many ways, standards and browsers. You need to research on a codec and transmission method that fits you. Best bets imo are HLS and MPEG-DASH. They usually make use of yet another component - a web server to deliver files to the client. – Florian Zwoch Dec 13 '19 at 16:52

0 Answers0