Simple video transcoding application for Django framework
Project description
django-video-transcoding
Simple video transcoding application for Django Framework
Installation
System requirements
In case of latest Ubuntu LTS (20.04):
- ffmpeg-4.x
$> sudo apt install ffmpeg
- mediainfo
$> sudo apt install mediainfo
- RabbitMQ
$> sudo apt install rabbitmq-server
django-video-transcoding
pip install django-video-transcoding
Configure Django
Edit your project settings.py
INSTALLED_APPS.append('video_transcoding')
Env
Common env variables used in django web server and celery
DJANGO_SETTINGS_MODULE=YOUR_PROJECT.settings
VIDEO_TRANSCODING_CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:15672/
Web-server-only env variables:
VIDEO_DOWNLOAD_SOURCE=0
VIDEO_EDGES='http://edge-1.localhost,http://edge-2.localhost'
Celery-only env variables:
VIDEO_TEMP_DIR=/tmp
VIDEO_TRANSCODING_CELERY_CONCURRENCY=2
VIDEO_ORIGINS='http://origin-1.localhost/video,http://origin-2.localhost/video'
Start celery worker
$> celery worker -A video_transcoding.celery
Develop
Development environment quickstart guide
Tests
src/manage.py test
Type checking
$> pip install mypy django-stubs
$> cd src && /data/dvt/virtualenv/bin/dmypy run -- \
--config-file ../mypy.ini -p video_transcoding
TBD:
- travis-ci
- sphinx docs - autodoc + manual
- coverage
- typing
- badges
- video hosting demo project with docker-compose, nginx and player demo
Production
Graceful shutdown
- if you are running transcoder in docker, make sure that celery master process has pid 1 (docker will send SIGTERM to it by default)
- when using separate celery app, send SIGUSR1 from master to workers to trigger
soft shutdown handling
(see
video_transcoding.celery.send_term_to_children
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django_video_transcoding-0.12.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44f629862f8ade67a5aedc54765475606d816cac604b7845a71792cea542f7b3 |
|
MD5 | d46aae83a005cc33d13067b871b181f9 |
|
BLAKE2b-256 | 1b16cecf9f73705cf3ac8bbd05396b18b4ed850a8d95ce87c2b3065aee964b88 |
Close
Hashes for django_video_transcoding-0.12.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cf11f60c4a8dca8780a49ab251fea477e51b2576dd7c448ca90cf10abefa2c1 |
|
MD5 | c9ac61c17a0044d9d0e0302cda7e9f48 |
|
BLAKE2b-256 | a08d987444b2fcaaf66f9cefca1ac578086ba3de6175ec80c375b0998da4046e |