Live data from Hacker News

Show HN: Interactively select the quality and format for youtube-dl

github.com

51–60 of 95 posts

Re: Show HN: Interactively select the quality and format for youtube-dl

#51
post #50

Earlier quoted context omitted.

I suspect the GP is concerned Youtube will take steps to block it. This scares me a bit too, I watch basically all Youtube content via Youtube-dl. I have a script that runs every night on Mac, so that new content automagically appears in my Movies folder.

They do block it. Which is why it doesn't work if you install from your OS repo. You need to get it directly from GitHub.

And you need to update it every now and then as the game of cat and mouse plays on.

Re: Show HN: Interactively select the quality and format for youtube-dl

#53
post #49

Earlier quoted context omitted.

In absence of more accessible complexity measurements, line counts do matter somewhat. E.g. the briefer a program is, the more readable it is (last time I checked, brainpower and time is much more expensive than computing power and bandwidth.) The Node example has zero external dependencies outside of the Node.js standard library.

> In absence of more accessible complexity measurements, line counts do matter somewhat. E.g. the briefer a program is, the more readable it is (last time I checked, brainpower and time is much more expensive than computing power and bandwidth.) There are as many exceptions to that rule are there are examples when it’s true. Code golfing, minifified code, shell 1 liners, Perl, etc. Line counts mean jack shit.

I would argue that even an esoteric, densely packed one-liner can still be more readable than the equivalent program spread out over a greater number of lines - simply because you can keep it all in sight at the same time and work through it without losing the bigger picture.

But of course, scary symbols is scary.

Re: Show HN: Interactively select the quality and format for youtube-dl

#54
post #50

Earlier quoted context omitted.

I suspect the GP is concerned Youtube will take steps to block it. This scares me a bit too, I watch basically all Youtube content via Youtube-dl. I have a script that runs every night on Mac, so that new content automagically appears in my Movies folder.

They do block it. Which is why it doesn't work if you install from your OS repo. You need to get it directly from GitHub.

Works fine from mine

Re: Show HN: Interactively select the quality and format for youtube-dl

#55
post #50

Earlier quoted context omitted.

I suspect the GP is concerned Youtube will take steps to block it. This scares me a bit too, I watch basically all Youtube content via Youtube-dl. I have a script that runs every night on Mac, so that new content automagically appears in my Movies folder.

They do block it. Which is why it doesn't work if you install from your OS repo. You need to get it directly from GitHub.

Believe that's the ever changing api rather than active attempts to block it.

Same thing happens with the newpipe android app which somehow manages to be far superior to Google's official YouTube app.

Re: Show HN: Interactively select the quality and format for youtube-dl

#56
post #31

Earlier quoted context omitted.

Don’t see why, if anything more people should know about it so shared content can become more redundant as people download it across the world. YouTube is a fairly brittle hub sometimes with all the takedowns.

I suspect the GP is concerned Youtube will take steps to block it. This scares me a bit too, I watch basically all Youtube content via Youtube-dl. I have a script that runs every night on Mac, so that new content automagically appears in my Movies folder.

Personally, I subscribe to YouTube channels via RSS (a little known but existent feature). Then I download all the videos I want to watch with `youtube-dl -a -`. No buffering, any video window size I want, finer-grained speed playback in VLC, and no Google account required.

Re: Show HN: Interactively select the quality and format for youtube-dl

#57

Earlier quoted context omitted.

Look, I'm generally with you, there isn't anything particularly bad about modern JavaSscript, and it's a perfectly fine language to write your tools in if that's what you like. But your points are... Weird. 1. Familiar to people who know JavaScript, sure. But shell is the language you interact with the CLI with, so more people who use the CLI are familiar with a shell. 2. Most languages have a standard library. 3. I…

1. Most people who interact with a shell know how to make it run one command with arguments; some eventually learn about IO redirection. Many such people who use Bash as a "command prompt" would find the way it does even simple things like variables and conditionals exceedingly arcane. Readability is important, and, for better or worse, a compact curly bracket syntax is seen as "the norm". 2. Different languages' sta…

> Readability is important, and, for better or worse, a compact curly bracket syntax is seen as "the norm".

Python seems pretty popular.

> I know many people who disagree with me, too. That doesn't make me wrong

The problem isn't that you're saying node is well suited. The problem was your suggestion that node was uniquely well suited when actually the CLI is a solved problem in most languages.

> Well, I've evaluated it and found it to my liking.

That's all that really matters when it comes to your own personal usage. Just don't expect everyone to have those same preferences nor argue with other developers that your preferences are any kind of "fact".

> I guess you grow to like the tools you use to accomplish things, and if everyone who went out of their way to publicly dismiss Node.js instead went out of their way to use it in place of Bash scripting, they might find it to their liking as well.

Personally I don't like node and find Bash easier however it's thankfully not an "either/or" argument where your only options are Javascript or Bash. There's a whole plethora of options out there.

> Yet ironically, it has been the most reliable in achieving its purpose of locking my encrypted partitions when my computer goes to sleep, not to mention unlocking them when I wake it up.

That's a pretty meaningless anecdote because it could be the result of a whole plethora of reasons outside of the language's control (including but not limited to user error) or even completely made up (like your point about floating point arithmetic (see below) or your other comment about one liners being more readable than multi-lined code).

> Show me a shell scripting language that even has floating point arithmetic!

Quite a few do: ksh93, yash, zsh and murex (disclaimer: I wrote that shell) are all interactive shells which support floating point arithmetic.

In terms of shell scripting languages, you can add the following to the above group: awk, bc, dc and perl.

Even those shells that don't support floating point arithmetic can still do pseudo floating point maths by using powers of 10 multipliers and printf to place the decimal point:

    printf %.10f\\n "$((1000000000 * 365/7))e-9"
Ok, I'll grant you that is rather ugly. Thankfully you can call other shell scripting languages from within your POSIX/C shell:

    bc 
This isn't a hard thing to research either; which suggests to me you haven't done your homework before making your arguments.

Re: Show HN: Interactively select the quality and format for youtube-dl

#58
post #48

Jesus .. the package.json alone is probably longer then a shellscript would be that implements the same functionality.

I would love to see the shellscript equivalent! :))

For videos, this should work... added to your .bashrc file, which then needs to be reloaded (only once) by typing source .bashrc in your home directory from the command line:

    alias yt='youtube-dl --recode-video mp4'
On my system I have a funky python setup so I need to use this instead:

    alias yt='unset PYTHONPATH; youtube-dl --recode-video mp4'
I don't see the need for interactivity because the only format I ever want is mp4.

For audio, I would just do a separate alias with a different name. For example (edit: tested):

    alias yta='youtube-dl --extract-audio --audio-format mp3'
Invoke each with the URL. For example:

Video:

    yt https://www.youtube.com/watch?v=IFe9wiDfb0E
Audio:

    yta https://www.youtube.com/watch?v=qKS8KsTC4IU
If a youtube URL has extra parameters separated by &, delete those before invoking. For example the URL below, which has extra parameters because it came from a playlist:

    https://www.youtube.com/watch?v=7uQuX1sOYk4&list=PLYq_mcte9NvDA2Xi5Qjl1DrH5LuDKDlAI
should be changed to this before using it to attempt a download:

    https://www.youtube.com/watch?v=7uQuX1sOYk4
Or you can use the full original URL but you need to protect it from interpretation by UNIX by surrounding it with single quotes when invoking.

    yta 'https://www.youtube.com/watch?v=7uQuX1sOYk4&list=PLYq_mcte9NvDA2Xi5Qjl1DrH5LuDKDlAI'

Re: Show HN: Interactively select the quality and format for youtube-dl

#59
post #51
post #50

Earlier quoted context omitted.

They do block it. Which is why it doesn't work if you install from your OS repo. You need to get it directly from GitHub.

And you need to update it every now and then as the game of cat and mouse plays on.

Glad you welcomed him to the real world. With things as they are now. I will let you continue to teach him.

Re: Show HN: Interactively select the quality and format for youtube-dl

#60
post #50

Earlier quoted context omitted.

They do block it. Which is why it doesn't work if you install from your OS repo. You need to get it directly from GitHub.

Works fine from mine

This week yes. Cat and mouse my fellow trucker
Post reply on HN