Skip to content

[feat] media: offer WebM and MP4 for video trims - #540

Merged
wangtiance merged 1 commit into
ThinkFlowLab:mainfrom
wangtiance:codex/video-trim-output-format
Nov 27, 2026
Merged

wangtiance merged 1 commit into
ThinkFlowLab:mainfrom
wangtiance:codex/video-trim-output-format

Conversation

@wangtiance

Copy link
Copy Markdown
Collaborator

Summary

  • Add a WebM and MP4 selector to both video duration trim editors. WebM remains the default.
  • Save MP4 with H.264 video and AAC audio when the source has audio, so trimmed clips can be reused with models that require MP4 references.
  • Record the selected format with the published edit and update the English and Chinese guides.

Linked issue

  • No linked issue applies.

Labels

  • Requested labels are type:feat and area:canvas.

Test plan

  • Local checks on the implementation branch included npm run build, npm run check:i18n, and all 998 Node tests.
  • In Chrome, switched between Chinese and English and saved both formats from MP4 and WebM inputs. Inspected the persisted assets with ffprobe and confirmed the selected two-second range, actual containers, and preserved audio.
  • The rebased commit passed git diff --check. Repository CI will validate the rebased tip.

Evidence that it works

  • The persisted MP4 from the WebM fixture measured 2.027 seconds and contained H.264 video and AAC audio. The persisted WebM contained VP9 video and Opus audio.
  • Browser verification was completed. No screenshot or recording was attached.

Provider verification

  • No provider calls were made. Verification covered trimming, project publication, and the saved media bytes.

Bilingual UI

  • Updated and exercised both zh-CN and en-US.

中文摘要

  • 在「时长修剪」里新增 WebM 和 MP4 保存选项,默认仍为 WebM。
  • MP4 使用 H.264 视频编码,有源音轨时使用 AAC 音频编码,可用于要求 MP4 格式的参考视频场景。
  • 已在 Chrome 中切换中英文界面并实际保存两种格式,使用 ffprobe 核对容器、时长和音轨。未调用真实模型。

## summary

- Add a format selector to video trim editors and default to WebM.
- Save MP4 trims with H.264 video and AAC audio when present.
- Record the chosen format with the published edit and document both
  options in English and Chinese.
@github-actions github-actions Bot added area:canvas Canvas, nodes and direct manipulation modality:video Video generation, editing or rendering type:feat New capability or behaviour labels Nov 27, 2026
@wangtiance
wangtiance merged commit 293ba8c into ThinkFlowLab:main Nov 27, 2026
13 checks passed
@wangtiance
wangtiance deleted the codex/video-trim-output-format branch November 28, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:canvas Canvas, nodes and direct manipulation modality:video Video generation, editing or rendering type:feat New capability or behaviour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant