All Projects → neon-jungle → wagtailvideos

neon-jungle / wagtailvideos

Licence: BSD-3-Clause License
Videos for Wagtail CMS, including transcoding

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to wagtailvideos

wagtail-headless-preview
Previews for headless Wagtail setups
Stars: ✭ 99 (+130.23%)
Mutual labels:  wagtail, wagtail-cms
wagtailgridder
Wagtail Gridder is a Bootstrap 4 enabled layout for the Wagtail CMS. Grid Items are created within categories, and displayed on a Grid Index Page. The JavaScript libraries Gridder and MixItUp are included.
Stars: ✭ 59 (+37.21%)
Mutual labels:  wagtail, wagtail-cms
WF-website
Website for Western Friend, part of the Religious Society of Friends
Stars: ✭ 34 (-20.93%)
Mutual labels:  wagtail, wagtail-cms
wagtailmath
Beautiful equations in your StreamField content
Stars: ✭ 27 (-37.21%)
Mutual labels:  wagtail, wagtail-cms
gatsby-source-wagtail
Plugin for sourcing Gatsby data from Wagtail CMS
Stars: ✭ 16 (-62.79%)
Mutual labels:  wagtail, wagtail-cms
wagtailcolumnblocks
Streamfield columns for Wagtail
Stars: ✭ 38 (-11.63%)
Mutual labels:  wagtail, wagtail-cms
cassandra-nginx-cdn
Some config files and POC code to use Apache Cassandra as distributed storage for HLS chunks accross multiple datacenters and scripts for converting/transcoding UDP MPEG-TS to HLS and vice versa. The idea is take from Globo.com’s Live Video Platform for FIFA World Cup ’14.
Stars: ✭ 24 (-44.19%)
Mutual labels:  ffmpeg
PyroGramBot
pluggable Telegram Bot based on Pyrogram
Stars: ✭ 168 (+290.7%)
Mutual labels:  ffmpeg
staxrip
StaxRip is a video encoding app for Windows with a unrivaled feature set and usability.
Stars: ✭ 132 (+206.98%)
Mutual labels:  ffmpeg
nott
The New OTT Platform - an excuse to discuss and design a simple edge computing platform
Stars: ✭ 46 (+6.98%)
Mutual labels:  ffmpeg
rtsp-samsung-tv
Display RTSP streams from IP Cameras on Samsung Smart TV (Tizen TV)
Stars: ✭ 40 (-6.98%)
Mutual labels:  ffmpeg
ffEdit
Minimal visual editor for ffmpeg
Stars: ✭ 17 (-60.47%)
Mutual labels:  ffmpeg
AudioManager
这是一个 Android 端万能音频播放器,只要给我一个路径我就能进行播放。
Stars: ✭ 26 (-39.53%)
Mutual labels:  ffmpeg
discord-ytdl-core
Simple ytdl wrapper for discord bots with custom ffmpeg args support.
Stars: ✭ 52 (+20.93%)
Mutual labels:  ffmpeg
canvas-capture
Record the canvas as an image, mp4 video, or gif from the browser
Stars: ✭ 35 (-18.6%)
Mutual labels:  ffmpeg
camstudio
CamStudio fork
Stars: ✭ 83 (+93.02%)
Mutual labels:  ffmpeg
moshpit
A powerful cross-platform command-line tool for datamoshing.
Stars: ✭ 74 (+72.09%)
Mutual labels:  ffmpeg
video-summarizer
Summarizes videos into much shorter videos. Ideal for long lecture videos.
Stars: ✭ 92 (+113.95%)
Mutual labels:  ffmpeg
YKAVStudyPlatform
ffmpeg、ffplay、ffprobe 调试环境搭建,个人音视频全平台学习记录
Stars: ✭ 23 (-46.51%)
Mutual labels:  ffmpeg
UniBorg
Pluggable Telegram bot and userbot based on Telethon
Stars: ✭ 196 (+355.81%)
Mutual labels:  ffmpeg

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

Add wagtailvideos to your installed apps.

INSTALLED_APPS = [
    'wagtailvideos',
]

Using

On a page model:

Implement as a ForeignKey relation, same as wagtailimages.

from django.db import models

from wagtail.admin.edit_handlers import FieldPanel
from wagtail.core.fields import RichTextField
from wagtail.core.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 a Streamfield:

A VideoChooserBlock is included

from wagtail.admin.edit_handlers import StreamFieldPanel
from wagtail.core.fields import StreamField
from wagtail.core.models import Page

from wagtailvideos.blocks import VideoChooserBlock


class ContentPage(Page):
  body = StreamField([
      ('video', VideoChooserBlock()),
  ])

  content_panels = Page.content_panels + [
      StreamFieldPanel('body'),
  ]

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 %}

Jinja2 extensions are also included.

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.

Disable transcode:

Transcode can be disabled using the WAGTAIL_VIDEOS_DISABLE_TRANSCODE setting.

# settings.py
WAGTAIL_VIDEOS_DISABLE_TRANSCODE = True

Custom Video models:

Same as Wagtail Images, a custom model can be used to replace the built in Video model using the WAGTAILVIDEOS_VIDEO_MODEL setting.

# settings.py
WAGTAILVIDEOS_VIDEO_MODEL = 'videos.AttributedVideo'

# app.videos.models
from django.db import models
from modelcluster.fields import ParentalKey
from wagtailvideos.models import AbstractVideo, AbstractVideoTranscode

class AttributedVideo(AbstractVideo):
    attribution = models.TextField()

    admin_form_fields = (
        'title',
        'attribution',
        'file',
        'collection',
        'thumbnail',
        'tags',
    )

class CustomTranscode(AbstractVideoTranscode):
    video = models.ForeignKey(AttributedVideo, related_name='transcodes', on_delete=models.CASCADE)

    class Meta:
        unique_together = (
            ('video', 'media_format')
        )

# Only needed if you are using the text tracks feature
class CustomTrackListing(AbstractTrackListing):
    video = models.OneToOneField(AttributedVideo, related_name='track_listing', on_delete=models.CASCADE)

class CustomVideoTrack(AbstractVideoTrack):
    listing = ParentalKey(CustomTrackListing, related_name='tracks', on_delete=models.CASCADE)

Video text tracks:

To enable the uploading and displaying of VTT tracks (e.g. subtitles, captions) you'll need to add wagtail.contrib.modeladmin to your installed apps. Once added, there will be an new area in the admin for attaching VTT files to videos with associaled metadata.

Future features

  • Some docs
  • Richtext embed
  • Transcoding via amazon service rather than ffmpeg
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].