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 (18.04):
- ffmpeg-4.0
$> sudo add-apt-repository ppa:jonathonf/ffmpeg-4
$> 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 += ['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_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
Demo project
Run admin, storage and celery worker
docker-compose up
- http://localhost:8000/admin/ - Django admin (credentials are
admin:admin
) - http://storage.localhost:8080/videos/ - WebDAV for sources & results
- http://storage.localhost:8080/hls/ - HLS stream endpoint
Transcode something
curl -T cat.mp4 http://storage.localhost:8080/videos/sources/cat.mp4
- Create new video with link above
- Wait till video will change status to DONE.
- On video change form admin page there is a sample video player.
Develop
Tests
src/manage.py test
Type checking
$> pip install mypy django-stubs
$> cd src && mypy --config-file=../mypy.ini video_transcoding
TBD:
- travis-ci
- sphinx docs - autodoc + manual
- coverage
- typing
- badges
- video hosting demo project with docker-compose, nginx and player demo
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
Close
Hashes for django_video_transcoding-0.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca08a4337dc611674f2f7e80b433e8a160602513e044eb73cc1b1b0049b9ac8c |
|
MD5 | a03b8657b8e5e16e7690675e7b2c373e |
|
BLAKE2b-256 | 8a1581790b0f01ac0d48bb08daa6a41ee69e132391cf7cb44ff0385097a6a43b |