Skip to content

Basic Video Conversion With FFMpeg

  • by
https://trac.ffmpeg.org/

Convert a video file to another format with FFMpeg:

Basic

ffmpeg -i <input_video> <output_video>

Where <input_video> is some video file and <output_video> is the name of the new file to be created. For example:

  • ffmpeg -i my_video.mov my_video_as_gif.gif
  • ffmpeg -i a_movie.avi a_movie.mp4

Cut, Resize, or Change Frame Rate

ffmpeg -ss <start_time> -i <input_video> -vf scale=<out_width>:<out_height> -t <duration_time> -r <frame_rate> <output_video>
  • <start_time> & <duration_time> HH:MM:SS.ss format
  • <input_video> Name of the file to convert (ex: my_video.mov)
  • <out_width> & <out_height> Size of the output video
    • Use -1 for either width or height to keep the same aspect ratio
  • <frame_rate> Output video frame rate
  • <output_video> Name of the file to be created

Leave a Reply

Your email address will not be published. Required fields are marked *