Django + AWS Elastic Transcoder

Overview

Django Elastic Transcoder

Build Status Coverage Status

django-elastic-transcoder is an Django app, let you integrate AWS Elastic Transcoder in Django easily.

What is provided in this package?

  • Transcoder class
  • URL endpoint for receive SNS notification
  • Signals for PROGRESS, ERROR, COMPLETE
  • EncodeJob model

Workflow

https://github.com/StreetVoice/django-elastic-transcoder/blob/master/docs/images/workflow.jpg

Install

First, install dj_elastictranscode with pip

$ pip install django-elastic-transcoder

Then, add dj_elastictranscoder to INSTALLED_APPS

INSTALLED_APPS = (
    ...
    'dj_elastictranscoder',
    ...
)

Bind urls.py

urlpatterns = patterns('',
    ...
    url(r'^dj_elastictranscoder/', include('dj_elastictranscoder.urls')),
    ...
)

Migrate

$ ./manage.py migrate

Setting up AWS Elastic Transcoder

  1. Create a new Pipeline in AWS Elastic Transcoder.
  2. Hookup every Notification.
  3. Subscribe SNS Notification through HTTP
  4. You are ready to encode!

Required Django settings

Please settings up variables below to make this app works.

AWS_ACCESS_KEY_ID = <your aws access key id>
AWS_SECRET_ACCESS_KEY = <your aws secret access key>
AWS_REGION = <aws region>

Usage

For instance, encode an mp3

from dj_elastictranscoder.transcoder import Transcoder

input = {
    'Key': 'path/to/input.mp3',
}

outputs = [{
    'Key': 'path/to/output.mp3',
    'PresetId': '1351620000001-300040' # for example: 128k mp3 audio preset
}]

pipeline_id = '<pipeline_id>'

transcoder = Transcoder(pipeline_id)
transcoder.encode(input, outputs)

# your can also create a EncodeJob for object automatically
transcoder.create_job_for_object(obj)


# Transcoder can also work standalone without Django
# just pass region and required aws key/secret to Transcoder, when initiate

transcoder = Transcoder(pipeline_id, AWS_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)

Setting Up AWS SNS endpoint

AWS Elastic Transcoder can send various SNS notification to notify your application, like PROGRESS, ERROR, WARNING and COMPLETE

So this package provide a endpoint to receieve these notifications, for you to update transcode progress. without checking by your self.

Go to SNS section in AWS WebConsole to choose topic and subscribe with the url below.

http://<your-domain>/dj_elastictranscoder/endpoint/

Before notification get started to work, you have to activate SNS subscription, you will receive email with activation link.

After subscribe is done, you will receive SNS notification.

Signals

This package provide various signals for you to get notification, and do more things in your application. you can check the signals usage in tests.py for more usage example.

  • transcode_onprogress
  • transcode_onerror
  • transcode_oncomplete
Owner
StreetVoice
StreetVoice
An orgizational tool to keep track of tasks/projects and the time spent on them.

Django-Task-Manager Task Tracker using Python Django About The Project This project is an orgizational tool to keep track of tasks/projects and the ti

Nick Newton 1 Dec 21, 2021
Realtime data read and write without page refresh using Ajax in Django.

Realtime read-write with AJAX Hey,this is the basic implementation type of ajax realtime read write from the database. where you can insert or view re

Mehedi Hasan 3 Dec 13, 2022
Django-powered application about blockchain (bitcoin)

Django-powered application about blockchain (bitcoin)

Igor Izvekov 0 Jun 23, 2022
An example of Django project with basic user functionality and account activation.

Simple Django Login and Registration An example of Django project with basic user functionality. Screenshots Log In Create an account Authorized page

Hussein Sarea 3 Oct 19, 2022
Django URL Shortener is a Django app to to include URL Shortening feature in your Django Project

Django URL Shortener Django URL Shortener is a Django app to to include URL Shortening feature in your Django Project Install this package to your Dja

Rishav Sinha 4 Nov 18, 2021
Build reusable components in Django without writing a single line of Python.

Build reusable components in Django without writing a single line of Python. {% #quote %} {% quote_photo src="/project-hail-mary.jpg" %} {% #quot

Mitchel Cabuloy 277 Jan 02, 2023
Django React - Purity Dashboard (Open-Source) | AppSeed

Django React Purity Dashboard Start your Development with an Innovative Admin Template for Chakra UI and React. Purity UI Dashboard is built with over

App Generator 19 Sep 19, 2022
Sistema administrador de contranas desarrollador en Django

Sistema Contrasenas Desarrolado en Django Proyecto sistema de administracion de contraseñas, de la experiencia educativa Programacion Segura Descripci

Ibrain Rodriguez Espinoza 1 Sep 24, 2022
Dockerizing Django with Postgres, Gunicorn, Nginx and Certbot. A fully Django starter project.

Dockerizing Django with Postgres, Gunicorn, Nginx and Certbot 🚀 Features A Django stater project with fully basic requirements for a production-ready

8 Jun 27, 2022
Quick example of a todo list application using Django and HTMX

django-htmx-todo-list Quick example of a todo list application using Django and HTMX Background Modified & expanded from https://github.com/jaredlockh

Jack Linke 54 Dec 10, 2022
A fresh approach to autocomplete implementations, specially for Django.

A fresh approach to autocomplete implementations, specially for Django. Status: v3 stable, 2.x.x stable, 1.x.x deprecated. Please DO regularely ping us with your link at #yourlabs IRC channel

YourLabs 1.6k Dec 22, 2022
Django app for building dashboards using raw SQL queries

django-sql-dashboard Django app for building dashboards using raw SQL queries Brings a useful subset of Datasette to Django. Currently only works with

Simon Willison 383 Jan 06, 2023
Faker is a Python package that generates fake data for you.

Faker is a Python package that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in yo

Daniele Faraglia 15.2k Jan 01, 2023
django-compat-lint

django_compat_lint -- check Django compatibility of your code Django's API stability policy is nice, but there are still things that change from one v

James Bennett 40 Sep 30, 2021
Django admin CKEditor integration.

Django CKEditor NOTICE: django-ckeditor 5 has backward incompatible code moves against 4.5.1. File upload support has been moved to ckeditor_uploader.

2.2k Jan 02, 2023
Per object permissions for Django

django-guardian django-guardian is an implementation of per object permissions [1] on top of Django's authorization backend Documentation Online docum

3.3k Jan 04, 2023
A small and lightweight imageboard written with Django

Yuu A small and lightweight imageboard written with Django. What are the requirements? Python 3.7.x PostgreSQL 14.x Redis 5.x FFmpeg 4.x Why? I don't

mint.lgbt 1 Oct 30, 2021
Hello world written in Django.

Learning Django 💡 create a virtual environment create python -m venv ./venv. this virtualenv file will be excluded by .gitignore activate the virtual

Dipak giri 4 Nov 26, 2021
Logan is a toolkit for building standalone Django applications

Logan Logan is a toolkit for running standalone Django applications. It provides you with tools to create a CLI runner, manage settings, and the abili

David Cramer 206 Jan 03, 2023
A reusable Django app that configures your project for deployment

django-simple-deploy This app gives you a management command that configures your project for an initial deployment. It targets Heroku at the moment,

Eric Matthes 205 Dec 26, 2022