Posts HOW TO: Linux-command For Convert Video To Audio Format

HOW TO: Linux-command For Convert Video To Audio Format

Linux indeed rich with cli (Command Line Interface) tools, this time i will share how to manipulation or convert video to audio format with linux-command.

Before action, surely must have video for manipulation to audio. For example i choose youtube video as media, don’t forget install youtube-dl. Youtube-dl is a CLI tools for download video’s on youtube.

Installing Youtube-dl

For installing youtube-dl, there are several command installation for any linux distro’s.

Installing On Ubuntu/Debian

$ sudo apt-get install youtube-dl

Installing On Arch Linux

$ sudo pacman -S youtube-dl


$ sudo pacman -U /home/user/youtube-dl{application}

Installing On Slackware Linux

For installation youtube-dl on slackware available via SBo Packages


Create local repo, like this {using slackbuild from ponce}

$ git clone

After finish, type into the folder like this:

cd slackbuilds/network/youtube-dl


*Cat function is show application source for download, then copy source with right click and then download with wget

wget http://download-link-youtube….. {when download this file, it still in the folder youtube-dl}

Afer downloader, now give permission access and run

chmod +x youtube-dl.Slackbuild


*Wait until finished, and type with command

upgradepkg –install-new /tmp/youtube-dl-xxxx

After installed youtube-dl, simple to run with this command:

$ youtube-dl http://url-youtube-video* …

*For More Options
$ youtube-dl -h

And now for convert video to audio, must installed additional tools again like above this command. The tools named ffmpeg, with duration determined use this command:

$ ffmpeg -i {video-file-name}.flv -ss 00:00:17 -t 00:04:46 {audio-file-name}.wav

Options above command:

  • -i == for input video file
  • -ss == for starting the position of the specified time in seconds
  • -t == for specify the duration in seconds

once completed do not saved, because this file still use format .wav, so still available step two for convert .wav to .mp3. Needed lame tools and command for installation still same like above command.

$ lame {audio-file-name}.wav Muse-MapOfTheProblematique.mp3 –tt Map Of The Problematique –ta “Muse”

Options above command:

  • -tt == for mp3 title
  • -ta == for artist name

There is article about Convert Video File to Audio File

Thanks, may be useful and happy testing !!!

This post is licensed under CC BY 4.0 by the author.