FMovieRenderPlan
The frames an offline render walks and what it calls them. Pure, so the fixed-timestep contract — every frame of [start, end) exactly once, in order, at the sequence's own rate — is pinned without a device.
- Module
- Sequencer
- Header
#include "Sequencer/MovieRenderOutput.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
std::vector<int32_t> | FrameList | |
std::string | FrameFileName | "Intro" + 12 -> "Intro.0012.png". |
std::string | SanitizeName | A sequence name is not a file name: path separators and the characters Windows refuses would scatter or drop the output. |
void | ApplyFade | The editor draws a fade track as a widget over the viewport, which a readback never sees, so a rendered movie composites it itself. |
bool | WritesPng | |
bool | WritesAvi | |
bool | WritesMp4 | |
FMovieFrameRate | RationalFrameRate | The sequence's float rate as a container rational: whole rates over 1, the NTSC family (23.976, 29.97, 47.952, 59.94, 119.88) as N*1000/1001, anything else to three decimals over 1000. |
uint64_t | AudioSampleAt | The first audio sample of movie frame frameFromStart. |
std::vector<float> | MixAudio | The audio tracks summed over [startFrame, endFrame): stereo, interleaved, AudioSampleAt(endFrame - startFrame) frames long. |
bool | WriteWav | 16-bit PCM WAV, the stem that travels next to an AVI or a PNG sequence. |
bool | WritePngFrame | Deflate-compressed PNG through stb rather than ScreenCapture's stored blocks: a stored 1080p frame is 8 MB, and a movie is hundreds of them. |
Function details
FrameList
static std::vector<int32_t> FrameList(int32_t startFrame, int32_t endFrame)FrameFileName
static std::string FrameFileName(const std::string& baseName, int32_t frame, const char* extension)"Intro" + 12 -> "Intro.0012.png". The padding is fixed so an editor or a compositor that sorts the folder by name sees the frames in order.
SanitizeName
static std::string SanitizeName(const std::string& name)A sequence name is not a file name: path separators and the characters Windows refuses would scatter or drop the output.
ApplyFade
static void ApplyFade(std::vector<uint8_t>& rgba, float fadeAlpha)The editor draws a fade track as a widget over the viewport, which a readback never sees, so a rendered movie composites it itself.
WritesPng
static bool WritesPng(EMovieRenderFormat format)WritesAvi
static bool WritesAvi(EMovieRenderFormat format)WritesMp4
static bool WritesMp4(EMovieRenderFormat format)RationalFrameRate
static FMovieFrameRate RationalFrameRate(float framesPerSecond)The sequence's float rate as a container rational: whole rates over 1, the NTSC family (23.976, 29.97, 47.952, 59.94, 119.88) as N*1000/1001, anything else to three decimals over 1000. Zero or negative is 24/1.
AudioSampleAt
static uint64_t AudioSampleAt(int64_t frameFromStart, double frameRate, uint32_t sampleRate)The first audio sample of movie frame frameFromStart. Frame i's audio is [AudioSampleAt(i), AudioSampleAt(i + 1)), so chunks written a frame at a time tile the mix exactly, with no sample dropped or doubled by rounding a non-integer samples-per-frame. Double, so an NTSC rate's FMovieFrameRate::Value() keeps the audio on the video's exact clock.
MixAudio
static std::vector<float> MixAudio(const std::vector<FMovieAudioClip>& clips, int32_t startFrame, int32_t endFrame, double frameRate, uint32_t sampleRate)The audio tracks summed over [startFrame, endFrame): stereo, interleaved, AudioSampleAt(endFrame - startFrame) frames long. A clip plays its source from the beginning at its StartFrame for DurationFrames, as the Sequencer previews it; a clip that starts before the range enters part-way through. The sum is clamped to [-1, 1].
WriteWav
static bool WriteWav(const std::string& path, const std::vector<float>& interleaved, uint32_t channels, uint32_t sampleRate)16-bit PCM WAV, the stem that travels next to an AVI or a PNG sequence.
WritePngFrame
static bool WritePngFrame(const std::string& path, const std::vector<uint8_t>& rgba, uint32_t width, uint32_t height)Deflate-compressed PNG through stb rather than ScreenCapture's stored blocks: a stored 1080p frame is 8 MB, and a movie is hundreds of them.