设置视频元数据
视频文件可以在其中存储元数据。
可以使用 npx remotion ffprobe 命令查看此元数据:
🌐 Video files can store metadata in them.
This metadata can be viewed using the npx remotion ffprobe command:
Getting metadata$ npx remotion ffprobe bigbuckbunny.mp4 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bigbuckbunny.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isomavc1mp42 creation_time : 2010-01-10T08:29:06.000000Z comment : This is a comment artist : Remotion Duration: 00:09:56.47, start: 0.000000, bitrate: 2119 kb/s Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default) Metadata: creation_time : 2010-01-10T08:29:06.000000Z handler_name : (C) 2007 Google Inc. v08.13.2007. vendor_id : [0][0][0][0] Stream #0:1[0x2](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 1991 kb/s, 24 fps, 24 tbr, 24k tbn (default) Metadata: creation_time : 2010-01-10T08:29:06.000000Z handler_name : (C) 2007 Google Inc. v08.13.2007. vendor_id : [0][0][0][0]
添加元数据v4.0.216
🌐 Adding metadatav4.0.216
你可以在使用 Remotion 渲染视频时设置元数据
🌐 You can set metadata when rendering videos with Remotion using
--metadata在npx remotion render--metadata在npx remotion lambda render--metadata在npx remotion cloudrun rendermetadata在renderMedia()metadata在renderMediaOnLambda()metadata在renderMediaOnCloudrun()
已接受的元数据
🌐 Accepted metadata
ISO 基本媒体格式视频(.mp4、.mov)仅接受以下元数据:
🌐 ISO Base Media Format videos (.mp4, .mov) only accepts the following metadata:
titleartistalbum_artistcomposeralbumdateencoding_tool(已由 FFmpeg 设置)comment(已由 Remotion 设置)genrecopyrightgroupinglyricsdescriptionsynopsisshowepisode_idnetworkkeywordsepisode_sort(int8)season_number(int8)media_type(int8)hd_video(int8)gapless_playback(int8)compilation(int8)
标记为“int8”的字段期望输入一个介于0到255之间的数值。
🌐 Fields designated with "int8" expect a numeric value between 0 and 255.
Matroska 视频(.webm、.mkv)接受任意键值字段。
这些键始终不区分大小写。
🌐 The keys are always case-insensitive.
预定义元数据
🌐 Predefined metadata
Remotion 已经将 comment 字段设置为 Made with Remotion [VERSION]。
如果你设置自定义评论,它将与 Remotion 的评论合并。
🌐 Remotion already sets the comment field to Made with Remotion [VERSION].
If you set a custom comment, it will be merged with Remotion's comment.
FFmpeg 也已经将 encoder 字段设置为 Lavc[VERSION](代表“libavcodec”,FFmpeg 的视频编码库)。
🌐 FFmpeg also already sets the encoder field to Lavc[VERSION] (stands for "libavcodec", FFmpeg's video codec library).