Show HN: YouTube-dl wrapper with added features to easily manage YouTube audio
github.com
github.com
# extract audio only
-x
# stick to mp3
--audio-format mp3
# get rid of the annoying URL stuff at the end
-o "%(title)s.%(ext)s"1. https://github.com/ytdl-org/youtube-dl/tree/master/youtube_d...
2. https://github.com/ytdl-org/youtube-dl/blob/master/youtube_d...
http://gvdownloader.sourceforge.net/
And yes, it was about a month after publishing that the arms race started with google. It was exciting at first, but then they started getting dirty, excluding me from search results and using whatever muscle they could to stop people finding the app.
(here is a link the hockeystick download graph, it got picked up by various other distribution networks in between) https://sourceforge.net/projects/gvdownloader/files/stats/ti...
I wrote it because bandwith was really expensive and slow back then. It was an experiment to solidify some programming concepts i was learning at the time, and also my first foray into browser plugin development.
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
$ yt-audio --your-arg1 --your-arg2
This will sync playlist/audios configured against these arguments.
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.)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.
you need to check what sources are available then manually input the number for just the audio stream of that specific video
Doesn't make much sense then. YouTube doesn't have MP3 so MP3 means unnecessary transcoding i.e. quality and time loss.
Why would anybody convert to MP3 today having AAC and OPUS originals? OPUS provides unprecedented quality at all bitrates (better than AAC and MP3), AAC also provides great quality&compression (better than MP3) and plays everywhere.
As far as I know every transcoding reduces it further. Even transcoding from 128 kbps AAC to 320 kbps MP3 will make the quality slightly worse.
One can use archive file method instead.
This limitation has nothing to do with yt-audio's capability of downloading m4a format. M4a limitation only applies to metadata method of tracking downloaded tracks.
I'd make a PR but I'm not near a computer right now. This is great. I have a couple audio files I need to pull for my kid and this is gonna save me a couple steps. Thank you!
And anyway I don't see how downloading a video is "commercial usage".
I ended up writing a bot that runs on a docker scheduled task and looks at trello. I can drop a youtube link on the board and it will grab the audio.
Great for when I hear a song somewhere that I want to add to my phone later.
I use a trello integration library, shell out for youtube-dl, run a normalizer on anything it pulls, boto3 the files to s3 and then call SNS to text me it's done. I pick the files up later.
When youtube-dl updates (which it does, regularly) I just redeploy as it's tagged for latest in the requirements file. I could add this update step to the container or pull a copy from s3 that I maintain, but I'm not a big fan of pulling in code at runtime.
Trello is acting as an SQS queue, RabbitMQ queue, or redis set. If something fails the code will dump the error text into the card and retry indefinitely till I fix it.
This entire setup costs me < $1 a month. I think my route53 domains cost more.