Skip to main content

Simple video transcoding application for Django framework

Project description


Simple video transcoding application for Django Framework

build codecov Updates PyPI version


System requirements

In case of latest Ubuntu LTS (20.04):

  1. ffmpeg-4.x
$> sudo apt install ffmpeg
  1. mediainfo
$> sudo apt install mediainfo 
  1. RabbitMQ
$> sudo apt install rabbitmq-server


pip install django-video-transcoding

Configure Django

Edit your project

INSTALLED_APPS += ['video_transcoding']


Common env variables used in django web server and celery


Web-server-only env variables:


Celery-only env variables:


Start celery worker

$> celery worker -A video_transcoding.celery

Demo project

Run admin, storage and celery worker

docker-compose up

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.



src/ test

Type checking

$> pip install mypy django-stubs
$> cd src && /data/dvt/virtualenv/bin/dmypy run -- \
   --config-file ../mypy.ini video_transcoding


  • [x] travis-ci
  • [ ] sphinx docs - autodoc + manual
  • [x] coverage
  • [x] typing
  • [x] badges
  • [x] video hosting demo project with docker-compose, nginx and player demo


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

Download files

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

Files for django-video-transcoding, version 0.3.2
Filename, size File type Python version Upload date Hashes
Filename, size django_video_transcoding-0.3.2-py3-none-any.whl (17.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django_video_transcoding-0.3.2.tar.gz (13.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page