module

Video

Create output for video files anywhere in content/

Videos are copied verbatim to output/ (no transcoding) and a poster frame is extracted next to them with ffmpeg, so galleries can show a thumbnail the same way they do for images:

foo.mp4 => output/.../foo.mp4 (byte copy of the original) foo.mp4 => output/.../foo.thumb.jpg (poster frame, image_thumb wide)

The ffmpeg dependency is only checked when video files exist, and is fatal when they do (like pandoc for non-markdown formats).

Constants

VIDEO_EXTENSIONS = {".mp4", ".mov", ".webm", ".mkv", ".m4v", ".avi"}

Extensions treated as video, matched case-insensitively

Class methods

enable(is_enabled : Bool, content_path : Path)

Enable videos feature

Source
poster_name(video : Path) : String

Name of the poster frame extracted for a video: foo.mp4 becomes foo.thumb.jpg. When an image with the same stem lives in the same folder, foo.video.thumb.jpg is used instead: the images feature's own thumb task already owns the plain foo.thumb.jpg output, and two tasks writing the same file would clobber each other.

Source
read_all(path) : Array(Path)

Finds all videos in a path

Source
render(videos : Array(Path))

Videos are copied verbatim and get a poster frame: foo.mp4 => foo.mp4 foo.mp4 => foo.thumb.jpg

Source
video?(path : String | Path) : Bool

Is this filename a video, by extension?

Source