Resolved

Video rendering performance too slow with high FPS settings

Python
Video Processing
Performance
Optimization
FFmpeg
Rendering
Media
Backend

60 FPS video generation caused excessive render times and large file sizes | Reduced FPS to 25 across all resolutions for 2.4x faster processing

Issue

The video rendering pipeline experienced performance bottlenecks due to excessive frame rates (60 FPS) across all output profiles, including high-resolution formats (1080p, 4K) and social media presets. This resulted in prolonged render durations, oversized output files, and inefficient resource utilization during frame generation.

Culprit

The configuration system enforced uniformly high frame rates (60 FPS) for all output profiles, including formats that did not require such high frame density. Specifically:

  • High-resolution outputs (1080p, 4K) were unnecessarily set to 60 FPS, despite the fact that 25-30 FPS is sufficient for most use cases.
  • Social media formats (e.g., Instagram Stories, TikTok) already used non-standard frame rates (30 FPS), creating inconsistencies in the configuration.
  • No resolution-specific optimization was applied, leading to redundant frame generation across all profiles.

Solution

The frame rate configuration was standardized to 25 FPS across all output profiles to:

  • Improve rendering efficiency by reducing unnecessary frame density.
  • Align with common standards for web and social media video formats.
  • Optimize resource utilization by reducing CPU and memory overhead during frame generation.

This adjustment resulted in:

  • 2.4x faster frame generation by reducing frame rate from 60 FPS to 25 FPS.
  • Proportional reduction in file sizes (~58% fewer frames per second), improving storage and bandwidth efficiency.
  • Standardized output across all platforms, ensuring consistency and eliminating special cases for social media formats.

The chosen frame rate of 25 FPS aligns with PAL broadcast standards and common web video optimizations while maintaining smooth motion for most content types.