2020-06-21, 22:06
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