Rickroll Detection

This meme needs to die! Rickrolls have been around for far too long and have even been picked up by the mainstream media -- it's not funny anymore.

So, today I made a script for fun. It's a tongue-in-cheek system for checking if a link is a rickroll. You provide a URL, then some audio analysis is done, and the result is a plot showing whether or not it was a rickroll. This way, it will detect any spin-offs like Barak-roll, scary roll, and so on.

How it works:
  • First, your audio is muted automatically.
  • Then, behind the scenes, the url is opened in a hidden Firefox process.
  • The program Total Recorder is started and told to capture any audio played.
  • The webpage is closed after 15 seconds of capturing audio.
  • The audio is saved as a wav file in a temporary location, and your audio is unmuted.
  • A MATLAB script is used to analyze the audio.
  • The audio data is normalized in amplitude.
  • Then, the cross-correlation is taken between a reference Rickroll audio and the recorded audio.
  • If there are peaks in the cross-correlation above around 200, then it is likely the page contained a Rickroll.
  • My LnzScript project is what makes it easy to automate the process.

"Warning: rick-roll detected"

"Safe: no rick-roll detected"

(And, as a joke, here are the results for Kylie Minogue's "I Should Be So Lucky" since the songs sound similar).

The results would be even better if the comparison was done in frequency, instead of in time. But I'm not about to waste any more time than the few hours I put into this.