aubio

Analyzing songs online

When built with ffmpeg or libav, aubio can read most existing audio and video formats, including compressed and remote video streams. This feature lets you analyze directly audio streams from the web.

A powerful tool to do this is youtube-dl, a python program which downloads video and audio streams to your hard-drive. youtube-dl works not only from youtube, but also from a large number of sites.

Here is a quick tutorial to use aubio along with youtube-dl.

First, you will need to have aubio installed, making sure it has been compiled with libavformat and friends. Then, install youtube-dl with pip:

$ pip install youtube-dl

To get the url of the audio stream associated to a web page, youtube-dl provides two command line options: -g to show url, -x to get only audio. You can get the full list of options with youtube-dl --help;

Examples:

Extract onsets from a youtube video:

$ aubio onset `youtube-dl -gx https://youtu.be/AW2v5Yqt84I`

Play the beats along a soundcloud recording:

$ ./python/demos/demo_tapthebeat.py `youtube-dl -xg https://soundcloud.com/youngpulse/a1-work-2-do`

Note: if youtube-dl had been previously installed, best is to update it to the latest version, which can be done with youtube-dl -U or pip install --upgrade youtube-dl.

Wed, 04 Oct 2017, 12:34. trackback - view/add comments

Responses to this post

Leave your own comment

  Name (required)

  E-mail (not published)

  Website

© 2003-2017 the aubio team | cc-by-sa