Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Downloading Youtube Shortcuts in Disk!!

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Downloading Youtube Shortcuts in Disk!!

#1 Post by bester69 »

Hi,

I was wondering if there would be a good way to keep in disk shortcuts of youtube videos, so we can save space in disk, keep them in our disk (shortcuts) and being able to open them with mpv/vlc by just clicking on them. Furthermore being able to preview them by attach them a thumbnail...,so we can see what is within the video shortcut.

So I made a small script(youlnk.sh) to create a hidden folder for each youtube's video shortcut, with two file within it, one .m3u file with the youtube's URL,so VLC or MPV can open it by clicking on it, and other image file with the preview thumbanil, and both files link to parent visible folder.

youlnk.sh

Code: Select all

#------
TAG="$(youtube-dl --get-filename $1)"
mkdir ."$TAG"  
cd ."$TAG"
#------
THUM="$(youtube-dl --get-thumbnail $1)"
wget $THUM -O .xzt &
touch "$TAG".m3u
echo $1 > ./"$TAG.m3u"
sleep 1
mv .xzt "$TAG".jpg
#------
ln -sr ./"$TAG".jpg ../
ln -sr ./"$TAG".m3u ../
cd ..
Example:
youlnk https://www.youtube.com/watch?v=8qZHw60dDqQ
>>ls -l
Hot Girls on Needy Guys-8qZHw60dDqQ.mp4.jpg -> .Hot Girls on Needy Guys-8qZHw60dDqQ.mp4/Hot Girls on Needy Guys-8qZHw60dDqQ.mp4.jpg
Hot Girls on Needy Guys-8qZHw60dDqQ.mp4.m3u -> .Hot Girls on Needy Guys-8qZHw60dDqQ.mp4/Hot Girls on Needy Guys-8qZHw60dDqQ.mp4.m3u

The result, looks like this.:
Imagetemp image upload
-------------------------------------

So, What do you think??, Do you like the idea or do you think there's a better way to do this ? :idea: :o
Last edited by bester69 on 2018-06-09 01:03, edited 1 time in total.
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Downloading Youtube Shortcuts in Disk??

#2 Post by bester69 »

A second version with hard links instead softlinks, and out.sh to regenerate links.
youlnk.sh

Code: Select all

#!/bin/bash
#
THUM="$(youtube-dl --get-thumbnail $1 &)" 
TAG=$(youtube-dl --get-filename $1)
#------
TAG="${TAG%.*}"
mkdir ."$TAG"
cd ."$TAG"
rm "$TAG".* out.sh .xzt
wget $THUM -O .xzt
mv .xzt "$TAG".XX.jpg
#------
touch "$TAG".m3u8
touch "$TAG".mp4
echo $1 > ./"$TAG.m3u8"
echo $1 > ./"$TAG.mp4"
#------
#ln -sr ./"$TAG".jpg ../
#ln -sr ./"$TAG".m3u8 ../
ln  *.jpg ../
ln  *.m3u8 ../
##ln  *.mp4 ../
#------
touch out.sh && chmod +x out.sh
echo "ln  *.m3u8 ../" > out.sh
##echo "ln  *.mp4 ../" >> out.sh
echo "ln  *.jpg ../" >> out.sh
cd ..
clear
echo "Fin de Procesamiento"
A second script, to create all from a list.:

youlist.sh

Code: Select all

#!/bin/bash
#
#------#------#------#------#------#------#------#------

for i in `cat $1`;
do 
youlnk $i;

done
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Downloading Youtube Shortcuts in Disk??

#3 Post by bester69 »

So then , we apply youlist script to yutubes' list:
youlist ./MyYoutubeVideos.txt

And the result look like this, and we can enjoy all of our youtube videos in streaming with mpv or vlc, by using youtube's shortcuts.:

Image
https://ibb.co/bMDsf8
Last edited by bester69 on 2018-06-09 08:43, edited 1 time in total.
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Downloading Youtube Shortcuts in Disk!!

#4 Post by debiman »

wtf, softporn.
thanks for another glimpse into your personal life.
Image

User avatar
None1975
df -h | participant
df -h | participant
Posts: 1389
Joined: 2015-11-29 18:23
Location: Russia, Kaliningrad
Has thanked: 45 times
Been thanked: 66 times

Re: Downloading Youtube Shortcuts in Disk!!

#5 Post by None1975 »

bester69 wrote:Hot Girls on Needy Guys
You are at least mellowed ...
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2029
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 139 times
Been thanked: 206 times

Re: Downloading Youtube Shortcuts in Disk!!

#6 Post by Hallvor »

I suspect we have a master troll in our presence. :lol:
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: Downloading Youtube Shortcuts in Disk!!

#7 Post by sunrat »

Ladyboys? The truth is out!

I usually just download online videos I want to watch more than a couple of times. Not especially interested in ladyboys videos though. :shock: :mrgreen:
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Downloading Youtube Shortcuts in Disk!!

#8 Post by bester69 »

:?
Last edited by bester69 on 2018-06-10 13:54, edited 1 time in total.
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

arochester
Emeritus
Emeritus
Posts: 2435
Joined: 2010-12-07 19:55
Has thanked: 14 times
Been thanked: 54 times

Re: Downloading Youtube Shortcuts in Disk!!

#9 Post by arochester »

Please stick to Debian, Linux, Computers...

If you want to get into a general discussion this is not the place.

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Downloading Youtube Shortcuts in Disk!!

#10 Post by bester69 »

Getting the playlist .txt from youtube; so we can download the whole playlist shortcuts.:

Code: Select all

$ git clone https://github.com/alexfalcucc/playlist-easy
youget.sh

Code: Select all

###Usar Comillas dobles al pasarle la Playlist
python2 /home/myuser/.local/share/youtube_playlist/youParse.py $1 > Playlist_youtube.txt
echo "Las URL's son.:"
cat ./Playlist_youtube.txt
---------------------------------------

Then, we would run following scripts in order to get all shortcuts videos..:

youget "Url_Playlist" (**Using quotes in order to work)
youlnks ./Playlist_youtube.txt


Ive just downloaded two video Tutorials (Libreoffice and Audacity's Playlists) with 60 videos for just 9Mb in disk. :D 8)
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

Post Reply