FFmpeg-tool (Fast Forward MPEG) is a free and open source video and audio converter software that comprises a collection of tools and libraries for processing multimedia content for instance video, audio, subtitles and related metadata.
The software project was inspired by MPEG standards. It’s licensed under GNU / GPL license.
Some of the libraries include:
- libavcodec: Contains a myriad of encoders and decoders for video and audio streams.
- libavformat: This provides a framework for demultiplexing and multiplexing video and audio streams.
- libavutil: includes hashers, decompressors and facilitates multimedia programming.
- libavfilter: provides a framework for Audio and Video filtering.
- libavdevice: Supports several playback devices and is charged with grabbing and rendering to input and output devices.
- libswresample Facilitates audio mixing and audio conversion operations
- libswscale implements high definition image scaling, pixel conversion tasks and color conversion.
Some tools include:
- ffmpeg is a tool for manipulating, converting and streaming multimedia content.
- ffplay is a simplified multimedia player.
- ffprobe This is a minimalistic tool for searching multimedia content.
- ffserver This is a streaming server tool for live broadcasts.
- Other tools include qt-faststart, ismindex and aviocat
Installing FFMPEG on Ubuntu 16.04
Login as root and update the system.
apt-get update
Install FFmpeg
apt-get install ffmpeg
Once installed, run
man ffmpeg
This gives you more detailed information about FFmpeg
Finding the version of FFmpeg
ffmpeg -version
Converting a video file to another file format
Converting mp4 to avi format
ffmpeg -i input sample1.mp4 sample1.avi
Concerting flv to MPEG
ffmpeg -i input sample1.flv sample2.mpeg
mov to mp4
ffmpeg -i sample1.mov -vcodec h264 -acodec aac -strict -2 sample1.mp4
Converting Video to Audio
ffmpeg -i sample1.mp4 -vn -ab 320 sample2.mp3
320 is the bitrate here.
Compressing video files
ffmpeg -i sample1.mp4 -b 1000000 sample2.mp4
similarly, 1000000 is the bitrate
Compressing audio files
ffmpeg -i sample1.mp3 -ab 128 sample1.mp3