Skip to content

terbooter/LVK-thumbs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Live Video Kit Thumbs Demo

This microservice is part of Live Video Kit (LVK). LVK helps stream live video in RTMP format LVK consists of 3 parts:

  • LVK-server Based on nginx rtmp module
  • LVK-client Has two adobe flash files (publisher.swf and player.swf)
  • LVK-thumbs To make thumbnail for live streams

About

This microservice is used for uploading thumbnails from LVK-client (publisher).

LVK-thumbs consists of two parts:

  • Uploader (nodejs application)
  • Nginx

Usage

Call publisher API method from JS

takeScreenshot(uploadURL:String,
               jpgFile:String,
               token:String,
               width:int = 160,
               heigth:int = 120,
               customParam:String = null)

to make thumbnail from current publisher video. After thumbnail uploaded publisher fire "thumb_uploaded" event. Call getStatus() method to get thumbnail URL

#How to build and start container

  • Clone this repo to /docker-data directory
  • Go to project dir cd /docker-data/LVK-thumbs/
  • Make file .dockerenv
  • Set SECRET param in .dockerenv file
  • Create file docker-compose.override.yml with following content:
nginx:
  ports:
     - "80:80"

and change exposed port if needed

  • docker-compose up -d
  • Check crossdomain URL /crossdomain.xml (need for flash player security policy) demo
  • Check /upload URL (have to show LVK thumbs server info) demo
  • Optional Set SERVICE_NAME variable in .dockerenv file to set unique service name
  environment:
    -  SERVICE_NAME=lvk_thumbs_0

GET params

publisher.swf sends 3 GET params:

  • jpgFile - имя загружаемого файла
  • token - md5(jpgFile + SECRET) SECRET - переменная окружения устанавливается в файле .dockerenv
  • customParam - зарезервировано для передачи дополнительного параметра

About

Part of Live Video Kit. For uploading video thumbnails

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published