Skip to content

The swiss army knife of lossless video/audio editing

Website: replace the old tracks screenshot with a video of the Tracks panel

Claudefb2ea6a86323
diff --git a/website/src/components/Home.tsx b/website/src/components/Home.tsx
index 4350c858..cfc09a5d 100644
--- a/website/src/components/Home.tsx
+++ b/website/src/components/Home.tsx
@@ -13,7 +13,7 @@ import snapStoreBadge from '../../../snap-store-black.svg?url';
import logo from '../../../src/renderer/src/icon.svg?url';
import type { Video } from '../images.ts';
-import { background1, background2, generationLossOriginal, generationLossReencoded, heroVideo, sceneChangesVideo, tracksScreenshot } from '../images.ts';
+import { background1, background2, generationLossOriginal, generationLossReencoded, heroVideo, sceneChangesVideo, tracksVideo } from '../images.ts';
import type { Release } from '../latestRelease.ts';
import { authorUrl, donateUrl, githubUrl, socialLinks, storeUrls, supportEmail } from '../links.ts';
import socialIconPaths from './socialIcons.ts';
@@ -86,13 +86,11 @@ const footerLinks = [
{ label: 'More apps by mifi ❤️', href: authorUrl },
];
-// A screenshot over a full-width background image.
-function ScreenshotSection({ background, screenshot, alt, width, borderRadius, subtitle }: { background: string, screenshot: { src: string, srcSet: string }, alt: string, width: number, borderRadius: number, subtitle: string }) {
+// A video (or screenshot) over a full-width background image.
+function MediaSection({ background, subtitle, children }: { background: string, subtitle: string, children: ReactNode }) {
return (
<div className="background" style={{ backgroundImage: `url(${background})` }}>
- <div className="padded">
- <img loading="lazy" src={screenshot.src} srcSet={screenshot.srcSet} alt={alt} className="screenshot" style={{ width, borderRadius }} />
- </div>
+ <div className="padded">{children}</div>
<div className="image-subtitle">{subtitle}</div>
</div>
);
@@ -124,28 +122,33 @@ function Collapsible({ label, collapsedHeight, children }: { label: string, coll
);
}
-// A silent, looping screen recording (see images.ts) in a plain window frame, not macOS-like, since the app also runs on Windows
-// and Linux. The script in index.astro shows its pause button (a looping video must be pausable, WCAG 2.2.2), and plays it
-// while it's on screen. With prefers-reduced-motion, only its poster is shown (home.css).
-function FramedVideo({ video, label, posterAlt, priority }: { video: Video, label: string, posterAlt: string, priority?: boolean }) {
+// A silent, looping screen recording (see images.ts) in a plain window frame (not macOS-like, since the app also runs on Windows
+// and Linux), or without the title bar for a crop of a panel. The script in index.astro shows its pause button (a looping video
+// must be pausable, WCAG 2.2.2), and plays it while it's on screen. With prefers-reduced-motion, only its poster is shown (home.css).
+function FramedVideo({ video, label, posterAlt, priority, titleBar = true }: { video: Video, label: string, posterAlt: string, priority?: boolean, titleBar?: boolean }) {
+ const pauseButton = (
+ <button type="button" className="framed-video-pause" aria-label="Pause the video" hidden>
+ <Pause className="pause" aria-hidden size={14} />
+ <Play className="play" aria-hidden size={14} />
+ </button>
+ );
return (
- <div className="framed-video">
- <div className="framed-video-title">
- <span className="framed-video-dots" aria-hidden="true"><i /><i /><i /></span>
- LosslessCut
- <button type="button" className="framed-video-pause" aria-label="Pause the video" hidden>
- <Pause className="pause" aria-hidden size={14} />
- <Play className="play" aria-hidden size={14} />
- </button>
- </div>
+ <div className={titleBar ? 'framed-video' : 'framed-video no-title-bar'} style={{ '--aspect-ratio': `${video.width} / ${video.height}` } as CSSProperties}>
+ {titleBar ? (
+ <div className="framed-video-title">
+ <span className="framed-video-dots" aria-hidden="true"><i /><i /><i /></span>
+ LosslessCut
+ {pauseButton}
+ </div>
+ ) : pauseButton}
{/* priority (the hero): starts playing right away, otherwise only when scrolled to */}
- <video poster={video.poster} autoPlay={priority} muted loop playsInline preload={priority ? 'metadata' : 'none'} width={1024} height={640} aria-label={label}>
+ <video poster={video.poster} autoPlay={priority} muted loop playsInline preload={priority ? 'metadata' : 'none'} width={video.width} height={video.height} aria-label={label}>
{/* with reduced motion, neither matches, so nothing is downloaded. Browsers that ignore media (before Chrome/Firefox
120) take the first one, and the script removes them with reduced motion */}
<source src={video.src} type="video/mp4" media="(min-width: 701px) and (prefers-reduced-motion: no-preference)" />
<source src={video.smallSrc} type="video/mp4" media="(prefers-reduced-motion: no-preference)" />
</video>
- <img className="framed-video-poster" src={video.poster} alt={posterAlt} width={1024} height={640} fetchPriority={priority ? 'high' : undefined} loading={priority ? undefined : 'lazy'} />
+ <img className="framed-video-poster" src={video.poster} alt={posterAlt} width={video.width} height={video.height} fetchPriority={priority ? 'high' : undefined} loading={priority ? undefined : 'lazy'} />
</div>
);
}
@@ -236,15 +239,14 @@ export default function Home({ stars, release }: { stars: number, release: Relea
</div>
</WhiteSection>
- <ScreenshotSection
- background={background2}
- screenshot={tracksScreenshot}
- alt="Screenshot showing the tracks screen"
- width={400}
- borderRadius={5}
- subtitle="Built in track info and selection"
- />
-
+ <MediaSection background={background2} subtitle="Built in track info and selection">
+ <div className="tracks-video">
+ <FramedVideo video={tracksVideo} titleBar={false} label="LosslessCut's Tracks panel, switching off tracks one by one" posterAlt="LosslessCut's Tracks panel: choose which video, audio and subtitle tracks to keep when exporting" />
+ <p className="demo-video-credit">
+ Tears of Steel (CC) Blender Foundation | <a href="https://mango.blender.org/">mango.blender.org</a>
+ </p>
+ </div>
+ </MediaSection>
<WhiteSection>
<h2 style={{ margin: '20px 0' }}>Features</h2>
diff --git a/website/src/images.ts b/website/src/images.ts
index 43966b06..f0b134a9 100644
--- a/website/src/images.ts
+++ b/website/src/images.ts
@@ -7,7 +7,6 @@ const withSrcSet = (path: string) => ({
srcSet: `${baseUrl}/dist/${path}.jpg 1x, ${baseUrl}/dist/${path}-2000.jpg 2x`,
});
-export const tracksScreenshot = withSrcSet('losslesscut/screenshots/tracks');
export const generationLossOriginal = withSrcSet('losslesscut/website/generation-loss-original');
export const generationLossReencoded = withSrcSet('losslesscut/website/generation-loss-reencoded');
@@ -15,14 +14,16 @@ export const generationLossReencoded = withSrcSet('losslesscut/website/generatio
export const background1 = `${baseUrl}/dist/losslesscut/website/background-1000.jpg`;
export const background2 = `${baseUrl}/dist/losslesscut/website/background2-1000.jpg`;
-// Screen recordings (script/featureMedia.ts): 1024×640, silent, a smaller one for phones, and a still of the first frame
-export interface Video { src: string, smallSrc: string, poster: string }
+// Screen recordings (script/featureMedia.ts): silent, a smaller one for phones, and a still of the first frame
+export interface Video { src: string, smallSrc: string, poster: string, width: number, height: number }
// About 13 s
export const heroVideo: Video = {
src: `${baseUrl}/dist/losslesscut/feature-media/hero-2026-10-22-1000.mp4`,
smallSrc: `${baseUrl}/dist/losslesscut/feature-media/hero-2026-10-22.mp4`,
poster: `${baseUrl}/dist/losslesscut/feature-media/hero-2026-10-22-poster-1000.jpg`,
+ width: 1024,
+ height: 640,
};
// About 10 s: creating segments from the scene changes of a Tears of Steel excerpt (CC BY: the homepage credits it)
@@ -30,6 +31,18 @@ export const sceneChangesVideo: Video = {
src: `${baseUrl}/dist/losslesscut/feature-media/detect-scene-changes-2026-10-22-1000.mp4`,
smallSrc: `${baseUrl}/dist/losslesscut/feature-media/detect-scene-changes-2026-10-22.mp4`,
poster: `${baseUrl}/dist/losslesscut/feature-media/detect-scene-changes-2026-10-22-poster-1000.jpg`,
+ width: 1024,
+ height: 640,
+};
+
+// About 7 s: switching off tracks one by one, in a crop of the Tracks panel, with a Tears of Steel excerpt (CC BY: the homepage
+// credits it). The small one is 1330×750
+export const tracksVideo: Video = {
+ src: `${baseUrl}/dist/losslesscut/feature-media/tracks-panel-2026-10-22-2000.mp4`,
+ smallSrc: `${baseUrl}/dist/losslesscut/feature-media/tracks-panel-2026-10-22-1000.mp4`,
+ poster: `${baseUrl}/dist/losslesscut/feature-media/tracks-panel-2026-10-22-poster-1000.jpg`,
+ width: 1834,
+ height: 1034,
};
// Social preview image (1200x630)
diff --git a/website/src/styles/home.css b/website/src/styles/home.css
index a580ed2a..a1739ac6 100644
--- a/website/src/styles/home.css
+++ b/website/src/styles/home.css
@@ -141,7 +141,17 @@ body {
.demo-video-credit a {
color: inherit;
}
+.tracks-video {
+ width: 800px;
+ max-width: 100%;
+}
+.tracks-video .demo-video-credit {
+ color: white;
+ opacity: 0.8;
+ text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
+}
.framed-video {
+ position: relative;
border-radius: 10px;
overflow: hidden;
border: 1px solid rgba(255, 255, 255, 0.12);
@@ -183,6 +193,21 @@ body {
color: inherit;
cursor: pointer;
}
+/* in the bottom right corner: the top right of a panel has its close button */
+.no-title-bar .framed-video-pause {
+ bottom: 10px;
+ right: 20px;
+ border: 1px solid rgba(255, 255, 255, 0.3);
+ z-index: 1;
+ width: 28px;
+ height: 28px;
+ border-radius: 6px;
+ background-color: rgba(0, 0, 0, 0.55);
+ color: white;
+}
+.no-title-bar .framed-video-pause:hover {
+ background-color: rgba(0, 0, 0, 0.75);
+}
.framed-video-pause:hover {
background-color: rgba(255, 255, 255, 0.1);
}
@@ -193,7 +218,7 @@ body {
display: block;
width: 100%;
height: auto;
- aspect-ratio: 16 / 10;
+ aspect-ratio: var(--aspect-ratio);
}
.framed-video-poster {
display: none;
@@ -227,12 +252,6 @@ body {
background-color: rgba(255, 255, 255, 0.1);
}
-.screenshot {
- max-width: 100%;
- overflow: hidden;
- box-shadow: rgba(0, 0, 0, 0.3) 0 0 10px 10px;
-}
-
.quotes {
width: 1100px;
max-width: 100%;