User Tools

Site Tools


ubuntu:sound:ffmpeg

Ubuntu - Sound - ffmpeg

Transcode from and to a wide variety of formats.

FFmpeg is a powerful open source tool for multimedia handling like conversion/transcoding.

Installing is easy with a sufficient recent Linux distribution, install the “ffmpeg” package.

Note that you may need to install “libavcodec-unstripped-52”, to make mp3 encoding possible.

FFmpeg is typically used for video, but audio transcoding works too and is pretty simple:

Minimal example: transcode from MP3 to WMA.

ffmpeg -i input.mp3 output.wma

Get the list of supported formats with:

ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz.

ffmpeg -i input.wav -ac 1 -ab 64000 -ar 22050 output.mp3

Note: you can also use '-ab 64k', but unsure how well this is supported in different version of FFmpeg.

Picking the 30 seconds fragment at an offset of 1 minute: In seconds

ffmpeg -i input.mp3 -ss 60 -t 30 output.wav

In HH:MM:SS format

ffmpeg -i input.mp3 -ss 0:01:00 -t 0:00:30 output.wav 
ubuntu/sound/ffmpeg.txt · Last modified: 2020/07/15 10:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki