Skip to main content

encode_mp4

Function encode_mp4 

Source
pub async fn encode_mp4(config: &EncodeConfig) -> Result<(), RenderError>
Expand description

Encode rendered PNG frames into an MP4 video file using FFmpeg.

Executes the command: ffmpeg -y -framerate <fps> -i <frames_dir>/frame_%06d.png -c:v libx264 -crf 18 -preset fast -pix_fmt yuv420p -s <width>x<height> -movflags +faststart <output_mp4>

Logs invocation details and captures stderr output using tracing.