/ IDEAS, ALEXA

Alexa and Youtube music videos

One day, maybe, far into the future, tech giants would work together to provide the best set of services for everyone. Or maybe we’ll have to hack together that future ourselves. Between Google banning Youtube from some Amazon devices and Amazon banning Chromecast from its store-of-everything (which should now be renamed store-of-everything-except-chromecast) there is probably no way anyone is going to provide a nice music service app for Alexa which has a playlist of popular youtube music from trending music videos.

I’m 99% sure this is against Youtube’s terms of service, but it would be an interesting workflow to try to implement. We would need to:

  1. Get a list of the trending videos on Youtube parsed into some sort of feed that would give titles and URLs
  2. Filter the videos to search for anything that has the words “Official Video”, “Official Music” or “Music Video” somewhere in the title
  3. Get the URLs for that filter and check it against a database of videos already processed so we don’t reprocess any old ones
  4. Grab the video (and extract audio?) using something like youtube-dl
  5. Convert / extract audio to be playable via Alexa via ffmpeg
  6. Store the extracted audio somewhere where we have an Internet facing https server
    1. Do not use S3, don’t want any account bans
    2. A little linux server (maybe rpi based) that has apache and some storage should do the trick
    3. A nice Letsencrypt certificate with a dynamic dns hostname would be needed as well
  7. Write a script that dynamically selects from the extracted audio files (maybe served from the audio server, maybe not)
  8. Implement a skill with the audioplayer interface

Finally, yell at Alexa to ask youtube to play trending music and we should actually get some music piping back at us. We could even go further and implement some functionality to ask youtube what’s playing and it would recite the title of the video back at us.