Closed wibed closed 1 year ago
from here: https://www.ffmpeg.org/doxygen/0.5/swscale-example_8c-source.html
i can deduce the settings necessary in swsContext
an example:
let swsContext = SwsContext(
srcWidth: oldWidth,
srcHeight: oldHeight,
srcPixelFormat: destinationFrame.pixelFormat,
dstWidth: newWidth,
dstHeight: newHeight,
dstPixelFormat: destinationFrame.pixelFormat,
flags: .bilinear)!
it would be nice if we could have an example on how to force the existing aspect ratio. atm i am experience a crop after scale.
even better would be to expand such an example with a link to a collection of options.