8 ms·
Suggestion to author: allow pasting and downloading more than one link at a time, and selecting audio/video + desired formats. Suggestion to everyone else: lea
by TeMPOraL 7y ago
Suggestion to author: allow pasting and downloading more than one link at a time, and selecting audio/video + desired formats.
Suggestion to everyone else: learn the CLI. Then you can do things like me last night. My wife collected a list of classical music videos she wants to play to our kid, and all I did was:
youtube-dl -x --audio-format "mp3" --audio-quality 0 -o "%(title)s.%(ext)s" -a music.txt
to get the whole list turned into neat and nicely-named MP3s (like "Mozart - Eine Kleine Nachtmusik, K 525 Allegro.mp3"). Followed by:
mp3splt -r *.mp3
to trim the silence from both ends.
I do batch downloads like these rarely, roughly once a year (though I expect it to happen more frequently in the near future). Because of that, I had both of the above commands stored in my snippets.org file. It's something I strongly recommend: store off-used CLI calls in your notes/personal wiki. It beats reinventing the commands a year down the line, or even trying to remember what tools did you use for that off job.
To preempt comments saying CLI is too hard for regular people: no, it isn't; they can learn[0], especially if you make them interested by e.g. showing them how to do batch jobs. But for the sake of the resistant, maybe the author of this GUI will upgrade it with option for batch downloads and format selection.
--
[0] - https://digitalsuperpowers.com/ https://digitalsuperpowers.com/ is a nice book I read and can recommend. No affiliation, just curiosity, because the author is a regular HNer.
- icemelt8 7y ago> To preempt comments saying CLI is too hard for regular people: no, it isn't; It is.
- Double_a_92 7y agoI wish the installation was easier. It is reasonable to explain someone to write "youtube-dl -x <link>" to download music from youtube... But having them installing ffmpeg and python, manually copying some exe to a safe place, and adding that as a enviroment variable really cuts the interest off.
- r3bl 7y agoThat's because you're using Windows, which is really, really not designed with scripts in mind. Point to Ubuntu in the Microsoft Store. Python is preinstalled. You may need to install Python's package manager (I'm not sure does it come preinstalled) with "sudo apt install python3-pip". Install it from Python's package manager with "pip3 install youtube-dl". You could technically skip Python's package manager by just doing "sudo apt install youtube-dl", but updates are slow there, and you really don't want slow updates with this tool ("pip3 install --upgrade youtube-dl"). I'd argue that three commands are way easier to explain than installing two binaries and clicking around far too many times, especially because youtube-dl needs to be updated on a regular basis in order to work properly.
- Mindwipe 7y agoDid you honestly write this down thinking it was remotely any easier?
- r3bl 7y agoThen the alternative? Absolutely. The alternative requires finding the latest version of Python, installing it, modifying the environment path, finding the binary for youtube-dl, installing it, and only then figuring out how it works. "Execute these commands only once and then just type youtube-dl https://example.com https://example.com. If something breaks, run this command to upgrade the script and retry." If the target audience is someone who you think will feel comfortable doing youtube-dl in a terminal, you may as well point them to the total of three other commands to set things up.
- aasasd 7y agoMight be the use-case for Chocolatey or something like that, if more than just youtube-dl is going to be used in console. (Dunno which package managers are alright in Windows.)
- TeMPOraL 7y agoChocolatey is the way to go. Once you have it installed, it's just `choco install youtube-dl` and `choco install ffmpeg`. This is how you get Chocolatey: https://chocolatey.org/install https://chocolatey.org/install.
- mayeaux 7y agoI plan to package platform specific FFMpeg with the app especially now given the large initial interest. Then once I package everything for the different platforms via Electron it should be as easy as installing any other application an end-user would install, that's the hope.
- nightfly 7y agoYou can even do fun things like transcode a stream into a format that omxplayer can handle and render a video straight onto a Raspberry Pi without having to download it (and without X11) 'omxplayer' '--blank' '--aspect-mode' 'stretch' <(youtube-dl -o - --audio-format m4a --recode-video mp4 'https://www.youtube.com/watch?v=MKNYsKwM6HI' https://www.youtube.com/watch?v=MKNYsKwM6HI')
- filmor 7y agoWhile I was still using my Raspberry Pi as a "media center", I wrote a small server using tornado that did this via a URL: https://github.com/filmor/rpi-media/tree/master/ytdld https://github.com/filmor/rpi-media/tree/master/ytdld I had a small javascript commandlet in my bookmarks that allowed me to start playback directly from a youtube (or any other youtube-dl supported) page.
- nsgf 7y agoYou can also do that with the 'Play to Kodi' browser addon.
- fock 7y agoFirst thought on this project: hey, why electron yt-dl works perfectly from the command line, I type the programm, paste the url. Second thought: might be nice for selecting from the myriad of options. Well...
- toomanybeersies 7y agoNot everyone is familiar or comfortable with the command line. A lot of my friends don't use youtube-dl for this exact reason. They end up messaging me, asking me to download files for them.
- xwdv 7y agoWhy not just create a simple phone number with twilio that they can text a url to and then it fires a script to download that video and upload it to s3 for them? Shouldn’t take more than an hour IMO.
- kevinzg 7y agoThere are various Telegram bots that receive a YouTube URL and send the audio as an mp3 file.
- halfjoking 7y agoIf it wasn't for the copyright infringement this wouldn't be a bad business idea. One video per day is free - if you want extra "credits" pay for it on the website.
- xwdv 7y agoIt doesn’t really matter, if you get a dmca takedown just delete that file. But I doubt you will, especially if it’s just your friends hosting it.
- toomanybeersies 7y agoMainly because I actually like talking to my friends, and I'm often interested in whatever video/music they want me to download for them. I have no desire to automate my interactions with my friends, especially for something that's easy enough for me to do and only takes a minute of my time.
- danShumway 7y agoOoh, I didn't know about `mp3splt`! This is super helpful, thanks for posting it. > It's something I strongly recommend: store off-used CLI calls in your notes/personal wiki. All of my bash commands from any terminal get piped into a separate, unified history file, copying some setup I read about in a blog a long time ago. It's an easy, dumb setup that just works. I've been using it for years without any performance problems, and if I ever get any, I can just archive the current text file and start over with a fresh one. Having access to past commands is really handy and has saved my butt multiple times. log_bash_persistent_history() { [[ $(history 1) =~ ^\ *[0-9]+\ +([^\ ]+\ [^\ ]+)\ +(.*)$ ]] local date_part="${BASH_REMATCH[1]}" local command_part="${BASH_REMATCH[2]}" if [ "$command_part" != "$PERSISTENT_HISTORY_LAST" ] then echo $date_part "|" "$command_part" >> ~/.persistent_history export PERSISTENT_HISTORY_LAST="$command_part" fi } # Stuff to do on PROMPT_COMMAND run_on_prompt_command() { log_bash_persistent_history } PROMPT_COMMAND="run_on_prompt_command" HISTTIMEFORMAT="%d/%m/%y %T " alias phgrep='cat ~/.persistent_history|grep --color' alias hgrep='history|grep --color'
- nawtacawp 7y agoThanks for this. This solves my tmux / history problem. Commands from one open terminal were not available in the history command for the other terminal, if I had two terminals open.
- brirec 7y agoToo tired to try it and port if necessary yet, but I'd like to ask: does it work on ZSH?
- danShumway 7y agoI've never used ZSH, so I don't know. My instinct says that if you'd run into any problems, it would be with this line: PROMPT_COMMAND="run_on_prompt_command" Maybe ZSH has a different API? Again though, I've always just used bash, so you'd have to try it and see.
- pgl 7y agosnippets.org seems to be some sort of iGaming site. Is there some other site you use for storing snippets?
- danShumway 7y ago:) `snippets.org` means that TeMPOraL is using org-mode[0] to organize the content; it's not a website. However, I would say use Git and just sync your stuff to a public/private Gitlab/Github repo depending on your needs. That's how I organize most of my public configs. [0]: https://orgmode.org/ https://orgmode.org/
- pgl 7y agoOhhh, right. Thanks! I'm a vi person myself. :)
- TeMPOraL 7y agoSorry for that. 'danShumway is correct - it's a snippet file called snippets.org, i.e. it's written in org-mode. When composing my comment, I wrote a couple words about Org mode, then realized it's off-topic and deleted them before submitting the comment. I fully intended to leave just "snippets file", but forgot to remove the ".org" part.
- jancsika 7y ago> To preempt comments saying CLI is too hard for regular people: no, it isn't; they can learn[0] Hear hear. It all comes together when the regular person takes a little time to learn the following three truths[0]: * the output of any CLI command may be redirected to the input of any other CLI command * the output template of 99% of commands give you structured, predictable JSON data/metadata on which to operate * 99% of CLI commands have the same sane defaults and are required by the spec to have the same option syntax for flags * CLI is CLI. Generating a random number in the CLI on OSX is just as safe as doing the same on OpenBSD, Raspbian, QNX, etc. [0] Three because I'm starting from zero
- t0astbread 7y agoYou made me realize I accidentally used the worst audio quality all the time. I thought higher number = higher quality but then I had a look at the manpage again...
- mayeaux 7y agoI plan to make an 'advanced' mode that will allow people to pass custom flags, select file formats etc, especially given the large initial interest. Right now this was mostly a proof of concept and targeted towards nonsophisticated end users but if the project grows those things will definitely land in time, thanks for the suggestions.
- TeMPOraL 7y agoNo problem & good luck. I'm definitely not a target user, but my mom is. The Electron aspect is a bit painful though manageable, but as long as she could literally download the .exe, and the basic functionality of the product was simple enough (click to open, paste URL, click to save; optionally click to specify some advanced option; no tracking or telemetry whatsoever), I'd happily install it for her. I already installed her a standalone console .exe + ffmpeg, but it's slightly too painful to use[0]. (If you ever happen to grow the project to the point of offering different languages, drop me a line, and I'll give you Polish language translations.) EDIT: Also consider auto-updates for your application; it would be best if it could update its youtube-dl dependency independently from the app itself. I don't like auto-updates too much (especially when they're forced), but as others point out, youtube-dl and YouTube are in a state of cold war; YouTube downloads tend to magically break every couple of weeks now, which requires users to update the youtube-dl script. -- [0] - https://www.lesswrong.com/posts/reitXJgJXFzKpdKyd/beware-trivial-inconveniences https://www.lesswrong.com/posts/reitXJgJXFzKpdKyd/beware-tri...
- mayeaux 7y agoThanks for the input. Yep your mom would definitely be a target user but even for myself the app has been very useful, when you know you have a nice GUI to play with it reduces the cost of doing certain fun projects that require quick downloads so it is nifty for everyone to have in their backpocket, and yes the .dmg for OS X is ready and I'll have an .exe file out relatively soon too. Auto-update will definitely be a feature it's quite easy with the youtube-dl package I'm using.