Skip to content

Video Pipeline Design

Shun-Yun Hu edited this page Nov 4, 2015 · 8 revisions

Data Flow

2015-10-30 Discussions with MC & BlueT

liveview (IPcam):

1v. rtsp -> KMS -> client (as VP8) HD ~ 4 channels 1920x1080

2o. rtsp -> KMS -> client (as VP8) LD ~ 16 channels? 320x160 (1/36)

  1. rtsp -> ffmpeg -> node.js WebRTC server -> browser (avoid KMS altogether)

liveview (DVR)

1v. DVR -> connector -> ffmpeg -> FIFO -> KMS -> client

  1. DVR -> connector -> FIFO -> KMS -> client

3o. DVR -> connector -> KMS -> client (SW: connector to serve rtsp/rtmp/rtp) (Kurento: KMS using socket as source?)

  1. DVR -> video receiver -> browser (serve RTMP streams for lower overhead)

  2. DVR -> video receiver -> ffmpeg -> browser (similar to IPcam)

record (IPcam):

1v. rtsp -> KMS -> files (as .webm)

2o. rtsp -> ffmpeg -> files (as .mp4) (MC: 1. needs to close manually 2. improve stability)

  1. rtsp -> KMS -> files (as .mp4) (Kurento: 1. record stream as mp4, 2. detect disconnect)

record (DVR):

  1. DVR -> connector -> ffmpeg -> KMS -> files (as .webm)

2o. DVR -> connector -> ffmpeg -> files (as .mp4) (MC: ts -> mp4) see: http://stackoverflow.com/questions/11762464/what-is-difference-between-mp4-and-mpegts

playback:

1v. files -> client (as .webm, via video tag) Firefox & Chorme ok (pause/forward ok)

2v. files -> client (as .mp4, via video tag) Chrome ok (pause/forward ok)

3v. files -> KMS -> client (as VP8 streaming, Kurento: pause, forward, progress bar)

**ask Kurento for help: **

  1. KMS using socket as source? take ts as input? [not possible]
  2. record stream as mp4 (H264 high profile) [done]
  3. output switchable by flag (VP8 & H264 both outputable)
  4. detect source disconnect
  5. why file playback Chorme ok, webrtc firefox ok?

BlueT's feedback:

  1. not all IPcam can have two streams (hi & low-res) need to confirm with GKB

  2. cannot playback while still recording

  3. need to download whole thing before playback ("time seek" may not be supported) (SY: how current websites do it?) need to store video index? need to explore current tag, or video.js functions

  4. recorded segment may not match file segments (hack into HTTP streaming protocol?)

  5. can KMS help to play certain "time period" from a group of video files?

  6. connector is already heavily loaded

    • stream server need to be separated
    • connector written in C/C++
    • better handling of DVR output streams? (ask Deeplet on demultiplex rules)
    • ffmpeg can be removed / optmized

to-investigate:

  1. need to confirm with GKB IPcam can support hi & low-res streams concurrently

  2. receiver de-multiplex DVR channels -> socket feed to KMS? (KMS receive ts raw data via socket?)

  3. if recorded in 30min segments, can we play it?

    • do not need to fully download
    • can time-seek to 29:50
    • watch a recording session across different actual files
  4. can .ts file (DVR output) be converted to .mp4 format easily?

  5. can DVR video receiver output rtsp or rtmp streams? live555 can take .ts to rtsp/rtp

  6. can Firefox + DASH + TS + H264 work? (DVR) ref: http://castlabs.com/products/dash-everywhere/

Clone this wiki locally