VideoEncoder
One configured and opened video encoder. Pull from a Flow<Frame> via drive. That call pushes each frame into the encoder, pulls packets, hands them to the sink's muxer, and flushes when the flow completes.
Incoming frame pts are rescaled from the frame's own time-base onto the encoder's, which has one tick per frame at VideoEncoderSpec.frameRate. A frame whose pts lands on or before the tick of the frame before it is refused with FFmpegException, because moving it later would slow the video down: feed frames at the encoder's rate, dropping or repeating them first when the source is faster or slower, as Transcoder does. Frames without pts fall back to a frame counter.
One configured and opened video encoder. Pull from a Flow<Frame> via drive. That call pushes each frame into the encoder, pulls packets, hands them to the sink's muxer, and flushes when the flow completes.
Incoming frame pts are rescaled from the frame's own time-base onto the encoder's, which has one tick per frame at VideoEncoderSpec.frameRate. A frame whose pts lands on or before the tick of the frame before it is refused with FFmpegException, because moving it later would slow the video down: feed frames at the encoder's rate, dropping or repeating them first when the source is faster or slower, as Transcoder does. Frames without pts fall back to a frame counter.
One configured and opened video encoder. Pull from a Flow<Frame> via drive. That call pushes each frame into the encoder, pulls packets, hands them to the sink's muxer, and flushes when the flow completes.
Incoming frame pts are rescaled from the frame's own time-base onto the encoder's, which has one tick per frame at VideoEncoderSpec.frameRate. A frame whose pts lands on or before the tick of the frame before it is refused with FFmpegException, because moving it later would slow the video down: feed frames at the encoder's rate, dropping or repeating them first when the source is faster or slower, as Transcoder does. Frames without pts fall back to a frame counter.
One configured and opened video encoder. Pull from a Flow<Frame> via drive. That call pushes each frame into the encoder, pulls packets, hands them to the sink's muxer, and flushes when the flow completes.
Incoming frame pts are rescaled from the frame's own time-base onto the encoder's, which has one tick per frame at VideoEncoderSpec.frameRate. A frame whose pts lands on or before the tick of the frame before it is refused with FFmpegException, because moving it later would slow the video down: feed frames at the encoder's rate, dropping or repeating them first when the source is faster or slower, as Transcoder does. Frames without pts fall back to a frame counter.
Functions
Drain input into this encoder + the parent muxer. Returns when the flow completes. Reports progress every progressEveryNFrames via onProgress (the encoded-frame count).
Drain input into this encoder + the parent muxer. Returns when the flow completes. Reports progress every progressEveryNFrames via onProgress (the encoded-frame count).
Drain input into this encoder + the parent muxer. Returns when the flow completes. Reports progress every progressEveryNFrames via onProgress (the encoded-frame count).