many 720p old vids with kodi (youtube)

Share your own howto's etc. Not for support questions!

many 720p old vids with kodi (youtube)

Postby bester69 » 2021-04-05 14:55

enjoy more than 1K hd movies throught youtube easily using youtube kodi addon..


Requiremens: :idea:
-youtube-dl
- kodi
- youtube addon kodi


0- Fisrst, we go to youtube web and search for 80's Playlists with many movies.. and we download them until we pick enought movies. We copy playlist url and use it like in code below to download playlist youtube urls.:
Code: Select all
playlisturl="https://www.youtube.com/watch?v=_TeoeXWxvZI&list=PLFjximVveyNVCD1u9NkIC0m5hvaSEYUZv"
youtube-dl -j --flat-playlist "$playlisturl"  | jq -r '.id' | sed 's_^_https://www.youtube.com/watch?v=_' >> Mylist80's.txt


1- Once we got some playlists with hunderths of url movies.. we concat them and filter repeated urls. (sort -u):
cat *.txt > Allmovies.txt | sort -u > FilteredMovies.txt

2- Now we will need to pick only urls that are a full movie and drop those ones with low quality (not hd).:
for that we will parse following script that uses youtube-dl.:

youtube1080p720p.sh
**This script generate several resulting txt files with quality of movies, and drop trailers and short movies with duration less than 1 hour
Code: Select all
#!/bin/bash
#
#------#------#------#------#------#------#------#------

bpath="/tmp/backyou720p1080p-`date +%Y-%m-%d_%H%M%S`"
mkdir -p "$bpath"
cp *.txt "$bpath/"

rm 480p.txt 720p.txt 1080p.txt DASH.txt otros.txt sal.txt log*.txt trailers.txt
for i in `cat *.m3u8`;
do
  echo $i
A="$(youtube-dl --get-format --get-duration "$i")"
B=$(echo "$A" | tr -cd ':'|wc -c)
if  [ "$B" == "2" ]
then
    :
else
        echo "es Trailer, no tiene x2 comillas el datetime, osea < 1 hora"
        echo  "Formato es $A : $i" >> logtrailers.txt
        echo  "$i" >> trailers.txt
        continue
fi

 case "$A" in
 #Formato es 135 - 640x480 (480p)+140 - audio only (tiny)
        *"480p"* ) 
        echo "Formato es $A" >> log480p.txt
        echo "$i" >> 480p.txt
        ;;       
        *"720p"* ) 
        echo "Formato es $A" >> log720p.txt
        echo "$i" >> 720p.txt
        ;;
        *"1080p"* ) 
        echo "Formato es $A" >> log1080p.txt
        echo "$i" >> 1080p.txt
        ;;
        *"244"* ) 
        echo "Formato es $A" >> log480p.txt
        echo "$i" >> 480p.txt
        ;;
        *"247"* ) 
        echo "Formato es $A" >> log720p.txt
        echo "$i" >> 720p.txt
        ;;
        *"248"* ) 
        echo "Formato es $A" >> log1080p.txt
        echo "$i" >> 1080p.txt
        ;;
        *"135"* ) 
        echo "Formato es $A" >> log480p.txt
        echo "$i" >> 480p.txt
        ;;
        *"137"* ) 
        echo "Formato es $A" >> log1080p.txt
        echo "$i" >> 1080p.txt
        ;;
        * )
        echo "Formato es $A" >> otros.txt
        ;;
    esac         

     echo "Formato es $A" >> sal.txt

done
bpath="/tmp/backyou720p1080p-`date +%Y-%m-%d_%H%M%S`"
mkdir -p "$bpath"
cp *.txt "$bpath/"


3- Once we have the final resulting lists with all hd movies ok.. we just need to convert any youtube url in those lists in strm files so that youtube addon can recognize format and play them:
like this, each one.: :!:
Movies of Vampires - Full Movie (1985).strm
Code: Select all
plugin://plugin.video.youtube/play/?video_id=JUA_cV6kkcQ


To generating all movies with strm format, we will use following script to parse again ok playlists previoulsy obtained.:

you2strm.sh
**We will have to rename playlists extensions to m3u8 previously to parse script

Code: Select all
#!/bin/bash
#
for i in `cat *.m3u8`;
do
A=$(youtube-dl -i --get-id  --get-filename "$i")
id=$(echo  "$A" | head -n 1)
sfilename=$(echo  "$A" | tail -n 1)
filename=${sfilename%-*}
echo "Id es $id, Nombre: $filename"
 urlyou="plugin://plugin.video.youtube/play/?video_id=$id"
 echo "$urlyou" > "$filename.strm"

done


4- Once we got all strm files, we just need to open kodi and import that folder with strm files and scan it for movies content.:
So the resulting we will look like this, and we will get more than 500 hd playable full movies from youtube which copyrights are down to youtube legality, so It will be legal everything we did.:

:idea: when we scan folder, We will select : Universal Movies Scrapper, so kodi is able to build up library metadatas information with strm files.
Image

- Kodi folder, with library loaded.:
Image

Enjoy!!
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1844
Joined: 2015-04-02 13:15

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable
cron