Git Product home page Git Product logo

videobox's Introduction

VideoBox demo

Involved functions

Frame splitter

Operations:

  • parses a video into a chunks of 25 frames per second (this is a default value, might be more or less)
  • uploads chunks to temporary bucket
  • sets up pre-signed URLs for pulling and pushing frames to the temporary bucket
  • sets up pre-signed URLs for deleting frames from the temporary bucket
  • sets up pre-signed URL for assembled video frame from frames chunk
  • triggers a set of object-detect function (number of functions can be calculated by dividing total number of frames to FPS)
  • triggers bucket-daemon a recursive function that will watch on temporary bucket until requirement match.

Deployment command:

fn routes create videobox /frame-splitter --image $FN_REGISTRY/frame-splitter:0.0.34 --format json --type async --timeout 3600 --idle-timeout 10 --memory 1000
fn routes config set videobox /frame-splitter NEXT_FUNC /object-detect

Object detection

Operations:

  • loops over a list of image URLs
  • downloads an image, does object detection and logo placement
  • puts an image back to store
  • triggers segment-assembler function

Deployment command:

fn routes create videobox /object-detect --image $FN_REGISTRY/object_detect:0.0.10 --format json --type async --timeout 3000 --idle-timeout 30 --memory 400
fn routes config set videobox /object_detect DETECT_PRECISION 0.4
fn routes config set videobox /object-detect NEXT_FUNC /segment-assembler

Segment assembler

Operations:

  • pulls images in parallel
  • creates a video capture
  • uploads a video capture to the temporary bucket
  • deletes frames from temporary bucket

Deployment command:

fn routes create videobox /segment-assembler --image $FN_REGISTRY/segment-assembler:0.0.20 --format json --type async --timeout 30 --idle-timeout 20 --memory 400

Bucket daemon

Experimental recursive function.

Operations:

  • watches the temporary bucket until requirement match
  • if requirement match, starts a segments-assembler function
  • quits with exit code 0

Deployment command:

fn routes create videobox /bucket-daemon --image $FN_REGISTRY/bucket-daemon:0.0.4 --format json --type async --timeout 50 --idle-timeout 10 --memory 256
fn routes config set videobox /bucket-daemon NEXT_FUNC /segments-assembler
fn routes config set videobox /bucket-daemon BACKOFF_TIME 5

Segments assembler

Operations:

  • reads video segments in parallel
  • reads frames from each video segment
  • writes frames back to original bucket with name prefix test-{temporary-bucket-name}

Deployment command:

fn routes create videobox /segments-assembler --image $FN_REGISTRY/segments-assembler:0.0.5 --format json --type async --timeout 3600 --idle-timeout 20 --memory 512
fn routes config set videobox /segments-assembler NEXT_FUNC /bucket-cleaner

Bucket cleaner

Operations:

  • deletes bucket and its content

Deployment command:

fn routes create videobox /bucket-cleaner --image $FN_REGISTRY/bucket-cleaner:0.0.4 --format json --type async --timeout 360 --idle-timeout 10 --memory 256

Deploy them all

fn -v deploy --all --registry `whoami`

videobox's People

Contributors

denismakogon avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

videobox's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.