

The same works with images as well: ffmpeg -i input.jpg -vf scale=320:240 output_320x240.pngĪnother very common operation on video files is to extract a specific portion of a given video. Using the -vf scale filter, it is possible to resize videos to a desired size: ffmpeg -i input.avi -vf scale=320:240 output.avi x and y specify the top left corner of the output rectangle.out_h is the height of the output rectangle.out_w is the width of the output rectangle.FFmpeg provides a crop filter for this specific purpose: ffmpeg -i input.mp4 -filter:v "crop=out_w:out_h:x:y" output.mp4 ffmpeg -i video.mpg image%d.jpgĬropping is a very common operation in video editing. The following image formats are available: PGM, PPM, PAM, PGMYUV, JPEG, GIF, PNG, TIFF, SGI. This command will generate imagess named image1.jpg, image2.jpg, etc, from a given video file. ffmpeg -f image2 -i image%d.jpg video.mpg This command will transform all the images from the current directory (named image1.jpg, image2.jpg, etc.) to a video file named video.mpg. You can easily obtain a lot of information on a given video file with the following command-line instruction: ffmpeg -i video.avi The commands contained in this guide describe how to perform various tasks, such as video file conversion, audio file sound extraction, encoding files for iPod or PSP, converting a video to a gif file, and more. Please refer to the official documentation if you need any help to install FFmpeg. The program and its source code can be downloaded here. FFmpeg is currently used by many websites and programs, including YouTube and VLC Media Player, and is published under the GNU Lesser General Public License 2.1+. Created in 2000, it is a powerful command-line tool that runs on Linux, Windows, and Mac operating systems. FFmpeg is a multiplatform, open-source library used to record, convert, and stream video and audio files.
