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)
Release files for django-video-transcoding 0.14.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_video_transcoding-0.14.0.tar.gz | 22.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_video_transcoding-0.14.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.3 kB
Release files / django_video_transcoding-0.14.0.tar.gz
| Download URL | django_video_transcoding-0.14.0.tar.gz |
|---|---|
| Size | 22.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a124e013d06c0dd2727f5ed7a6635309029f38b4620299b3ca44e2363d7a57cc
|
|
BLAKE2b-256 checksum How to use checksums |
5dd9c4f9b1c21d07ce57c98ab6bee224e02bf5c35acf015faf67bbd9d5524bd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / django_video_transcoding-0.14.0-py3-none-any.whl
| Download URL | django_video_transcoding-0.14.0-py3-none-any.whl |
|---|---|
| Size | 29.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02d30f7a4c59ef79bce0c269e844be9277c3c884ef57697c56f4122a6032b813
|
|
BLAKE2b-256 checksum How to use checksums |
e3b70c4997d8a400cfae7595eac9a9668345de5e34a19852c2fe715f6cd8b2d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|