Skip to main content

A customer loader for getting the video first frame from s3 compatible storage

Project description

Thumbor AWS

Join the chat at https://gitter.im/thumbor-community/aws

Circle CI

Installation

    pip install tc_aws_video

Authentication

Authentication is handled by botocore, see Boto3 documentation.

Origin story

If you store the images or videos in s3 compatible storage , such as aws , minio etc.

And now, you want to access the images or the first frame of the videos on it.

This is a custom loader will help you to do this!

Features

version loader python version change log desc
v1.0.2 tc_aws_video.s3_video_loader python2 Add feature to cut the first frame of video
v1.1.2 tc_aws_video.loaders.s3_video_loader python2 Optimize code to speed up loading
v2.0.1 tc_aws_video.loaders.s3_video_loader python3+ Optimize code to speed up loading

Additional Configuration values used:

# Reuse tc_aws configs 
# If you have credentials in ~/.aws/credentials , 
# then you can ignore TC_AWS_LOADER_ACCESS_KEY and TC_AWS_LOADER_SECRET_KEY
TC_AWS_REGION='your-s3-region'
TC_AWS_ENDPOINT='your-s3-endpoint'
TC_AWS_LOADER_ACCESS_KEY='your-s3-accesskey'
TC_AWS_LOADER_SECRET_KEY='your-s3-secret'

# Customize the temp storage for first frame of video
# The loader will delete the temp file while it read it into memory
TC_AWS_LOADER_VIDEO_FRAME_CACHE='/path/to/your/cache'

# Enable this loader

# When using v1.0.2
# LOADER = 'tc_aws_video.s3_video_loader'

# When using v1.1.2+
LOADER = 'tc_aws_video.loaders.s3_video_loader'

# Pay attention to this config 
# If you have cdn to access this , then you can set to no_storage
# STORAGE = "thumbor.storages.no_storage"
# else if you just want to cache the file into local storage , you can use file_storage 
# but you should remember , if you use the file_storage , the files will persistent in the file system until you remove them
STORAGE = "thumbor.storages.file_storage"
STORAGE_EXPIRATION_SECONDS = 900
FILE_STORAGE_ROOT_PATH = '/path/to/you/cache'
RESULT_STORAGE = 'thumbor.result_storages.file_storage'
RESULT_STORAGE_EXPIRATION_SECONDS=900
RESULT_STORAGE_FILE_STORAGE_ROOT_PATH = '/path/to/you/cache'
RESULT_STORAGE_STORES_UNSAFE = True

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tc_aws_video-2.0.1.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

tc_aws_video-2.0.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file tc_aws_video-2.0.1.tar.gz.

File metadata

  • Download URL: tc_aws_video-2.0.1.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for tc_aws_video-2.0.1.tar.gz
Algorithm Hash digest
SHA256 dad692e4ea7d43ca2e75511fccc70bca8a07dcfdcc9b1e9dd44d2e143428806b
MD5 9ea431e9d75d5ae5078ee08f9e5b286d
BLAKE2b-256 69cd0df9ea62a5ef3aa2e1ab13c1cf519aab572164914b6e8bcc5a7edf1e7b7a

See more details on using hashes here.

File details

Details for the file tc_aws_video-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: tc_aws_video-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for tc_aws_video-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9566e4cd26724d1252d1dac4842f97b8158c3b26db60b885fc7988068e4f7b28
MD5 892844abd2106de62d1bb797bf2abe0b
BLAKE2b-256 900d0e6bedf6b9634074a9c74a1de9dfa73546f9af7467d262b71d0ed2ac2b66

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page