How to modify FFMPEG on KMS

FFMPEG running on KMS with FPS = 30, Resolution: 1920x1080.
But output on my device is FPS = 20, Resolution: 960x540.
How to I configure ffmpeg’s parameters to be the same size of image output from my device?

Are you referring to COMPOSED recording?

If so, you can create a custom chrome container with your specific requirements and configure it in the .env file.

1 Like

The resolution is a parameter you can already set with the default container. See body parameter “resolution”: https://docs.openvidu.io/en/2.15.0/reference-docs/REST-API/#post-apirecordingsstart

Framerate cannot be changed for now.

1 Like

I used docker-compose for deploying. Please tell me the composed.sh path!

I used API “/api/sessions”. So how can I setting resolution?
It seems that this parameter is only used in api “/api /recordings/start”

You can configure a resolution different for each composed recording. It is not a global configuration, but a recording specific one. That’s why it is in /api/recordings/start.

Ah sorry I did not announce enough. I use the “/ api / sessions” API with param “recordingMode: always”.

Yes, then you are right. There is not default option for pre-setting resolution for ALWAYS recording.
If resolution is important to you, then you must use MANUAL recording and initiate it yourself from your backend whenever you want.

Thanks so much!
And I have a question. I’m creating an application has recording with COMPOSED mode. it seems that the small frames in the final mp4 file are cut by FFMPEG on two sides. How do I get all the original frames in final mp4 file.