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
Wagtail >= 2.4
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file wagtailvideos-2.8.0.tar.gz
.
File metadata
- Download URL: wagtailvideos-2.8.0.tar.gz
- Upload date:
- Size: 31.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b7ab66d0340effa5124c220343939c4681147596a770dc732181e0bbdc26106 |
|
MD5 | 2c04360ac9583d36ac77840793326d50 |
|
BLAKE2b-256 | 275ecd517309e0572b078f30a196b2b311926149370d5b9cd51a20243bc47c22 |
File details
Details for the file wagtailvideos-2.8.0-py2.py3-none-any.whl
.
File metadata
- Download URL: wagtailvideos-2.8.0-py2.py3-none-any.whl
- Upload date:
- Size: 51.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6782b9c3c3e5dd20cf9c7975e19c2c47911e556759adbe3f912329a7a436d25b |
|
MD5 | 75a1e29d450a1d9213f70961f8a0b6e9 |
|
BLAKE2b-256 | 4755831ca0252cf9a0cf34f9e19f9e97ffbcded9342d852d08a95cf0ce49cddc |