Skip to main content

编辑器入门版不包含的功能

Remotion 编辑器入门版旨在仅包含每个视频编辑器都需要的显而易见的功能。

🌐 The Remotion Editor Starter aims to include only the obvious features that every video editor needs.

某些功能可能会:

🌐 Certain features may:

  • 需要一个过于自以为是的实现或
  • 对买家来说过于复杂,难以理解和采用,或者
  • 不是必要的。

我们设计编辑器入门版是为了为希望开发具有视频编辑功能的应用的开发者提供一个起点,而不是一个完整的产品。

🌐 We design the Editor Starter to be a starting point for developers wanting to build apps with video editing capabilities, not a complete product.

我们的重点是为你提供一些简单的东西,让你能够理解并进行迭代。

🌐 Our focus is to give you something simple that you are able to understand and iterate on.

这意味着如果你想包含某些功能,你将不得不自己实现它们。 以下列表是不完整的,列出了我们不包括的功能。

🌐 This means that if you want the include certain features, you will have to implement them yourself.
The following list is an incomplete list of features that we do not include.

关键帧和动画

🌐 Keyframing and animation

图层的属性是静态的,不会随时间动画变化。

🌐 The properties of a layer are static and are not animated over time.

如果你希望包含关键帧支持,我们建议你将属性的值类型替换为关键帧数组,并使用 interpolate 函数在它们之间进行插值。
请考虑到大多数视频编辑器也允许你编辑时间,你可以使用 Easing 函数来实现它。

🌐 Should you want to include support for keyframes, we recommend that you replace the value type of a property with an array of keyframes and interpolate between them using the interpolate function.
Consider that most video editors allow you to edit the timing as well, you can achieve it using the Easing functions.

过渡

🌐 Transitions

编辑器入门版不包含过渡支持。

🌐 No transition support is included in the Editor Starter.

如果你想包含对过渡的支持,我们建议你首先检测轨道上的项目是否相邻(类似于滚动编辑功能的做法)。 如果项目是相邻的,你可以替换它们的正常渲染并改为在<TransitionSeries>中渲染它们。

🌐 If you would like to include support for transitions, we recommend that you first detect whether items on a track are adjacent (similar to what the rolling edits feature does). If items are adjacent, you can replace their normal rendering and render them in a <TransitionSeries> instead.

项目管理

🌐 Project management

你负责构建一个供用户管理其项目的界面。每个 <Editor /> 实例都是一个独立的编辑器体验。

🌐 You are responsible for building an interface for the user to manage their projects.
Each instance of <Editor /> is an isolated editor experience.

如果保存按钮已启用,则通过loadState()函数加载状态,否则通过getInitialState()函数加载状态。
如果保存按钮功能已启用,则通过saveState()函数保存状态,否则根本不保存。

🌐 State is loaded through the loadState() function if the Save button is enabled, or through getInitialState() otherwise.
State is saved through the saveState() function if the Save button feature is enabled, or not at all otherwise.

如果你希望用户能够在多个项目上工作,我们预见到你需要更改这些功能,以正确加载和保存相应的项目,并通过例如 URL 参数来识别当前项目。

🌐 If you want an user to allow to work on multiple projects, we foresee that you change these functions to properly load and save the corresponding projects and identify the current project for example through a URL parameter.

自动保存

🌐 Auto-save

我们只提供一个功能来手动将编辑器的状态保存到本地存储中。 如果你想要包含自动保存功能,我们建议你使用useFullState()钩子来获取编辑器的完整状态,并使用useEffect在状态更改时运行代码。

🌐 We only provide a feature to manually save the state of the editor to local storage.
Should you want to include an auto-save functionality, we recommend that you use the useFullState() hook to get the full state of the editor and use an useEffect to run code when the state changes.

请参见 <SaveButton /> 的逻辑,以查看 useFullState() 的示例。

🌐 See the logic of <SaveButton /> to see an example of useFullState().

移动支持

🌐 Mobile support

编辑器入门版未针对手机使用进行优化。我们预计你只为桌面用户提供视频编辑界面。

🌐 The Editor Starter is not optimized for use on phones.
We foresee that you offer your video editing interface only for desktop users.

多帧率

🌐 Multiple frame rates

编辑器启动器的帧率默认固定为 30 帧每秒,由 DEFAULT_FPS 常量设置。

🌐 The frame rate of the editor starter is fixed to 30 fps by default, set by the DEFAULT_FPS constant.

如果你想要使用不同的默认帧率,可以更改常量。

🌐 If you would like to have a different default frame rate, you can change the constant.

如果你想支持多种帧率,你需要修改状态,以便将 undoableState.fps 改为你想要的值。此外,当你动态改变帧率时,你需要将这些项目转换为新的帧率。例如,每个项目都有一个以帧表示的 fromdurationInFrames 属性,需要转换为新的帧率。

🌐 If you want to support multiple frame rates, you need to mutate the state so that undoableState.fps changes to your desire. In addition, when you change the frame rate dynamically, you need to convert the items to the new frame rate.
For example, each item has a from and durationInFrames property which is expressed in frames and needs to be converted to the new frame rate.

验证

🌐 Authentication

Editor Starter 中不包含登录、认证、授权或用户管理功能。
如果你希望有登录流程,我们预见到你会在用户已登录时才显示的页面中挂载 <Editor /> 组件。

🌐 There is no login, authentication, authorization or user management included in the Editor Starter.
We foresee that you mount the <Editor /> component in a page that is shown only if the user is logged in if you desire to have a login flow.

请确保为模板中提供的资源上传、字幕生成和渲染端点添加适当的保护,因为我们尚未为它们添加任何保护。

🌐 Make sure to add adequate protection to the asset uploading, captioning and rendering endpoints that come with the template, as we have not added any protection to them.

任意字体

🌐 Arbitrary fonts

我们的字体选择器完全基于 Google 字体,并且默认只包含最流行的字体。

🌐 Our Font Picker is fully based on Google Fonts and by default only includes the most popular fonts.

如果你希望允许用户上传他们自己的字体或为你的用户提供其他字体,你需要重构编辑器入门(Editor Starter),以便在预览和渲染时加载正确的字体。 @remotion/fonts 是实现这一目的的好方法。

🌐 If you would like to allow users to upload their own fonts or provide other fonts for your users, you need to refactor the Editor Starter to load the correct fonts during preview and rendering.
@remotion/fonts is a good way to achieve this.

你还需要重构字体选择器以显示来自其他来源的额外字体,并可能需要调整加载下拉菜单预览字体以及在鼠标悬停字体时加载预览字体的逻辑。

🌐 You also need to refactor the Font Picker to show the additional fonts from additional sources and may need to adjust the logic for loading the dropdown preview font and for loading the preview font when hovering over a font.

为长音频文件添加字幕

🌐 Captioning long audio files

目前,我们使用 OpenAI Whisper API 为音频文件添加字幕,该 API 仅支持最大 25MB 的音频文件。
如何处理较长的音频文件由你自行决定。

🌐 Currently, we use the OpenAI Whisper API to caption audio files, which is limited to audio files up to 25MB in size.
It is left up to you to decide how to handle long audio files.

参见:字幕 - 限制

🌐 See: Captioning - Limits

浅色模式

🌐 Light mode

只有一个主题,一个黑暗的主题。

🌐 There is only one theme, a dark one.

另请参阅

🌐 See also