Live data from Hacker News

Show HN: Download videos, but only the parts you want

videodownloadtool.io

31–39 of 39 posts

Re: Show HN: Download videos, but only the parts you want

#31

Pretty cool! I'm curious as to why this is offered as a cloud machine and not something that runs locally. Wouldn't the encoding performance on a free or cheap cloud instance be poor? I create a lot of video compilations using twitch and youtube videos as source. My internet is 5Mbps down, 3Mbps up, so it can take hours to download long video streams and extract just the parts I want. Because of my network limitation…

As for something that I would rather have on a website instead of locally, extracting autogenerated/provided subtitles from YouTube videos, so you don't have to scrub through the entire video just to get to the information locked within it.

Since I'm usually using a web browser, it's more convenient for me to open a new tab and paste in the video URL than open a terminal and remember what the youtube-dl command has to be. Also, smartphones cannot use youtube-dl in convenient ways, at least the last time I tried, so I'd have to open a new SSH session on my phone and painstakingly type everything, and so on.

There used to be a site for exactly this purpose called hierogly.ph but it was shut down, and the author didn't open-source it.

Re: Show HN: Download videos, but only the parts you want

#32

Pretty cool! I'm curious as to why this is offered as a cloud machine and not something that runs locally. Wouldn't the encoding performance on a free or cheap cloud instance be poor? I create a lot of video compilations using twitch and youtube videos as source. My internet is 5Mbps down, 3Mbps up, so it can take hours to download long video streams and extract just the parts I want. Because of my network limitation…

below is (edited for hn) the script i use instead of youtube-dl. the ffmpeg option is added; need to test it. this script works with all non-commercial videos, like the one in the parent comment. for commercial videos that restrict downloads, a browser with limited DNS and request blocking or youtube-dl or a headless browser will work. if use m.youtube.com with minimum headers then should always get mp4 urls with 1-2…

dont forget about cookies. disable them, block them or scrub them with a forward proxy. note the googlevideo.com domain does not serve cookies, only video. theres no video on youtube.com. plenty of javascript and telemetry, though.

Re: Show HN: Download videos, but only the parts you want

#35
post #21

Earlier quoted context omitted.

> Because of my network limitation If I'm understanding correctly your snippet you're downloading the whole video anyway, no?

I also see that, that syntax should not just download a slice: -f is for the format and -g should be simulation (-g for --get-url : 'Simulate, quiet but print title'). Probably an "undocumented" behaviour of '-g'?

-g is "Simulate, quiet but print URL", not "print title" which is "-e".

Simulate here means it does not download the video. You pass the URL to the ffmpeg which actually downloads the video.

Re: Show HN: Download videos, but only the parts you want

#36

Pretty cool! I'm curious as to why this is offered as a cloud machine and not something that runs locally. Wouldn't the encoding performance on a free or cheap cloud instance be poor? I create a lot of video compilations using twitch and youtube videos as source. My internet is 5Mbps down, 3Mbps up, so it can take hours to download long video streams and extract just the parts I want. Because of my network limitation…

below is (edited for hn) the script i use instead of youtube-dl. the ffmpeg option is added; need to test it. this script works with all non-commercial videos, like the one in the parent comment. for commercial videos that restrict downloads, a browser with limited DNS and request blocking or youtube-dl or a headless browser will work. if use m.youtube.com with minimum headers then should always get mp4 urls with 1-2…

Correction

   x3|(read x;curl -LHUser-Agent: -sv4 "$x"|grep -o "https://r[^\"]*"|sed 's/%26/\&/g;s/%25/%/g;s/%3F/?/g;s/\\u0026/\&/g;s/%3D/=/g;s/%2C/,/g;s/%2F/\//g') >.yt;

Re: Show HN: Download videos, but only the parts you want

#37

Sry but is there any online tools to do this? We all know there are a lot of online sites to download Youtube videos, but seems no such feature?

Most sites, like mine use youtube-dl which just gets the video source file. To crop it and process it at scale you are talking about thousands of dollars of servers to first download the file then process it.

This is a valid reason, thanks for explain, cleared.

Re: Show HN: Download videos, but only the parts you want

#38

Earlier quoted context omitted.

below is (edited for hn) the script i use instead of youtube-dl. the ffmpeg option is added; need to test it. this script works with all non-commercial videos, like the one in the parent comment. for commercial videos that restrict downloads, a browser with limited DNS and request blocking or youtube-dl or a headless browser will work. if use m.youtube.com with minimum headers then should always get mp4 urls with 1-2…

Correction x3|(read x;curl -LHUser-Agent: -sv4 "$x"|grep -o "https://r[^\"]*"|sed 's/%26/\&/g;s/%25/%/g;s/%3F/?/g;s/\\u0026/\&/g;s/%3D/=/g;s/%2C/,/g;s/%2F/\//g') >.yt;

    x3|(read x;curl -LHUser-Agent: -sv4 "$x"|grep -o "https://r[^\"]*"|sed 's/%26/\&/g;s/%25/%/g;s/%3F/?/g;s/\\u0026/\&/g;s/%2C/,/g;s/%2F/\//g') >.yt;

Re: Show HN: Download videos, but only the parts you want

#39
post #21

Earlier quoted context omitted.

I also see that, that syntax should not just download a slice: -f is for the format and -g should be simulation (-g for --get-url : 'Simulate, quiet but print title'). Probably an "undocumented" behaviour of '-g'?

-g is "Simulate, quiet but print URL", not "print title" which is "-e". Simulate here means it does not download the video. You pass the URL to the ffmpeg which actually downloads the video.

My bad! Inattention while copying.

Yes, clearly (after possible initial confusion) -g provides the URL from ffmpeg, which is the actual downloader. The issue then is is moved to the "seek" operation, which is not done by either command (the URL does not contain positioning (for the start of range), and ffmpeg downloads from the beginning of the video - undesirable - up to the specified limit - wanted).

Post reply on HN