Status: DONE
Goal: add a muted compressed MP4 cinematic motion band on the homepage after
the page title and before Recent posts. The whole band opens the full YouTube
trailer:
https://www.youtube.com/watch?v=eIJHYsPgNnM
Selected repo assets:
assets/media/alis-trailer-loop.mp4 uses the no-inventory baseline:
C:\Users\vslvg\OneDrive\Desktop\Temp\teaser-homepage-41s-720-crf34-no-inventory.mp4assets/images/teaser.jpg; it is used by another site surface
and is not part of this trailer card.Implementation checklist:
controls preload="none". Prefer
YouTube for the full trailer.assets/media/alis-trailer-loop.mp4alis-trailer-loop.mp4 target 2-3 MB maxaria-label for accessibility.assets/media/alis-trailer-loop.mp4 is committed as a plain Git blob,
not Git LFS. GitHub Pages branch deploy will not materialize LFS objects.
This repo has a generic *.mp4 filter=lfs rule, so add a later exemption
for this served preview file.autoplay muted loop playsinline preload="metadata" and one H.264 MP4
source. Do not include a poster attribute.prefers-reduced-motion: reduce fallback that disables decorative hover
scaling without hiding the video while no separate poster exists.aspect-ratio: 16 / 9 and
object-fit: cover.prefers-reduced-motion unless a separate poster
asset is added; with no poster and no button, hiding the video leaves an empty
clickable area.assets/css/trailer.css and load that file
through _includes/head/custom.html with a timestamp query string. This keeps
production correct when /assets/css/main.css is still cached at the edge.bundle exec jekyll serve --host 0.0.0.0 --force_pollingRequired .gitattributes exemption after the generic video LFS rules:
# Small served homepage preview: must be a plain Git blob for GitHub Pages.
assets/media/alis-trailer-loop.mp4 -filter -diff -merge -text
Git LFS verification:
git check-attr -a -- assets/media/alis-trailer-loop.mp4
git lfs ls-files | grep -F alis-trailer-loop.mp4 || true
git cat-file -p :assets/media/alis-trailer-loop.mp4 | head
Expected result: no filter=lfs, no git lfs ls-files match, and binary MP4
bytes instead of a version https://git-lfs.github.com/spec/v1 pointer.
Reference links:
<video> reference:
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/videoCurrent working source:
C:\Users\vslvg\OneDrive\Desktop\Temp\teaser-clips-merged-no-inventory-temp.mp4
Cut history:
C:\Users\vslvg\OneDrive\Desktop\Temp\teaser-clips-merged-temp.mp400:05.005-00:11.85700:17.861-00:53.48600:06.741-00:08.058Known compression tests:
720x406, 24 fps, no audio, CRF 34: 2.3 MB,
42.459s
C:\Users\vslvg\OneDrive\Desktop\Temp\teaser-homepage-42s-720-crf34-original-comparison.mp4720x406, 24 fps, no audio, CRF 34: 2.2 MB, 41.167s
C:\Users\vslvg\OneDrive\Desktop\Temp\teaser-homepage-41s-720-crf34-no-inventory.mp40.78, 720x406,
24 fps, no audio, CRF 34: 2.2 MB, 41.167s
C:\Users\vslvg\OneDrive\Desktop\Temp\teaser-homepage-41s-720-crf34-desat78-no-inventory.mp40.68, 720x406, 24 fps,
no audio, CRF 34: 2.2 MB, 41.167s
C:\Users\vslvg\OneDrive\Desktop\Temp\teaser-homepage-41s-720-crf34-desat68-no-inventory.mp40, 720x406, 24 fps, no audio,
CRF 34: 2.1 MB, 41.167s
C:\Users\vslvg\OneDrive\Desktop\Temp\teaser-homepage-41s-720-crf34-mono-no-inventory.mp40, 720x406, 24 fps,
no audio, CRF 34: 2.2 MB, 41.167s
C:\Users\vslvg\OneDrive\Desktop\Temp\teaser-homepage-41s-720-crf34-mono-contrast-no-inventory.mp4Recommendation: ship the no-inventory baseline unless the original merged comparison, a conservative desaturation variant, or the contrast monochrome variant is explicitly preferred after review.
Suggested 41 second no-inventory baseline encode:
mkdir -p assets/media
ffmpeg -i /mnt/c/Users/vslvg/OneDrive/Desktop/Temp/teaser-clips-merged-no-inventory-temp.mp4 \
-vf "scale=720:-2:flags=lanczos,fps=24,eq=brightness=-0.04:contrast=1.08:saturation=0.92,vignette=PI/5,fade=t=in:st=0:d=0.5,fade=t=out:st=40.3:d=0.8,format=yuv420p" \
-an \
-c:v libx264 -profile:v high -level 3.1 \
-crf 34 -preset slow -movflags +faststart \
assets/media/alis-trailer-loop.mp4
For conservative desaturation comparison, use the same command with
saturation=0.78 or saturation=0.68.
For monochrome comparison, use saturation=0. For contrast monochrome, use:
ffmpeg -i /mnt/c/Users/vslvg/OneDrive/Desktop/Temp/teaser-clips-merged-no-inventory-temp.mp4 \
-vf "scale=720:-2:flags=lanczos,fps=24,eq=brightness=-0.055:contrast=1.18:saturation=0:gamma=0.96,vignette=PI/4.8,fade=t=in:st=0:d=0.5,fade=t=out:st=40.3:d=0.8,format=yuv420p" \
-an \
-c:v libx264 -profile:v high -level 3.1 \
-crf 34 -preset slow -movflags +faststart \
assets/media/alis-trailer-loop.mp4
Check size:
du -h assets/media/alis-trailer-loop.mp4
ffprobe -hide_banner assets/media/alis-trailer-loop.mp4
Hard size limits:
<= 3 MB: good, ship.3-5 MB: acceptable only if it looks much better.> 5 MB: too heavy for homepage; reduce to 640 px wide or shorter cut.