Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

django-video-transcoding

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-video-transcoding

Simple video transcoding application for Django framework

  • 1.0.0
  • PyPI
  • Socket score

Maintainers
2

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)

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc