Kodi Youtube addon without an api key, favourite channels and create m3u playlists

Using the Kodi Youtube addon without a google api key


install kodi and the kodi-addon-inputstream.adaptive addon ( which is needed for kodi youtube addon)

Code:
sudo pkg install kodi kodi-addon-inputstream.adaptive

the google api key lets you view your youtube subscriptions and saved playlists in Kodi using the Youtube addon,
but its a pain to set up

You can use the Kodi Youtube addon without an api key and favourite channels and playlist,
you can also queue videos to be played and save them as a m3u playlist

I also cover using mpv with the no cache option as an external video player with Kodi and the Youtube addon to remove buffering

Youtube removed the video because they said it violated the tos
however there is nothing dodgy in the video

just me showing how the kodi youtube addon without creating an api key ( which is a pain )
and then how to favourite channels and playlist

basically the same as using youtube in the browser without being signed in and bookmarking channels with the browser
instead of being logged in and saving them to your subscriptions. I appealed the take down and pointed this out but they still took the video down

i back up my youtube channel to odysee because youtube started giving me strikes for 7 year old Kodi videos

the video was recorded on Freebsd with OBS with nvenc encoding,
using virtual oss to capture the desktop audio and jack with the realtime kernel to record the mic


kodi userdata directory

mpv config

m3u-kodi script to create a m3u file for kodi from a youtube url


usage

Code:
m3u-kodi -i youtube-url

creates a m3u playlist file with the name of the youtube video in

Code:
~/.kodi/userdata/playlists/video

Code:
#!/bin/sh

#===============================================================================
# youtube create a m3u playlist for kodi
#===============================================================================

# dependencies:
# yt-dlp awk

#===============================================================================
# script usage
#===============================================================================

usage () {
# if argument passed to function echo it
[ -z "${1}" ] || echo "! ${1}"
# display help
echo "\
$(basename "$0") -i input"
exit 2
}


#===============================================================================
# error messages
#===============================================================================

INVALID_OPT_ERR='Invalid option:'
REQ_ARG_ERR='requires an argument'
WRONG_ARGS_ERR='wrong number of arguments passed to script'


#===============================================================================
# check the number of arguments passed to the script
#===============================================================================

[ $# -gt 0 ] || usage "${WRONG_ARGS_ERR}"


#===============================================================================
# getopts check the options passed to the script
#===============================================================================

while getopts ':i:h' opt
do
  case ${opt} in
     i) input="${OPTARG}";;
     h) usage;;
     \?) usage "${INVALID_OPT_ERR} ${OPTARG}" 1>&2;;
     :) usage "${INVALID_OPT_ERR} ${OPTARG} ${REQ_ARG_ERR}" 1>&2;;
  esac
done
shift $((OPTIND-1))


#===============================================================================
# variables
#===============================================================================

video=$(yt-dlp --skip-download --print "%(id)s\%(title)s" "${input}")
title=$(echo "${video}" | awk -F'\' '{ printf("%s\n"), $2 }')
playlistdir="${HOME}/.kodi/userdata/playlists/video/"
m3u="${playlistdir}${title}.m3u"


#===============================================================================
# m3uplaylist function
#===============================================================================

m3uplaylist () {
echo "${video}" \
| awk -F'\' '{ printf("%s\n%s %s\n%s%s\n"),\
"#EXTM3U", "#EXTINF: 0,", $2, "plugin://plugin.video.youtube/play/?video_id=", $1 }' > "${m3u}"
}


#===============================================================================
# run function
#===============================================================================

m3uplaylist

wlr-which-key and the m3u-kodi script


kodi youtube addon

kodi playlists

m3u files
 
Back
Top