5 ms·
YouTube-dl demolishes 100 pain points of using the modern web This wrapper gets rid of the only pain point in using YouTube-dl which was having to google every
by whywhywhywhy 7y ago
YouTube-dl demolishes 100 pain points of using the modern web
This wrapper gets rid of the only pain point in using YouTube-dl which was having to google every time you wanted just the audio.
Great work
- jchw 7y agoOff the top of my head, isnt that just the -x flag?
- pseudoroot 7y agoIt's a bit more than that. Eg: One can configure their own CLI arguments to keep track of particular playlist(s). $ yt-audio --your-arg1 --your-arg2 This will sync playlist/audios configured against these arguments.
- jchw 7y agoSorry, no doubt your app does more than -x. I just meant for extracting audio alone.
- rwmj 7y agoI have a file under ~/bin called youtube-mp3 which has this one-liner: exec $HOME/d/youtube-dl/youtube-dl -t -x --audio-format=mp3 "$@" (Edit: I'm sure this script does a lot more, but making ytdl download only the audio is fairly simple. Note the above command converts the file to mp3 which some people may not want to do because it's lossy.)
- alexis_fr 7y agoI’m not near a computer but I was persuaded I have used youtube-dl -f mp3 https://.. https://... before.
- jchw 7y agoWell, 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.
- krick 7y agoI 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.
- DonCopal 7y agoI also use --audio-quality 0 because it can be between 0 (best) and 9 (worst) and the default is 5.
- pseudoroot 7y agoThank you
- latexr 7y agoDo you literally google it? Why not make an `alias` once, or `man youtube-dl`, or `youtube-dl --help | grep audio`?
- whywhywhywhy 7y agoits not a single command it's an actual ting you have to do manually. you need to check what sources are available then manually input the number for just the audio stream of that specific video