Git Product home page Git Product logo

wagtailvideos's Introduction

wagtailvideos

Based on wagtailimages. The aim was to have feature parity with images but for html5 videos. Includes the ability to transcode videos to a html5 compliant codec using ffmpeg.

Requirements

Installing

Install using pypi

pip install wagtailvideos

Using

On a page model:

Implement as a ForeignKey relation, same as wagtailimages.

from django.db import models

from wagtail.wagtailadmin.edit_handlers import FieldPanel
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailcore.models import Page

from wagtailvideos.edit_handlers import VideoChooserPanel

class HomePage(Page):
    body = RichtextField()
    header_video = models.ForeignKey('wagtailvideos.Video',
                                     related_name='+',
                                     null=True,
                                     on_delete=models.SET_NULL)

    content_panels = Page.content_panels + [
        FieldPanel('body'),
        VideoChooserPanel('header_video'),
    ]

In template:

The video template tag takes one required postitional argument, a video field. All extra attributes are added to the surrounding <video> tag. The original video and all extra transcodes are added as <source> tags.

{% load wagtailvideos_tags %}
{% video self.header_video autoplay controls width=256 %}

How to transcode using ffmpeg:

Using the video collection manager from the left hand menu. In the video editing section you can see the available transcodes and a form that can be used to create new transcodes. It is assumed that your compiled version of ffmpeg has the matching codec libraries required for the transcode.

Future features

  • Richtext embed
  • Streamfield block
  • Transcoding via amazon service rather than ffmpeg
  • Wagtail homescreen video count

wagtailvideos's People

Contributors

delph avatar dirkmoors avatar jdavid avatar jkevingutierrez avatar kcidau avatar liambrenner avatar mx-moth avatar nickyspag avatar seb-b avatar skeletorxvi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.