InfoHeap
Tech tutorials, tips, tools and more
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. Mac – how to convert mp4 to webm
  2. Convert mp3 to ogg on Mac using ffmpeg
  3. Install ffmpeg on Ubuntu Linux
  4. How to resize image (including animated gif) using Image magick convert
  5. Perl command line – replace multi line comments
  6. PHP command line – show errors
  7. How to convert text to speech on Mac using command line utility say
  8. Command line – run python webserver
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged ffmpeg, Linux/Unix Command Line, Tutorials

Follow InfoHeap

facebook
twitter
googleplus
  • Browse site
  • Article Topics
  • Article archives
  • Recent Articles
  • Contact Us
  • Omoney
Popular Topics: AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | 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

Copyright © 2022 InfoHeap.

Powered by WordPress