Extract mp3 from imeem (or similar site)

Posted on August 18, 2008. Filed under: Uncategorized |

When I listen to Michael Jackson’s Billie Jean in Imeem, I want to download it, of course they won’t let me download it so easily, but I know that I must have the cache computer for song, here’s a way to extract it:

  • Use you *Firefox* to open this URL, if you have flash player, it plays right away
  • Entry about:cache in the address bar
  • Under Memory cache device, click into List Cache Entries
  • In the list of of cache entries, you will see one very long item and the data size is going up, that’s the cache for the mp3
  • Wait for a while for the cache to be fully downloaded, then click into Key, you will see this page
  • So now you have the content of the song in hex dump, you will need to extract it, go to File and Save Page As to save it to a file “billie_jean.dump”, use Text files as Save as type.
  • Use your favorite text editor to open billie_jean.dump, you will see something like this:

    Remove all the lines up to “00000000:” and save it.
  • Finally you need to run a small C++ problem to help you convert the hex dump to a binary file
    using namespace std;
    int hex2int(int v){
      if(v >= 'a' && v <= 'z' )
        return v - 'a' + 10;
      if(v >= 'A' && v <= 'Z' )
        return v - 'A' + 10;
      else return v - '0';
    int hex2int(int a,int b){
      return hex2int(a) << 4 | hex2int(b);
    int main(){
      string line;
        istringstream iss(line);
        string token;
        iss >> token;
        for(int i=0;i<16;++i){
          iss >> token;

    Save it to hex2bin.cc and compile it with your favorite compiler, in my case gcc, so I just do "make hex2bin" to build the program.

  • Run the program and use billie_jean.dump as input (Note the song is in flv format)
    ./hex2bin < billie_jean.dump > billie_jean.flv
  • Now you have the song in flv format, to convert it to mp3, I use ffmpeg:
    ffmpeg -i billie_jean.flv -acodec copy billie_jean.mp3
    and you have billie_jean.mp3 ! Nice song MJ!

Read Full Post | Make a Comment ( None so far )

Recently on ...…

A very short and neat code for Union-Find

Posted on August 13, 2008. Filed under: Algorithm |

Minimum Weighted Aborescence (Directed MST)

Posted on August 13, 2008. Filed under: Algorithm, Graph, UVA | Tags: , , |

Winny’s Protocol (handshake)

Posted on August 10, 2008. Filed under: P2P, Winny |

Winny in Java

Posted on August 10, 2008. Filed under: Java, P2P, Winny |

Rasterizing Word and Excel documents to images in Java

Posted on January 3, 2008. Filed under: Java |

PDF rasterizing to images

Posted on January 3, 2008. Filed under: Java |

Liked it here?
Why not try sites on the blogroll...