ffmpeg-extract-frames icon indicating copy to clipboard operation
ffmpeg-extract-frames copied to clipboard

Allow setting frame size for scaling purposes

Open kkbhav opened this issue 5 years ago • 2 comments

Would it be possible to give frame size in the command? I have a use case where I have to scale down images manually. If this can be done directly while generating screenshots, it will save a lot of processing and speed up my process.

kkbhav avatar Sep 09 '19 10:09 kkbhav

Hi @kkbhav - can you give an example of how you would pass the scale parameter? - some example values?

adamrhunter avatar Nov 08 '19 15:11 adamrhunter

Hi @adamrhunter The size parameter can be directly passed to screenshots function on FFmpeg object. Allowed values for size parameter are: 640x480 640x? ?x400 50%

? in the above values will be replaced with a value calculated using aspect ration of the input video.

Eg.:

cmd.screenshots({ folder: '/Users/kkbhav/Desktop/temp', filename: '%d.jpeg', size: '640x480' })

kkbhav avatar Nov 15 '19 06:11 kkbhav