A customer loader for getting the video first frame from s3 compatible storage
Project description
Thumbor AWS
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 |
v2.0.2 | tc_aws_video.loaders.s3_video_loader |
python3+ | Fix 502 to 404 while video not existed |
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.2.tar.gz
(11.0 kB
view details)
Built Distribution
File details
Details for the file tc_aws_video-2.0.2.tar.gz
.
File metadata
- Download URL: tc_aws_video-2.0.2.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f29a55a5b67cdadfa86099e3b10852c4bf028c0a44208773949729cfafc4c894 |
|
MD5 | 274181dbf36acf6df9ebfd5b124c3989 |
|
BLAKE2b-256 | 401c9ec200aff70ca465205b7ec94882765ca90a7c1377aad15afb43bc193382 |
File details
Details for the file tc_aws_video-2.0.2-py3-none-any.whl
.
File metadata
- Download URL: tc_aws_video-2.0.2-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3465c6bf6f1c620f4520b407ea7ceb927ab36dccffcb6036597522835a8e7dd6 |
|
MD5 | 3b3e495500c7e13bb6f62cca159952ad |
|
BLAKE2b-256 | e589069c5e4bd903bc94197ebddc8b6f74b226e6e726645e13f6469ccb3cff8d |