Skip to main content

A wagtail module for uploading and displaying videos in various codecs.

Project description

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

Project details


Download files

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

Source Distribution

wagtailvideos-2.4.1.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

wagtailvideos-2.4.1-py2.py3-none-any.whl (53.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file wagtailvideos-2.4.1.tar.gz.

File metadata

  • Download URL: wagtailvideos-2.4.1.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/33.1.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.3

File hashes

Hashes for wagtailvideos-2.4.1.tar.gz
Algorithm Hash digest
SHA256 c179d4aaaf6233c490123b2309001d73e4efe8a2fc6d370de769f48ecbed2e66
MD5 29a9048f47c227161e50eeaace3f810f
BLAKE2b-256 ffc214a7a0947896cd051435229c8a416e5a7e707cc38280ad1a2fd678de2a15

See more details on using hashes here.

File details

Details for the file wagtailvideos-2.4.1-py2.py3-none-any.whl.

File metadata

  • Download URL: wagtailvideos-2.4.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 53.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/33.1.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.3

File hashes

Hashes for wagtailvideos-2.4.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c27003cef155034e352db1fef0ea80f8c78625fab403718fe440bd193edbfa44
MD5 2dd66da745be67b49210a7293a3b17e1
BLAKE2b-256 ff319338ec8923b64f68e9e00d2d3f2d5f8b67d47c9469e30abf1dc38456bcd6

See more details on using hashes here.

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