Ask Your Question

How to properly install codecs for youtube-dl and playback

asked 2017-04-11 17:07:01 -0500

twatson gravatar image


I have spent about 90 minutes today trying to download a video from youtube and extract its audio.

At first I had issues with not having ffmpeg installed. Apparently it is no longer possible to install via dnf, and I cannot get RPM to work for anything (rpm -l shows nothing, despite having enabled both free and nonfree repositories). I then installed the source files and compiled them. None of the --enable-lib switches worked, so the only audio formats I could use youtube-dl on were m4a and aac. Neither of them could I play since I did not have the codecs. My question is:

How can I get ffmpeg to work with other codecs, when it does not want to enable anything via options in configure, or is there another way to install these codecs that actually works with Fedora 25 and youtube-dl? I have looked at nearly every set of instructions for this, and they have been invariably been lacking in some way. ~

edit retag flag offensive close merge delete


And you are using Fedora xx? If rpmfusion doesn't work for you. Install UnitedRPMS

davidva gravatar imagedavidva ( 2017-04-11 20:58:46 -0500 )edit

Install then install mplayer it will add all codecs you may need and play videos from the terminal.

aeperezt gravatar imageaeperezt ( 2017-04-11 23:24:01 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-04-13 05:37:23 -0500

hhlp gravatar image

this is very easy :

youtube-dl --extract-audio --audio-format mp3 <Youtube URL video>

extract from youtube-dl --help

--audio-format FORMAT  Specify audio format: "best", "aac",
                                     "vorbis", "mp3", "m4a", "opus", or "wav";
                                     "best" by default

-x, --extract-audio          Convert video files to audio-only files
                                     (requires ffmpeg or avconv and ffprobe or


edit flag offensive delete link more

Question Tools


Asked: 2017-04-11 17:07:01 -0500

Seen: 821 times

Last updated: Apr 13 '17