Giter Site home page Giter Site logo

amazon-kinesis-video-streams-time-lapse-video-example's Introduction

Amazon Kinesis Video Streams - Time Lapse Video Generation Sample

This is a sample code to generate time-lapse video from Amazon Kinesis Video Streams.

Prerequisite

  • Python 3.6 or above
  • opencv-python 4.5 or above
  • boto3 1.22.7 or above
  • A stream of Kinesis Video Streams with media ingested at that time

Python packages can be installed with pip3 install -r requirements.txt.

If you are not familiar with Kinesis Video Streams, you can learn how it works. If you want to learn how to ingest media into Kinesis Video Streams, you can use Producer libraries.

If you haven't configured AWS credentials for boto3, please follow the instructions.

Usage

usage: main.py [-h] --stream-name STREAM_NAME --start-time START_TIME --end-time END_TIME
               [--duration DURATION] [--framerate FRAMERATE] [--width WIDTH] [--height HEIGHT] --output-path OUTPUT_PATH

arguments:
  -h, --help                 show this help message and exit
  --stream-name STREAM_NAME  Kinesis Video Streams stream name
  --start-time START_TIME    ISO format timestamp
  --end-time END_TIME        ISO format timestamp
  --duration DURATION        duration seconds of output video
  --framerate FRAMERATE      framerate of output video
  --width WIDTH              width of output video
  --height HEIGHT            height of output video
  --output-path OUTPUT_PATH  path to write output video

Example

python3 main.py \
  --stream-name my-kvs-stream \
  --start-time 2022-01-01T00:00:00 \
  --end-time 2022-01-01T09:00:00 \
  --duration 3 \
  --width 1920 \
  --height 1080 \
  --output-path result.mp4

Example Output

result.mp4

How it works?

This sample uses GetImages API to extract images from a Kinesis Video stream. Extracted images are combined and written as a mp4 video using OpenCV.

Note

Please confirm Kinesis Video Streams pricing before using this sample. You will be charged for Kinesis Video Streams image generation depending on the number of images generated and its resolution.

Links

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

amazon-kinesis-video-streams-time-lapse-video-example's People

Contributors

amazon-auto avatar yuma-m avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

inoculate23

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.