Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've started doing:

    yt-dlp https://youtu.be/bqz65_YfcJg -o - | mpv -
And never been happier. I hope it still counts as a view for the channel/owner though, but never investigated if that's actually the case.




In most builds mpv has yt-dlp integrated, you can directly pass the URL to it.

Ay, but then I don't get to teach beginners about the unix principle and how easy it is to pipe stuff between different tools :)

Thanks for the heads up regardless, I'm sure there was others who didn't know, who learned something new! :)


> In most builds mpv has yt-dlp integrated, you can directly pass the URL to it.

Last time I was passing youtube URLs to mpv, it relied on having an executable named youtube-dl.exe somewhere visible to the mpv executable. To get it to work with yt-dlp, I had to copy and rename the yt-dlp executable.

> has yt-dlp integrated

Have they switched to supplying their own youtube downloader instead of just working with whatever you happen to have in your path?


Very unlikely, you need the browser for that

I would be very surprised if they didn't still have analytics tracking on the MPEG-DASH streams directly (what yt-dlp is downloading)

yt-dlp needs to get the stream from somewhere. It has to fetch the website for that and even execute a JavaScript challenge to retrieve the media endpoint.

I'd guess it skips running the JavaScript that reports to the Analytics backend...

I ended up trying to look it up and found this:

> Available options: [...] mark_watched: Mark videos watched (even with --simulate). Only for YouTube

https://github.com/yt-dlp/yt-dlp/blob/c8680b65f79cfeb23b342b...

So I'm guessing without that, it doesn't, so would have to add the flag for it to try to count it as a view.


I don't think that flag is related at all.

What else could it mean? Aren't "views" something that matches with "watch"? Maybe I'm missing something from how YouTube works, not a big user, happy to be corrected :)

It could mean that it marks the video as watched but without increasing the view counter. There are multiple signals that youtube had as a view counter or measuring what parts of a video were watched. Just because youtube knows a video was watched it may not increase the view counter to avoid bots or just because.

Good thing yt-dlp is a browser.

It's not. It runs enough JavaScript to pass the CAPTCCA (completely automated public turing test to tell computers and computers apart) challenge but it doesn't actually load the page and execute everything.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: