Linux Linux bash script to create strm files from a youtube playlist and take screenshots
#1
I have now updated my previous effort to a new bash script that not only generates .stream files for the youtube add on it now also takes screenshots for kodi episode thumbnails. Just save the below code to a text file change permissions to run as an application.


 
Quote:#!/bin/bash



read -p "Enter Youtube URL:" url
read -p "ScreenShot Time (1-60min): " time

youtube-dl -i -j --flat-playlist $url |
jq -r --tab '.title + "\t" + "plugin://plugin.video.youtube/play/?video_id=" + .id' |
awk '{f=$1".strm"; print $2 >f}' FS='\t' |
youtube-dl -f mp4 -g $url |
parallel -I %% ffmpeg -ss "00:$time:00.000" -i %% -vframes 1 -q:v 2 -y {#}.png
Reply
#2
After playing around with linux cmd line I was at last able to achieve what I wanted

Code:
youtube-dl -i --playlist-reverse -j --flat-playlist 'https://www.youtube.com/channel/UCosWOTQyKE0tN1qE4Ah80Og' | jq -r --tab '.title + "\t" + "plugin://plugin.video.youtube/play/?video_id=" + .id' | awk '{f=$1".strm"; print $2 >f}' FS='\t'

This command line creates video name.strm files from a playlist
Reply

Logout Mark Read Team Forum Stats Members Help
Linux bash script to create strm files from a youtube playlist and take screenshots0