Function
toAvFrame
ts
toAvFrame(
sample: VideoSample | AudioSample,
frame: NodeAv.Frame,
): Promise<void>;Copies a VideoSample or AudioSample into the given NodeAV Frame, setting up the frame's format, media type, timing and data. When the sample is already backed by an AVFrame (via AvFrameVideoSampleResource or AvFrameAudioSampleResource), the frame is ref'd instead of copied for zero-copy reuse.
For video samples, the frame's time base is always set to 1/1000000 (microsecond accuracy). For audio samples, the frame's time base is always set to 1/sampleRate.
See VideoSample and AudioSample.