Skip to main content

django-video-transcoding

Simple video transcoding application for Django Framework

build codecov Updates PyPI version Documentation Status

Installation

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

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)

Download files

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

Source Distribution

django_video_transcoding-0.13.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_video_transcoding-0.13.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file django_video_transcoding-0.13.0.tar.gz.

File metadata

File hashes

Hashes for django_video_transcoding-0.13.0.tar.gz
Algorithm Hash digest
SHA256 f395232b7f5fd7630d1462f7a6b42c67b3b2d350e291ff4e125ffe854bf80c04
MD5 35f294d52923dff4ca32539e6012b86c
BLAKE2b-256 47fcbbcd28611989a648184d1cd4cc330f0a727aa2156d40a54e0b14ce8b3c90

See more details on using hashes here.

File details

Details for the file django_video_transcoding-0.13.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_video_transcoding-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21b599d7deb0e09622b5f3a24f138d0f5d6df17d7acdb23e053e13ab63d6a0df
MD5 ceede5e5c257358979a3096807892114
BLAKE2b-256 a47525a3c7b99429854eb559e1b9c8b65203210664ea0acf4f9789790cfc751e

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.0

2 files

0.14.0

2 files

This release

0.13.0 This release

2 files

0.12.1

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

0.0.12

1 file

0.0.11

1 file

0.0.10

1 file

0.0.9

1 file

0.0.8

1 file

0.0.7

1 file

0.0.6

1 file

0.0.5

1 file

0.0.4

1 file

0.0.2

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page