Skip to main content

Simple integration of a Django model with a FileField to encoding backends

Project description PyPI - Django Version

Simple integration with video encoding backends.

For now only the remote is supported.

Upload videos and asynchronously store the encoded videos and the generated thumbnails.


Django 2.2+ and Celery to asynchronously run the encoding tasks.


You will need to add the following to your django settings:

  • Add django_video_encoder to INSTALLED_APPS

  • Add generic relation fields to your video models

    formats = GenericRelation(Format)
    thumbnails = GenericRelation(Thumbnail)

  • Add the desired formats, for example

        "H264 (HD)": {"video_codec": "h264"},  # full resolution if not specified
        "H264": {"video_codec": "h264", "width": 720, "height": 404},
        "VP9 (HD)": {"video_codec": "vp9"},
        "VP9": {"video_codec": "vp9", "width": 720, "height": 404},

And specific settings using the zencoder backend:


  • You may also specify ZENCODER_REGION (default: europe) to the most suitable for you

DJANGO_VIDEO_ENCODER_FORMATS is a dictionary of {format_label: format_kwargs} where format_kwargs is a dictionary requiring video_codec and where all arguments are added to the encoding job POST. You can define width, height and much more see the Zencoder API.


Run tests with tox


To not be confused with the archived theonion/django-zencoder which is installed as zencoder

See also similar project escaped/django-video-encoding

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_encoder-1.1.1.tar.gz (11.2 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page