News for hackers. Stuff that matters.
Re:Show HN: YouTube-dl wrapper with added features to easily... by alexis_fr on Sunday January 19, 2020 @01:45PM (#22093079)
I’m not near a computer but I was persuaded I have used youtube-dl -f mp3 https://... before.
Re:Show HN: YouTube-dl wrapper with added features to easily... by krick on Sunday January 19, 2020 @01:59PM (#22093168)
I don't think -f mp3 would ever work, -f is for choosing file format to download. So -f mp3 would work only if there is a source with codename mp3, which I don't think I've ever seen. You may be using -f bestaudio -x or something along the lines of it.
Re:Show HN: YouTube-dl wrapper with added features to easily... by jchw on Sunday January 19, 2020 @01:52PM (#22093124)
Well, if you use just -x alone, it will not attempt to get the format you ask for. So you will probably end up with a m4a (mp4 container with just AAC audio) or ogg (vorbis/i think opus?) depending on whether the best quality is encoded in h264, WebM/VP8 or WebM/VP9. Which may not be what you want.

OTOH, if you specify a format directly without -x, it may not extract the audio alone. For example if you wanted M4A, you'd specify -x on top of specifying the format explicitly.

edit: as krick points out though, it doesn’t seem videos generally have an mp3 format, at least on YouTube.