Skip to content

Instantly share code, notes, and snippets.

@particle4dev
Last active January 19, 2018 19:30
Show Gist options
  • Select an option

  • Save particle4dev/c8bb2b6893e9d32228775bd95d4486d9 to your computer and use it in GitHub Desktop.

Select an option

Save particle4dev/c8bb2b6893e9d32228775bd95d4486d9 to your computer and use it in GitHub Desktop.
description keywords title
video call solution
video, call, p2p, webrtc, hls, rtmp
video call solution

Definition

  • HTTP Live Streaming (also known as HLS) is an HTTP-based media streaming communications protocol implemented by Apple Inc. as part of its QuickTime, Safari, OS X, and iOS software. It resembles MPEG-DASH in that it works by breaking the overall stream into a sequence of small HTTP-based file downloads, each download loading one short chunk of an overall potentially unbounded transport stream. As the stream is played, the client may select from a number of different alternate streams containing the same material encoded at a variety of data rates, allowing the streaming session to adapt to the available data rate. At the start of the streaming session, HLS downloads an extended M3U playlist containing the metadata for the various sub-streams which are available. link

  • Real-Time Messaging Protocol (RTMP) was initially a proprietary protocol developed by Macromedia for streaming audio, video and data over the Internet, between a Flash player and a server. Macromedia is now owned by Adobe, which has released an incomplete version of the specification of the protocol for public use. link

Problem ?

Stream video chia làm 2 loại:

  • Stream video: người dùng gửi request lên server, server đọc data từ storage và đẩy về cho client theo chunk

  • Live stream video: Camera record video cho người dùng, gửi data lên server. Server save lại data và đồng thời send data cho người cùng tham gia live stream.

Stream video solution

Lưu trữ video:

  • Opensource:

https://github.com/minio/minio

  • AWS:

https://aws.amazon.com/s3/

Truyền phát video (CDN):

  • Opensource

nginx: sử dụng HLS module

  • AWS

https://aws.amazon.com/cloudfront/

Live stream video solution:

  • WebRTC: peer to server, người dùng record video từ camera gửi lên server, server save lại đồng thời gửi data đến người cùng channel.

Opensource:

https://www.kurento.org/

what is kurento

  • rtmp: gửi vide thông qua giao thức rtmp, video được đẩy vào nginx sử lý. Người dùng muốn xem video truy cập http vào video được nginx sử lý và save.

Tutorial:

https://hackernoon.com/nginx-nginx-rtmp-module-ffmpeg-build-live-video-streaming-server-88a52f7bab6f

https://docs.peer5.com/guides/setting-up-hls-live-streaming-server-using-nginx/


  • AWS:

https://aws.amazon.com/digital-media/aws-elemental/

Conclude

Giải pháp open source

  • Sử dụng open source có thể dùng NGINX HLS cho phát video và RTMP cho việc live stream

  • WebRTC thì lên sử dụng kurento

Giải pháp AWS

  • Cần team triển khai biết về AWS

Một số giải pháp third party

<bổ xung>

Resource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment