Skip to content

Optimize the Remotion output with ffmpeg command : crf, maxrate and bufsize using Lambda #3232

@llccrr

Description

@llccrr

Feature Request 🛍️

Having the possibility to override Ffmpeg Command in Remotion Lambda to optimize the output.mp4.

The idea would be to be able to configure this kind of settings : -crf 22 -maxrate 5000k -bufsize 10000k

That would permit to use CRF to avoid waste a lot of unnecessary bandwidth in some case when using VBR or CBR, but to cap the max bitrate to also avoid 10Mbps on a 720p video that is supposed to be delivered to the Web for example.

Use Case

The feature should permit to optimize the output of remotion based on our needs.
A video that will be used in a local environnement do not need to be encoded the same way than a video that will delivered to millions of people using a CDN.

Possible Solution

The first solution would be to add the options maxrate and bufsize to the renderMediaOnLambda() function.

Another solution would be to create a function similar to overrideFfmpefCommand() but compatible with Lambda

Response from Jonny :
image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions