remotion-dev / remotion

🎥 Make videos programmatically with React
https://remotion.dev
Other
20.31k stars 1.01k forks source link

Add concurrency in RenderMediaOnProgress callback arguments for better estimating #4051

Closed XeroAlpha closed 2 months ago

XeroAlpha commented 3 months ago

Feature Request 🛍️

The progress.renderEstimatedTime value in the RenderMediaOnProgress callback represents the sum of the estimated rendering times for each remaining page. To obtain the actual estimated rendering time, I need to divide it by the concurrency field. Therefore, it would be helpful to include the concurrency field in order to perform the calculation.

Use Case

await renderMedia({
  onProgress({ progress, renderEstimatedTime, concurrency }) {
    console.log(`${progress * 100}% ${renderEstimatedTime / concurrency / 1000} second(s) left`);
  }
});
JonnyBurger commented 2 months ago

Thanks for the suggestion!