Linux, OpenSource, Programming And Hacks

Sep 27, 2017

How to Install and use FFmpeg in Ubuntu 16.04

Sep 27, 2017
FFmpeg is a command line tool for video and audio conversion. It can also capture from a live audio or video source. It is cross-platform, available for Linux, Mac OS X, windows and more

Install ffmpeg in Ubuntu by entering these commands in the terminal (Ctrl +Alt + T):

sudo apt update
sudo apt install ffmpeg

Command usage examples:

Convert a video to other format

Convert mp4 to avi format
ffmpeg -i input.mp4 output.avi

similarly convert flv to mpeg
ffmpeg -i input.flv output.mpeg

convert mov to mp4
ffmpeg -i -vcodec h264 -acodec aac -strict -2 output.mp4

Convert Video to Audio

ffmpeg -i input.mp4 -vn -ab 320 output.mp3
here 320 is the bitrate, you may change it.

Compress a video file

ffmpeg -i input.mp4 -b 1000000 output.mp4
here 1000000 is the bitrate, you may specify yours

Compress an audio file

ffmpeg -i input.mp3 -ab 128 output.mp3
here 128 is the bitrate, you may specify yours

No comments:

Post a Comment