Kodi Community Forum
Linux Linux bash script to create strm files from a youtube playlist and take screenshots - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
--- Thread: Linux Linux bash script to create strm files from a youtube playlist and take screenshots (/showthread.php?tid=355359)



Linux bash script to create strm files from a youtube playlist and take screenshots - DNKK - 2020-06-21

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



RE: Help with command lines to generate strm files from a youtube playlist - DNKK - 2020-06-22

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


This forum uses Lukasz Tkacz MyBB addons.