How to Live stream with HTML5, without Flash?

后端 未结 4 1139
半阙折子戏
半阙折子戏 2021-02-13 20:56

The Problem: I need my clients to be able to stream their webcam to my streaming server(for instance Wowza server). I am building my site in PHP. I have gone th

相关标签:
4条回答
  • 2021-02-13 21:08

    Using WebRTC for such a use case incurs a high computing cost on the server side and is a rather new technique, which means you should be using it if you know what you are doing.

    My suggestion would be to stick to Flash or MPEG-DASH instead - unless what you need must have a very low latency to it and you are fine with paying for it by smaller solution scales.

    0 讨论(0)
  • 2021-02-13 21:09

    You will basically need a server which has a pseudo WebRTC client integrated in it. WebRTC can get the stream but cannot start streaming until a PeerConnection is setup. You can try using various servers/gateways like Janus, Kurento, Licode, FreeSwitch, etc.

    Also MediaStream generate by WebRTC can be directly attached to an HTML5 <video> tag.

    0 讨论(0)
  • 2021-02-13 21:30

    Wowza does support what you need in order to become the other peer in your WebRTC scenario. From there you can redistribute the stream in whatever way media servers typically do.

    This feature is still in "Preview" mode and has some limitations, but does function for most cases. You can request access to this via https://www.wowza.com/products/capabilities/webrtc-streaming-software

    0 讨论(0)
  • 2021-02-13 21:34

    Unless I misunderstand, I think you're looking to stream video to your server (for distributing using "normal" live-streaming mechanisms), not using WebRTC to stream video from the server.

    If so, WebRTC will work, though you'll need a server-side implementation of a fairly full set of the WebRTC protocol including video decoding. These exist, but not in PHP directly of course. This would handle getting realtime audio and video from a client, without needing a plugin on the client, including bandwidth adaptation and error correction.

    Once the data is decoded on the server, you have a video+audio datastream you can feed to your live-streaming encoders to stream out.

    0 讨论(0)
提交回复
热议问题