ffmpeg

c

record, convert and stream audio and video in the terminal.

apt-get install ffmpeg

ffmpeg is a cross-platform, open source multimedia toolkit that is designed to process and handle audio, video, subtitles and other media streams.

 

The tool supports real-time video and audio capture, encoding, decoding, multiplexing, demultiplexing, streaming, live streaming, screen recording, filtering, and playback. By using ffmpeg in the terminal via CLI and combined with scripts, it is can be used for building complex media processing pipelines.

 

ffmpeg is a useful and go-to tool for anyone dealing with almost any type of media content, making it an essential and reliable tool for various media processing tasks.


How to install ffmpeg

 

To install ffmpeg, you can either go onto ffmpeg's installation page or you can install ffmpeg quickly for your platform with different package managers on Terminal Trove.

 

How to use ffmpeg

Below are the 5 most common and most popular commands to use when working with ffmpeg:

 

1. Convert Media Formats

Converting files from one format to another (MP4 to WebM).

ffmpeg -i input.mp4 output.webm

2. Extract Audio from Video

Extract the audio stream from a video file.

ffmpeg -i input.mp4 -vn output.mp3

3. Resize Videos

Resize videos to specific dimensions for various playback requirements.

ffmpeg -i input.mp4 -vf scale=1280:720 output.mp4

4. Add Subtitles to Videos

Add subtitles to a video for better accessibility.

ffmpeg -i input.mp4 -vf "subtitles=subtitles.srt" output.mp4

5. Create a Video Slideshow from Images

Create a video slideshow from a series of images.

ffmpeg -framerate 1 -i img%03d.jpg output.mp4

Get Updates On Terminal Trove.

No spam, just updates on Terminal Trove. See an example update.