NAS Hosted YouTubeDL Material – A Self-Hosted YouTube Video Downloader

Currently reading
NAS Hosted YouTubeDL Material – A Self-Hosted YouTube Video Downloader

Let me tell you, I have been through the ringer trying to find ways to download videos from YouTube for my 4 year old son. Having the hard copies for me, is a must for peace of mind. I could go into details about that but the list would make this article much longer than you might desire. You can imagine the reasons yourself.

I have tried a couple desktop applications like 4K Video Downloader and Tartube but they just aren’t as convenient as setting up a server side web application. You have to make sure they are always running. Another issue I ran into was IP blocking.

Continue reading...
 
22
6
NAS
DS1618+, DS918+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. Windows
Mobile operating system
  1. Android
Let me tell you, I have been through the ringer trying to find ways to download videos from YouTube for my 4 year old son. Having the hard copies for me, is a must for peace of mind. I could go into details about that but the list would make this article much longer than you might desire. You can imagine the reasons yourself.

I have tried a couple desktop applications like 4K Video Downloader and Tartube but they just aren’t as convenient as setting up a server side web application. You have to make sure they are always running. Another issue I ran into was IP blocking.

Continue reading...

Really nice! I did the installation in my Docker, it is running, but does not want to download YT video files. After few seconds it says "Downoad fialed!". Do I have to do some extra ster like add some port forwarding rules in my router (SRM) or add some firewall rules (in router or in DSM)? Thanks.
 
127
33
NAS
DS918+, DS1815+
Operating system
  1. Linux
  2. macOS
Mobile operating system
  1. Android
Following the tutorial and this is working perfect.
 

Rusty

Moderator
NAS Support
2,383
706
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Really nice! I did the installation in my Docker, it is running, but does not want to download YT video files. After few seconds it says "Downoad fialed!". Do I have to do some extra ster like add some port forwarding rules in my router (SRM) or add some firewall rules (in router or in DSM)? Thanks.
could be permission problems with mappings. Have you looked at the log? Maybe there is more info inside it. There is a specific error.log file, check it as see if there are more details on the error.

Also, check if you have mapped your folders and /video, /audio folders correctly.
 
22
6
NAS
DS1618+, DS918+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. Windows
Mobile operating system
  1. Android
Permisions should be OK, I also mapped all folders, as described in videotutorial.

I get these errors (excerpt from the error.log):

Code:
2020-05-17T22:55:11.044Z ERROR: Error during parsing:Error: Command failed with exit code 1: /app/node_modules/youtube-dl/bin/youtube-dl --dump-json http://www.youtube.com/watch?v=LG_GqzR8c4A
2020-05-17T22:55:11.045Z ERROR: failed to parse for urls starting with https://www.youtube.com/watch?v=LG_GqzR8c4A&t=7s
2020-05-17T22:55:20.397Z ERROR: Command failed with exit code 1: /app/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best -o video/%(title)s.mp4 -f best[ext=mp4] --write-info-json --print-json http://www.youtube.com/watch?v=LG_GqzR8c4A
 

Rusty

Moderator
NAS Support
2,383
706
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Hmm I just tried that same Lenka video in 1080p and it downloaded just fine. Can you share your mount settings? Any other custom configurations that you have done? Is this a problem only with that video or in general?
 

Geeked

NAS Hosted
Subscriber
139
63
nashosted.com
NAS
DS918+, DS218+(2), RS820+
Operating system
  1. Linux
  2. macOS
  3. Windows
Mobile operating system
  1. iOS
Really nice! I did the installation in my Docker, it is running, but does not want to download YT video files. After few seconds it says "Downoad fialed!". Do I have to do some extra ster like add some port forwarding rules in my router (SRM) or add some firewall rules (in router or in DSM)? Thanks.
This could be because you have been downloading videos already and they blocked your IP from downloading. I'm still trying to figure out a way around this.
 
127
33
NAS
DS918+, DS1815+
Operating system
  1. Linux
  2. macOS
Mobile operating system
  1. Android
I have already downloaded many videos and everything is still working. So I don't think this is a problem.
 

Geeked

NAS Hosted
Subscriber
139
63
nashosted.com
NAS
DS918+, DS218+(2), RS820+
Operating system
  1. Linux
  2. macOS
  3. Windows
Mobile operating system
  1. iOS
I have already downloaded many videos and everything is still working. So I don't think this is a problem.
Just wait for it. It can take a couple days. When it does, it just looks like the app is broken but if you check the console you will see an error 409. That's the one. I'm forunate enough to change my IP via MAC address cloning through my modem but that is tedious. I spoke to the dev of this app and he said he's working on a fix that involves cookies and a sleep timer. Standing by.
 
22
6
NAS
DS1618+, DS918+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. Windows
Mobile operating system
  1. Android
Not sure, what I did wrong. Just in case, I tried to instal it in the same way in my second device (DS918+) sitting in my office. Everythink works without any issue there. OK, I tried on my home device temporarily disable the firewall and voila, it works! When I enafbled firewall again, it does not download again. So what now? What firewall rule should I set in my firewall? The strange thing is that I did not have to do anything in firewall of my second device (DS918+) and it just works... Any advice please?
 
22
6
NAS
DS1618+, DS918+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. Windows
Mobile operating system
  1. Android
For anyone who got the same error as me (Download failed!):
I found out that I need opet the UDP port 53 in my DSM firewall and then it works like a charm! Would be nice if I could restrict to specific source IP address (just to make that thing a bit more secure ... makes sense?). Anyone knows what IP could this be?
 
127
33
NAS
DS918+, DS1815+
Operating system
  1. Linux
  2. macOS
Mobile operating system
  1. Android
I think you should pay attention when you open port 53. I think it's a good target for hackers.
 

fredbert

Moderator
NAS Support
Subscriber
1,623
674
NAS
DS1520+, DS218+, DS215j
Router
  1. RT2600ac
  2. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
I think you should pay attention when you open port 53. I think it's a good target for hackers.
Depends on if the firewall is stateful for UDP.

I recall spending a long time debugging a firewall, getting abuse for it suddenly not working, only to demonstrate that someone (the customer) had blocked UDP 53 inbound a hop or two towards the Internet. Didn't get an apology or thanks for fixing it.
 
13
1
NAS
DS918+
Operating system
  1. Linux
  2. Windows
Mobile operating system
  1. Android
Hello

I really am stumped. I've followed the guide with default settings. I'm using the nightly image also, but when I download any video it says download failed. The logs are about exit code 1

Code:
2020-06-22T10:49:07.394Z ERROR: failed to parse for urls starting with https://www.youtube.com/watch?v=Au4_frl4Rco

2020-06-22T10:49:07.393Z ERROR: Error during parsing:Error: Command failed with exit code 1: /app/node_modules/youtube-dl/bin/youtube-dl --dump-json http://www.youtube.com/watch?v=Au4_frl4Rco

2020-06-22T10:44:46.276Z ERROR: Command failed with exit code 1: /app/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best -o video/%(title)s.mp4 --write-info-json --print-json -f best[ext=mp4] http://www.youtube.com/watch?v=Au4_frl4Rco

2020-06-22T10:44:46.269Z ERROR: failed to parse for urls starting with https://www.youtube.com/watch?v=Au4_frl4Rco

2020-06-22T10:44:46.268Z ERROR: Error during parsing:Error: Command failed with exit code 1: /app/node_modules/youtube-dl/bin/youtube-dl --dump-json http://www.youtube.com/watch?v=Au4_frl4Rco

2020-06-22_11h53_34.png


2020-06-22_11h53_42.png
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Top