This article was written in the 2013, there may have been some developments in the subject matter.
If in doubt please leave a comment in the bottom of the article.
Let's say you have a video from which we extract an audio track. The reasons may be the most varied, we might want to save a special effect in a movie (shot, outbreak, d'atmosphere song, famous phrase, etc.), or part of a song, the possibilities are endless.
Today let's see how you do with ffmpeg, the usual command-line tool that always shot at stake for encode video, slow them down, adapt them to my TV and more.
As already stated several times, ffmpeg is installed on Ubuntu with the classic:
sudo apt-get install ffmpeg
Has no major dependencies and works at the command line immediately.
The command syntax is a classic in the field of linux:
ffmpeg-i / path / to / file.flv audio.mp3
The argument "
-i" is going to "input file".
In addition to the other myriad of possible configurations (consult the manual typing "
man ffmpeg") one of my favorite features is the control over the bitrate, to set the quality of the extracted:
ffmpeg-i video.flv audio.wav-ab 128k
Ffmpeg supports most video formats in circulation, encoding is also "flv" o i "mov". How do you say? You are too lazy to open a tab and write "ffmpeg supported formats"? Ok, you can type "
ffmpeg --formats" in a terminal, it will save you a laborious search online.