InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

ffmpeg tutorials

  • Command line - scale a video using ffmpeg
  • Convert mp3 to ogg on Mac using ffmpeg
  • Install ffmpeg on Ubuntu Linux
  • Mac - how to convert mp4 to webm
 
  • Home
  • > Tutorials
  • > Linux/Unix Command Line
  • > ffmpeg

Command line – scale a video using ffmpeg

on Feb 8, 2016

Command line utility ffmpeg can be used to scale a video to a specific widht and height. Here are some examples.

Resize to given width and height

This may not preserve the aspect ratio.

$ ffmpeg -i input-file.mp4 -vf scale=300:200 output-file.mp4

Resize to given width or height

Here we specify either width or height. The other value is auto calculated to preserve aspect ratio. We put -1 for other value.

$ ffmpeg -i input-file.mp4 -vf scale=-1:200 output-file.mp4

Suggested posts:

  1. Python etl petl – read table from csv file
  2. Find used ports by an app on Android using Adb
  3. How to edit animated gif speed (FPS) using imagemagick convert
  4. WordPress – query to dump all categories
  5. How to enable usb debugging on android
  6. Convert mp3 to ogg on Mac using ffmpeg
  7. Rotate an element using css transform
  8. How to upload closed captions for your youtube video
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged ffmpeg, Linux/Unix Command Line, Tutorials
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress