Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/ai-edition/RightPanes.layout.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,11 @@ describe("LayoutPane picture-in-picture camera", () => {
expect(stored()).toMatchObject({ webcamAnchor: "right" });
});

it("offers a camera from 15% to 50% of the frame", () => {
it("offers a camera from 15% to 60% of the frame", () => {
renderLayout(seedProject(true));
const slider = screen.getByRole("slider", { name: "Webcam size" });
expect(slider).toHaveAttribute("min", "15");
expect(slider).toHaveAttribute("max", "50");
expect(slider).toHaveAttribute("max", "60");
});
});

Expand Down
3 changes: 1 addition & 2 deletions src/components/ai-edition/v4/V4Timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
Pencil,
Scissors,
Sparkles,
SplitSquareHorizontal,
Trash2,
Wand2,
ZoomIn,
Expand Down Expand Up @@ -1534,7 +1533,7 @@ export function V4Timeline({
id: "cut",
label: t("buttons.addTrim"),
shortcut: formatBinding(shortcuts.addTrim, isMac),
icon: <SplitSquareHorizontal size={16} />,
icon: <Scissors size={16} />,
},
{
id: "comment",
Expand Down
4 changes: 2 additions & 2 deletions src/components/video-editor/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import { clamp01 } from "@/utils/math";
export type { ZoomDepth, ZoomScaleInput };
export type ZoomFocusMode = "manual" | "auto";
export type { WebcamLayoutPreset };
/** Webcam size as a percentage of the canvas reference dimension (15-50). */
/** Webcam size as a percentage of the canvas reference dimension (15-60). */
export type WebcamSizePreset = number;

export const DEFAULT_WEBCAM_SIZE_PRESET: WebcamSizePreset = 25;
export const DEFAULT_WEBCAM_SIZE_PRESET: WebcamSizePreset = 40;

export const DEFAULT_WEBCAM_LAYOUT_PRESET: WebcamLayoutPreset = "picture-in-picture";

Expand Down
4 changes: 2 additions & 2 deletions src/lib/ai-edition/store/editorSettings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,12 @@ describe("patchEditorSettings", () => {
expect(read({})).toEqual(["square", 0.7]);
});

it("reads a camera size outside the slider's 15–50% into it", () => {
it("reads a camera size outside the slider's 15–60% into it", () => {
const read = (webcamSizePreset: number) =>
getEditorSettings({ ...baseDoc, legacyEditor: { webcamSizePreset } }).webcamSizePreset;
// An older build allowed 10%.
expect(read(10)).toBe(15);
expect(read(80)).toBe(50);
expect(read(80)).toBe(60);
});

it("preserves a non-zero crop at the bottom-right edge", () => {
Expand Down
12 changes: 6 additions & 6 deletions src/lib/compositeLayout.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe("computeCompositeLayout", () => {
});

const refDim = Math.sqrt(1280 * 720);
const defaultFraction = 25 / 100; // DEFAULT_WEBCAM_SIZE_PRESET = 25
const defaultFraction = 40 / 100; // DEFAULT_WEBCAM_SIZE_PRESET = 40
expect(layout).not.toBeNull();
expect(layout!.webcamRect).not.toBeNull();
expect(layout!.webcamRect!.width).toBeLessThanOrEqual(Math.round(refDim * defaultFraction) + 1);
Expand Down Expand Up @@ -580,7 +580,7 @@ describe("computeCompositeLayout", () => {

// A fraction of half the short side: the same value is the same shape at any size.
it("rounds by the roundness, and a fully round square is a circle", () => {
const circle = pipAt({ webcamMaskShape: "square", webcamRoundness: 1 });
const circle = pipAt({ webcamMaskShape: "square", webcamRoundness: 1, webcamSizePreset: 25 });
expect(circle.width).toBe(circle.height);
expect(circle.borderRadius).toBe(circle.width / 2);
expect(pipAt({ webcamRoundness: 0 }).borderRadius).toBe(0);
Expand Down Expand Up @@ -612,10 +612,10 @@ describe("computeCompositeLayout", () => {
}
});

// The size is the camera's long side: a 16:9 camera at the 50% cap is 540 x 304 in 1080p.
it("caps the camera at 50% of the short side", () => {
expect(pipAt({ webcamSizePreset: WEBCAM_SIZE_MAX })).toMatchObject({ width: 540, height: 304 });
expect(pipAt({ webcamSizePreset: 80 }).height).toBe(304);
// The size is the camera's long side: a 16:9 camera at the 60% cap is 648 x 365 in 1080p.
it("caps the camera at 60% of the short side", () => {
expect(pipAt({ webcamSizePreset: WEBCAM_SIZE_MAX })).toMatchObject({ width: 648, height: 365 });
expect(pipAt({ webcamSizePreset: 80 }).height).toBe(365);
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/lib/compositeLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ export function computeCompositeLayout(params: {
screenSize,
webcamSize,
layoutPreset = "picture-in-picture",
webcamSizePreset = 25,
webcamSizePreset = 40,
webcamAnchor = "bottom-right",
webcamMaskShape = "rectangle",
webcamRoundness = DEFAULT_WEBCAM_ROUNDNESS[
Expand Down
6 changes: 3 additions & 3 deletions src/lib/projectDefaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ const LEGACY_WEBCAM_ROUNDNESS = 0.3;

/**
* The picture-in-picture camera's size, in percent of the frame's short side: the camera's
* long side, so a 16:9 camera at 50 is 28% of a 1080p frame's height. Below 15 a face no
* long side, so a 16:9 camera at 60 is 34% of a 1080p frame's height. Below 15 a face no
* longer reads, and less still once a zoom shrinks it; older builds allowed 10, read back as 15.
*/
export const WEBCAM_SIZE_MIN = 15;
export const WEBCAM_SIZE_MAX = 50;
export const WEBCAM_SIZE_MAX = 60;

/**
* Reads a stored camera shape and roundness. `circle` and `rounded` were a proportion and a
Expand Down Expand Up @@ -253,7 +253,7 @@ export const DEFAULT_PROJECT_APPEARANCE: ProjectAppearanceDefaults = {
webcamRoundness: DEFAULT_WEBCAM_ROUNDNESS.square,
webcamMirrored: false,
webcamReactiveZoom: true,
webcamSizePreset: 25,
webcamSizePreset: 40,
webcamAnchor: "bottom-right",
webcamBackgroundMode: "none",
webcamWallpaper: "/wallpapers/wallpaper11.jpg",
Expand Down
4 changes: 2 additions & 2 deletions src/native/sceneDescription.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1259,11 +1259,11 @@ describe("buildSceneDescription.settings mapping", () => {
expect(buildSceneDescription(doc).layout.webcamSize).toBeCloseTo(0.334, 5);
});

it("webcamSize clamps below 15 and above 50", () => {
it("webcamSize clamps below 15 and above 60", () => {
const low = makeDoc({ legacyEditor: { webcamSizePreset: 2 } });
const high = makeDoc({ legacyEditor: { webcamSizePreset: 90 } });
expect(buildSceneDescription(low).layout.webcamSize).toBeCloseTo(0.15, 5);
expect(buildSceneDescription(high).layout.webcamSize).toBeCloseTo(0.5, 5);
expect(buildSceneDescription(high).layout.webcamSize).toBeCloseTo(0.6, 5);
});

it("carries the camera's anchor, the point its zoom-time shrink keeps fixed", () => {
Expand Down
2 changes: 1 addition & 1 deletion website/docs/guides/product-demo-video.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The webcam is recorded to its own file, so its placement is an editing decision

- **Picture in picture**, **Vertical stack**, **Dual frame**, or **No webcam**.
- For every layout: mirror, and a crop of the camera image.
- For **Picture in picture** only: **Camera shape** (Square by default, or Original, which keeps the camera's own proportions), **Roundness** (70% for Square and 40% for Original by default; at 100% a square camera is a circle), a size from 15 to 50% (25% by default), **Position** (a corner or the middle of an edge, bottom right by default), and **Shrink on zoom**, on by default, which makes the camera smaller while a zoom plays so it does not cover the detail. Drag the camera on the canvas and it snaps to the nearest position.
- For **Picture in picture** only: **Camera shape** (Square by default, or Original, which keeps the camera's own proportions), **Roundness** (70% for Square and 40% for Original by default; at 100% a square camera is a circle), a size from 15 to 60% (40% by default), **Position** (a corner or the middle of an edge, bottom right by default), and **Shrink on zoom**, on by default, which makes the camera smaller while a zoom plays so it does not cover the detail. Drag the camera on the canvas and it snaps to the nearest position.
- **Camera background**: Original, Blur, Cutout or Custom. Cutout removes the background without a green screen, using a segmentation model that runs on your CPU. This section only appears when the segmentation runtime loads on your machine.

For an intro or outro, press `C` to add a **Full Camera** segment: the camera fills the whole frame for that span.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Die Webcam wird in eine eigene Datei aufgenommen. Ihre Platzierung ist also eine

- **Picture in Picture**, **Vertical Stack**, **Dual Frame** oder **No Webcam**.
- Für jedes Layout: Spiegeln und ein Zuschnitt des Kamerabilds.
- Nur für **Picture in Picture**: **Camera Shape** (standardmäßig Square, oder Original, das die eigenen Proportionen der Kamera behält), **Roundness** (standardmäßig 70 % für Square und 40 % für Original; bei 100 % wird eine quadratische Kamera zum Kreis), eine Größe von 15 bis 50 % (standardmäßig 25 %), **Position** (eine Ecke oder die Mitte einer Kante, standardmäßig unten rechts) und **Shrink on Zoom**, standardmäßig an: Es verkleinert die Kamera, während ein Zoom läuft, damit sie das Detail nicht verdeckt. Zieh die Kamera auf der Arbeitsfläche, und sie rastet an der nächsten Position ein.
- Nur für **Picture in Picture**: **Camera Shape** (standardmäßig Square, oder Original, das die eigenen Proportionen der Kamera behält), **Roundness** (standardmäßig 70 % für Square und 40 % für Original; bei 100 % wird eine quadratische Kamera zum Kreis), eine Größe von 15 bis 60 % (standardmäßig 40 %), **Position** (eine Ecke oder die Mitte einer Kante, standardmäßig unten rechts) und **Shrink on Zoom**, standardmäßig an: Es verkleinert die Kamera, während ein Zoom läuft, damit sie das Detail nicht verdeckt. Zieh die Kamera auf der Arbeitsfläche, und sie rastet an der nächsten Position ein.
- **Camera Background**: Original, Blur, Cutout oder Custom. Cutout entfernt den Hintergrund ohne Greenscreen, mit einem Segmentierungsmodell, das auf deiner CPU läuft. Dieser Abschnitt erscheint nur, wenn sich die Segmentierungs-Laufzeit auf deinem Rechner laden lässt.

Für ein Intro oder Outro drückst du `C`, um ein **Full Camera**-Segment hinzuzufügen: Die Kamera füllt in diesem Abschnitt das ganze Bild.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ La cámara web se graba en su propio archivo, así que su ubicación es una deci

- **Imagen en imagen**, **Apilado vertical**, **Marco dual** o **Sin cámara**.
- En todas las disposiciones: reflejo y un encuadre de la imagen de la cámara.
- Solo en **Imagen en imagen**: **Forma de cámara** (Cuadrado por defecto, u Original, que conserva las proporciones propias de la cámara), **Redondez** (70 % para Cuadrado y 40 % para Original por defecto; al 100 % una cámara cuadrada es un círculo), un tamaño del 15 al 50 % (25 % por defecto), **Posición** (una esquina o el centro de un borde, abajo a la derecha por defecto) y **Reducir al ampliar**, activado por defecto, que hace más pequeña la cámara mientras se reproduce un zoom para que no tape el detalle. Arrastra la cámara sobre el lienzo y se ajusta a la posición más cercana.
- Solo en **Imagen en imagen**: **Forma de cámara** (Cuadrado por defecto, u Original, que conserva las proporciones propias de la cámara), **Redondez** (70 % para Cuadrado y 40 % para Original por defecto; al 100 % una cámara cuadrada es un círculo), un tamaño del 15 al 60 % (40 % por defecto), **Posición** (una esquina o el centro de un borde, abajo a la derecha por defecto) y **Reducir al ampliar**, activado por defecto, que hace más pequeña la cámara mientras se reproduce un zoom para que no tape el detalle. Arrastra la cámara sobre el lienzo y se ajusta a la posición más cercana.
- **Fondo de la cámara**: Original, Desenfocado, Recortado o Personalizado. Recortado quita el fondo sin pantalla verde, con un modelo de segmentación que se ejecuta en tu CPU. Esta sección solo aparece cuando el entorno de ejecución de segmentación se carga en tu equipo.

Para una introducción o un cierre, presiona `C` para agregar un segmento de **Cámara a pantalla completa**: la cámara llena todo el cuadro durante ese tramo.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ La webcam est enregistrée dans son propre fichier : son placement est donc une

- **Incrustation d'image**, **Empilement vertical**, **Double cadre** ou **Sans webcam**.
- Pour toutes les dispositions : miroir, et recadrage de l'image de la caméra.
- Pour **Incrustation d'image** uniquement : **Forme de la caméra** (Carré par défaut, ou Original, qui garde les proportions de la caméra), **Arrondi** (70 % pour Carré et 40 % pour Original par défaut ; à 100 % une caméra carrée devient un cercle), une taille de 15 à 50 % (25 % par défaut), **Position** (un coin ou le milieu d'un bord, en bas à droite par défaut), et **Réduire au zoom**, activé par défaut, qui réduit la caméra pendant un zoom pour qu'elle ne cache pas le détail. Faites glisser la caméra sur le canevas : elle se cale sur la position la plus proche.
- Pour **Incrustation d'image** uniquement : **Forme de la caméra** (Carré par défaut, ou Original, qui garde les proportions de la caméra), **Arrondi** (70 % pour Carré et 40 % pour Original par défaut ; à 100 % une caméra carrée devient un cercle), une taille de 15 à 60 % (40 % par défaut), **Position** (un coin ou le milieu d'un bord, en bas à droite par défaut), et **Réduire au zoom**, activé par défaut, qui réduit la caméra pendant un zoom pour qu'elle ne cache pas le détail. Faites glisser la caméra sur le canevas : elle se cale sur la position la plus proche.
- **Arrière-plan de la caméra** : Original, Flouté, Détouré ou Personnalisé. Détouré retire l'arrière-plan sans fond vert, grâce à un modèle de segmentation qui tourne sur votre CPU. Cette section n'apparaît que si le moteur de segmentation se charge sur votre machine.

Pour une introduction ou une conclusion, appuyez sur `C` pour ajouter un segment **Caméra plein écran** : la caméra remplit tout le cadre pendant ce passage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ HUD のすべてのコントロールについては、[画面録画](../recordi

- **ピクチャーインピクチャ**、**縦並び**、**デュアルフレーム**、**Webカメラなし**。
- すべてのレイアウトに共通:左右反転と、カメラ映像のクロップ。
- **ピクチャーインピクチャ**のみ:**カメラの形状**(既定は正方形。オリジナルはカメラ本来の縦横比を保ちます)、**丸み**(既定は正方形で 70%、オリジナルで 40%。100% で正方形のカメラは円になります)、15〜50% のサイズ(既定は 25%)、**位置**(角または辺の中央。既定は右下)、既定でオンの**ズーム時に縮小**。ズーム時に縮小は、ズームの再生中にカメラを小さくして、細部を隠さないようにします。カメラをキャンバス上でドラッグすると、いちばん近い位置に吸着します。
- **ピクチャーインピクチャ**のみ:**カメラの形状**(既定は正方形。オリジナルはカメラ本来の縦横比を保ちます)、**丸み**(既定は正方形で 70%、オリジナルで 40%。100% で正方形のカメラは円になります)、15〜60% のサイズ(既定は 40%)、**位置**(角または辺の中央。既定は右下)、既定でオンの**ズーム時に縮小**。ズーム時に縮小は、ズームの再生中にカメラを小さくして、細部を隠さないようにします。カメラをキャンバス上でドラッグすると、いちばん近い位置に吸着します。
- **カメラ背景**:オリジナル、ぼかし、切り抜き、カスタム。切り抜きは、CPU 上で動くセグメンテーションモデルを使い、グリーンバックなしで背景を取り除きます。このセクションは、お使いのパソコンでセグメンテーションのランタイムを読み込めた場合にのみ表示されます。

イントロやアウトロには、`C` を押して**フルスクリーンカメラ**のセグメントを追加します。その区間では、カメラがフレーム全体を占めます。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ A webcam é gravada em um arquivo próprio, então a posição dela é uma decis

- **Picture in Picture**, **Empilhamento Vertical**, **Quadro Duplo** ou **Sem Webcam**.
- Em todos os layouts: espelhamento e um enquadramento da imagem da câmera.
- Só em **Picture in Picture**: **Formato da Câmera** (Quadrado por padrão, ou Original, que mantém as proporções da própria câmera), **Arredondamento** (70% para Quadrado e 40% para Original por padrão; a 100% uma câmera quadrada vira um círculo), um tamanho de 15 a 50% (25% por padrão), **Posição** (um canto ou o meio de uma borda, embaixo à direita por padrão) e **Encolher ao ampliar**, ativado por padrão, que deixa a câmera menor enquanto um zoom é exibido, para que ela não cubra o detalhe. Arraste a câmera no canvas e ela se encaixa na posição mais próxima.
- Só em **Picture in Picture**: **Formato da Câmera** (Quadrado por padrão, ou Original, que mantém as proporções da própria câmera), **Arredondamento** (70% para Quadrado e 40% para Original por padrão; a 100% uma câmera quadrada vira um círculo), um tamanho de 15 a 60% (40% por padrão), **Posição** (um canto ou o meio de uma borda, embaixo à direita por padrão) e **Encolher ao ampliar**, ativado por padrão, que deixa a câmera menor enquanto um zoom é exibido, para que ela não cubra o detalhe. Arraste a câmera no canvas e ela se encaixa na posição mais próxima.
- **Plano de fundo da câmera**: Original, Desfocado, Recorte ou Personalizado. Recorte remove o fundo sem tela verde, usando um modelo de segmentação que roda na sua CPU. Esta seção só aparece quando o runtime de segmentação carrega no seu computador.

Para uma introdução ou um encerramento, pressione `C` para adicionar um segmento de **Câmera em Tela Cheia**: a câmera preenche o quadro inteiro nesse trecho.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ HUD 的全部控件请参阅[录制](../recording.md)。

- **画中画**、**垂直堆叠**、**双画框**或**无摄像头**。
- 所有布局均可设置:镜像,以及裁剪摄像头画面。
- 仅限**画中画**:**摄像头形状**(默认正方形,或保持摄像头自身比例的原始)、**圆角**(正方形默认 70%,原始默认 40%;100% 时正方形摄像头就是圆形)、15% 到 50% 的大小(默认 25%)、**位置**(某个角或某条边的中点,默认右下),以及默认开启的**缩放时缩小**,它会在播放缩放时把摄像头画面变小,以免挡住细节。在画布上拖动摄像头画面,它会吸附到最近的位置。
- 仅限**画中画**:**摄像头形状**(默认正方形,或保持摄像头自身比例的原始)、**圆角**(正方形默认 70%,原始默认 40%;100% 时正方形摄像头就是圆形)、15% 到 60% 的大小(默认 40%)、**位置**(某个角或某条边的中点,默认右下),以及默认开启的**缩放时缩小**,它会在播放缩放时把摄像头画面变小,以免挡住细节。在画布上拖动摄像头画面,它会吸附到最近的位置。
- **摄像头背景**:原画、模糊、抠图或自定义。抠图无需绿幕即可去除背景,使用的是在你的 CPU 上运行的分割模型。只有当分割运行时能在你的电脑上加载时,才会显示这一部分。

如需片头或片尾,按 `C` 添加一个**全屏摄像头**区间:在这段时间内,摄像头画面会占满整个画面。
Expand Down
Loading
Loading