Skip to content

video processing

KimJeongChul edited this page Apr 26, 2019 · 3 revisions

Video Processing

Library : (boto3 / azure.functions, azure.storage.file / google.cloud.storage), time, uuid, cv2

  • aws : build your deployment package

aws-build-deployment-package -> opencv-python

  • google : requirements.txt
opencv-python
google-cloud-storage
  • azure : requirements.txt
az==0.1.0.dev1
azure-functions==1.0.0b3
azure-functions-worker==1.0.0b3
grpcio==1.14.2
grpcio-tools==1.14.2
protobuf==3.6.1
six==1.12.0
azure_storage_blob==1.0.0
azure-storage-file==1.0.0
cryptography==2.0
numpy
opencv-python

Workload Input: Video

Workload Output: Video

Lambda payload(test-event) example:

video file : SampleVideo_1280X720_10mb.mp4 or https://sample-videos.com/ download

{
    "input_bucket": [INPUT_BUCKET_NAME],
    "key": [VIDEO_FILE_NAME],
    "output_bucket": [OUTPUT_BUCKET_NAME],
}

or Storage service trigger example(AWS S3):

for record in event['Records']:
   bucket = record['s3']['bucket']['name']
   key = record['s3']['object']['key']

Lambda Output : latency

Clone this wiki locally