


In this chapter, we'll crop the input video to given dimensions.

Created in 2000, it is a powerful command-line tool that runs on Linux, Windows and Mac operating systems. He continues to contribute to FFmpeg, and has fixed some bugs in libswscale after GSoC has ended.įFmpeg is a multiplatform, open-source library to record, convert and stream video and audio files. įfmpeg -i input -vf scale=512:384:gamma=1 output Pedro has done impressive work considering the short time available, and he is a FFmpeg committer now. For an excellent source on resampling methods go here. This scaling is not needed, your preference.įfmpeg -i input -vf "scale=w=1280:h=720:force_original_aspect_ratio=2,crop=1280:720" output Use your player If you don't want to bother with re-encoding, then any player worth using should allow you to do this upon playback.įfmpeg -i input.mp4 -vf scale=1920x1080:flags=lanczos output_1080p.mp4 This uses FFmpeg scaling with Lanczos resampling. This scaling is not needed, your preference. Scale=960:720 Scaling the video slightly to bring it back to your original 720p, the 960 is to keep it at a nice 4x3 ratio. Encoding and decoding work must be explicitly assigned to a GPU when using multiple GPUs in one system. 2 Scaler Options The video scaler supports the following named options.įinally, the image is scaled using scale_npp and encoded on the GPU. In particular it allows one to perform image rescaling and pixel format conversion. The FFmpeg rescaler provides a high-level interface to the libswscale library image conversion utilities.
