Youtube-dl

Installation – Synology NAS

Install Python3 via Package Manager
SSH into Synology

sudo su
cd /tmp
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
exit

sudo -H python3 -m pip install --upgrade youtube-dl
sudo -H python3 -m pip install --upgrade ffmpeg

Example – Playlist Download

youtube-dl \
-f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' \
--yes-playlist \
--prefer-ffmpeg \
--merge-output-format mp4 \
--output '%(uploader)s/%(playlist)s/%(playlist)s - %(upload_date)s - %(title)s.%(ext)s' \
--abort-on-unavailable-fragment \
--add-metadata \
--download-archive archive.txt \
"<URL>" \
> /dev/null &

Example – Playlist Download From File

youtube-dl \
-f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' \
--yes-playlist \
--prefer-ffmpeg \
--merge-output-format mp4 \
--output '%(uploader)s/%(playlist)s/%(playlist)s - %(upload_date)s - %(title)s.%(ext)s' \
--abort-on-unavailable-fragment \
--add-metadata \
--download-archive archive.txt \
--batch-file urls.txt \
> /dev/null &

References

Leave a Reply

Your email address will not be published. Required fields are marked *