Friends doing video live, knowing that the current web-lived video live video lived video livelios is the HLS protocol and RTMP protocol. The mobile terminal needs to be relatively high transmission requirements, so the HLS transmission is mainly, and the PC terminal is more focused on video real-time transmission. Therefore, it is mainly RTMP.
For HTML5 live broadcast, the live stream is generally divided into three parts:
- Video Acquisition: This part is divided into PC terminals and mobile phones, including audio and video input devices on your computer, such as camera recording, mobile phone camera microphones, etc., due to mobile live teams, main collection or mobile terminal Mobile video is main.
- Live stream video server: That is, the video streaming media server we speak, collect video streams (H264 / ACC encoding) transmitted by video recording, transcoding through streaming media, and outputs RTMP / HLS format video to video playback end.
- Video broadcast: Generally in the computer, we TSINGSEE peel video is more VLC player, in addition to our own EasyPlayer player, mobile phone player includes Native player, and H5 video label, etc. And is currently based on the Native player of the mobile phone.
For H5 video recording, powerful WebRTC technology can be used. WebRTC we also introduced before, a technology that supports web browsers for real-time voice dialogue or video conversations, is that only on the PC’s Chrome is better, the mobile support is not ideal. At present, TSINGSEE Green Video World Video Service Platform supports webRTC video streaming, you can understand.
Recording video basic processes using WebRTC:
1 Call Window.navigator.WebkitgetUserMedia Get the user’s PC camera video data.
2 Convert the video stream data to Window.WebkitrtcpeerConnection (a video stream data format).
3 Transfer video stream data to the server using WebSCOKET.
H5 playing video also requires us to further break through, first of all, playing HLS video when playing HLS video, the Server side can do a sharper policy, put the TS file on the CDN, the front end can try to do DNS cache, in addition, for It can better implement real-time interaction, or use the RTMP protocol, play by video.js, such as Tsingsee Green Video EasyPlayer.js player.