Closed murph closed 3 years ago
While testing my remarkable 2, I found the scaling in webcam mode a bit off.
It turns out that we don't need to do this math at all, ffmpeg has options to scale based on one dimension and pad to center automatically.
Documentation for "pad" - https://ffmpeg.org/ffmpeg-filters.html#pad-1 Documentation for "scale" - https://ffmpeg.org/ffmpeg-filters.html#scale-1
Tested on remarkable 2 (so, merged with that branch) and a relatively modern version of ffmpeg on my machine.
Tested on rM1, it works.
The wording in ffmpegs documentation was a bit too complicated to spot this functionality on the first read.
Thank you for your contribution @murph :+1:
While testing my remarkable 2, I found the scaling in webcam mode a bit off.
It turns out that we don't need to do this math at all, ffmpeg has options to scale based on one dimension and pad to center automatically.
Documentation for "pad" - https://ffmpeg.org/ffmpeg-filters.html#pad-1 Documentation for "scale" - https://ffmpeg.org/ffmpeg-filters.html#scale-1
Tested on remarkable 2 (so, merged with that branch) and a relatively modern version of ffmpeg on my machine.