A wagtail module for uploading and displaying videos in various codecs.
Project description
# 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
* Wagtail > 1.4
* [ffmpeg](https://ffmpeg.org/)
## Installing
**This package is not on PyPI yet**
## Using
### On a page model:
Implement as a `ForeinKey` relation, same as wagtailimages.
```python
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.
```django
{% 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
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 > 1.4
* [ffmpeg](https://ffmpeg.org/)
## Installing
**This package is not on PyPI yet**
## Using
### On a page model:
Implement as a `ForeinKey` relation, same as wagtailimages.
```python
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.
```django
{% 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
wagtailvideos-0.1.5.tar.gz
(26.7 kB
view details)
File details
Details for the file wagtailvideos-0.1.5.tar.gz
.
File metadata
- Download URL: wagtailvideos-0.1.5.tar.gz
- Upload date:
- Size: 26.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c173ae69247a0af566d57e1d817158f90e8062234151c543409b4faa997562c |
|
MD5 | a9e7808f35892ece2f3867d2615082f8 |
|
BLAKE2b-256 | 2832c6b76bcb677b93ec8acf776aaf09d873f6c1b75ddc7f94b8af8660d27556 |