Re:Show HN: YouTube-dl wrapper with added features to easily...
by jchw on Sunday January 19, 2020 @01:21PM
(#22092914)
Off the top of my head, isnt that just the -x flag?
Re:Show HN: YouTube-dl wrapper with added features to easily...
by rwmj on Sunday January 19, 2020 @01:30PM
(#22092986)
I 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.)
Re:Show HN: YouTube-dl wrapper with added features to easily...
by krick on Sunday January 19, 2020 @01:50PM
(#22093106)
What is -t?
Re:Show HN: YouTube-dl wrapper with added features to easily...
by rwmj on Sunday January 19, 2020 @03:52PM
(#22093981)
It (used to) cause youtube-dl to name downloaded videos after the title. Apparently it was needed in older versions of youtube-dl but is now ignored.
Re:Show HN: YouTube-dl wrapper with added features to easily...
by DonCopal on Sunday January 19, 2020 @03:49PM
(#22093966)
I also use --audio-quality 0 because it can be between 0 (best) and 9 (worst) and the default is 5.
Re:Show HN: YouTube-dl wrapper with added features to easily...
by pseudoroot on Sunday January 19, 2020 @01:26PM
(#22092955)
It'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.
Re:Show HN: YouTube-dl wrapper with added features to easily...
by jchw on Sunday January 19, 2020 @01:40PM
(#22093051)
Sorry, no doubt your app does more than -x. I just meant for extracting audio alone.
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.
Re:Show HN: YouTube-dl wrapper with added features to easily...
by latexr on Monday January 20, 2020 @12:16PM
(#22100316)
Do you literally google it? Why not make an `alias` once, or `man youtube-dl`, or `youtube-dl --help | grep audio`?
Re:Show HN: YouTube-dl wrapper with added features to easily...
by whywhywhywhy on Friday January 24, 2020 @06:33AM
(#22137220)
its 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
Re:Show HN: YouTube-dl wrapper with added features to easily...
by pseudoroot on Sunday January 19, 2020 @01:24PM
(#22092935)
Thank you
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