Comments on 2016-12-20 Extract YouTube Audio

@fitheach said that this will be re-encoding the audio from one lossy to another, and this is true. Here’s an alternative:

youtube-dl -F

This shows the existing formats and their codes (first column). You could download WebM with Opus or Vorbis, for example. Use -f and the code you want to download just that format.

Then use ffmpeg to copy out the audio (example Vorbis):

ffmpeg -i "$file" -vn -acodec copy  "OGG/$nosuffix.ogg"

You need to know the codecs your player supports, of course. Perhaps mp3 is all it can do. I installed Rockbox on my iPod, however, and it supports a lot, apparently!

– Alex Schroeder 2019-04-19 08:39 UTC

Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. Note: in order to facilitate peer review and fight vandalism, we will store your IP number for a number of days. See Privacy Policy for more information. See Info for text formatting rules. You can edit this page if you need to fix typos. You can subscribe to updates by email without leaving a comment.

To save this page you must answer this question:

Please say HELLO.