You can access Synology with an ssh connection. You can enter Synology's NAS with Explorer.
Install Python 3 from Package Center Introducing Python3 and Pip to Synology I will refer to this site
sudo curl -k https://bootstrap.pypa.io/get-pip.py | sudo python3
Execute. I have never done command line operations in earnest I got stuck on this password entry screen. The cause was that there was no response when I typed the characters, and that the password of the admin group I had imagined was incorrect. After that, change the password of the admin group and enter the password based on the fact that it does not respond even if you type characters in the above image success. You can now use pip.
pip install youtube-dl
When I hit -sh: pip: command not found Has been returned. When I checked various things, it was that the path did not pass (that's right) I can't log in to mysql I will refer to this site
vi /etc/profile
Run! A screen like the one above appears, but I didn't know how to add characters.
As I investigate, this is called a vi command, so it seems to be edited.
Then when I tried to add the path, I realized that I didn't know the absolute path of the folder on the NAS.
I managed to find the folder where I installed pip in Explorer.
Go to that level with the cd command and get the path with the pwd command! !!
Then use the vi command to go where you want to go with the arrow on the keyboard
export PATH = $ PATH: The path you just copied!
When trying to save
E45: readonly
option is set (add ! to override)
Came out. When I search for an error, it seems that it is an error that occurs when the file is read-only ...
:w !sudo tee %
I was able to pass the path by typing in the password.
Now "pip install youtube-dl" works and you can install it!
Since path also went through that folder (I'm sorry I don't know)
I tried typing "youtube-dl URL" and it worked!
I used the argument to download the video format using "-f bestvideo [ext = mp4] + bestaudio [ext = m4a]", but now an error occurs. ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Searching for the error led me to the conclusion that ffmpeg is not the latest version. So I realized that I didn't put ffmpeg on my own. So when I ran "which ffmpeg" to see what (where) ffmpeg was working, it seemed that ffmpeg was installed in the path I was taking from the beginning! I tried DL with the latest version of win10 ffmpeg using the same format ("-f bestvideo [ext = mp4] + bestaudio [ext = m4a]"), and I was able to download it firmly, so ffmpeg is the cause. I understood. But since I touched linux for the first time yesterday, I don't know how to install linux ffmpeg ..... As I researched, I noticed that the latest version (almost) of ffmpeg has been uploaded to Synology's community package! -^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^ Name: Syno Community (Anything?) Location: http://packages.synocommunity.com/ -^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^ Click the community on the left to search for ffmpeg and install it! !!
But when I run which ffmpeg after installation, the location doesn't change ... because the path doesn't go through ... However, I do not know where the ffmpeg installed earlier was installed ... I found out that there is a find command and I can find out where the place where ffmpeg is written can be found! cd / find ./ -name ffmpeg I was able to get a list at! !! Comparing it with the case of uninstalling ffmpeg earlier There seems to be ffmpeg here! !! So add the top "/ volume1 / @ appstore" to the path! vi /etc/profile I was able to realize that I had to be careful about the priorities when adding in! !! Add path at the arrow! (You have to put a bin like / volume1 / @ appstore / ffmpeg / bin! (I'm glad I installed ffmpeg on windows ...)) And I was able to download the video that had the error! !! !!
I've spent about 6 hours on this article ... I didn't want people in exactly the same situation to spend such wasted time, so I wrote this article. It was. This is my first article, so I'm sorry I wrote each line in a noisy tone m (_ _) m. I will be careful from the next time ... There are many places I have omitted, so if you have any questions, I would like to help as much as possible, so thank you!