Play from youtube skill


#1

hi, im new in this forum and decided to create an account and share some of the skills ive done for my mycroft, ive started cleaning them and uploading to github (1st time working with github!) i have some c++ coding experience and just started coding in python, honestly the simplicity leaves me scratching my head sometimes, i like to declare the types of my variables… enough ranting ets talk about this simple skill

PLAY FROM YOUTUBE SKILL

This skill illustrates a very simple general music player. It works by downloading
music files from youtube and playing with Cvlc, at same time building an mp3 library on disk

Its intended to be a cheap way to play anything without any account (eg. spotify) or having a music library on disk

requires pafy and youtube-dl for youtube searching and cvlc for playing

all my skills were for personal use and may need some adjustment, maybe some hardcoded path or not very good python practices (first time working with python like i said), suggestions are welcome :slight_smile:

just noticed someone added a youtube skill to mycroft-skills repo, it may be better suited than this one, i intentionally made it a little more complex than needed hoping i could extend it later

Known issues:

  • Random errors downloading, i think when 1st search result is a playlist?
  • Random errors loading file, probably forbidden chars in youtube result name, unsure if proposed fix worked because im unsure of error source but didnt get this error anymore
    -Stop isnt working, but i think its my mycroft instance that is broken (doesnt work in any skill)

TODO:

-Maybe converting to mp3 and use playmp3 util function so cvlc is not needed (probably would need lame then)
or -Play youtube video url directly without download, some other dependency would be introduced instead of cvlc and no library is created but removes pafy and youtube-dl dependences
-Handle queuing up multiple songs
-Refine video search
-Fix know issues

link:


#2

man , this skill is great but how to add it to mycroft-core . i am also new here :slight_smile:


#3

just create a musicskill folder in your skills folder and download/git clone the repo to it :slight_smile:


#4

Hello Jarbas!

I’ve installed your skill on my picroft (Raspberry Pi) and when I say: Hey mycroft - Play youtube I get this missage and nothing happens:

Could you help me? Thanks!


#5

skill is currently not working, code was a mess, i started over but for some reason now get 0second files after download

do not use until fixed


#6

Oh ok! I didn’t know that. I’ll wait until going to be fixed :wink:


#7

A great skill…

Can’t wait for you to fix it, please let us know when you do :slight_smile:

Nathan