Archive | Music RSS for this section

Backup Shazam Tags from Android without Root

Image

1. Connect your phone via USB and backup Shazam data files. The adb command is part of the Android SDK. You will need to change the package name “com.shazam.encore.android” to “com.shazam.android” if you have the free version.

adb backup -f com.shazam.encore.android.ab com.shazam.encore.android

2. Convert the backup file to a tar file.

dd if=com.shazam.encore.android.ab bs=1 skip=24 | openssl zlib -d > com.shazam.encore.android.tar

3. Extract the tar file.

tar -xvf com.shazam.encore.android.tar

4. Export the data from the database using sqlite.

$ sqlite3 ./apps/com.shazam.encore.android/db/library.db
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .output tags.sql
sqlite> .dump
sqlite> .exit

5. Or export csv data with this sql from spectas

$ sqlite3 ./apps/com.shazam.encore.android/db/library.db
sqlite> .mode csv
sqlite> .output tags.csv
sqlite> SELECT a.name , t.title, t.subtitle, t.album, t.subgenre_name, tg.short_datetime, tg.location_name, tg.lat, tg.lon 
FROM artist a, artist_track at, track t, tag tg
WHERE a.id = at.artist_id AND at.track_id = t._id AND tg.track_id = t._id ORDER BY tg.timestamp;
sqlite> .exit
Advertisements

Convert mp4 and flv video to mp3 with VLC

Download VLC at http://www.videolan.org

NOTE – FLV transcoding does not work in version 2.0.4. Make sure you’re using the most recent release.

Mac OS X Terminal

/Applications/VLC.app/Contents/MacOS/VLC -I dummy "/Users/yourname/Music/Input File.mp4" --sout='#transcode{acodec=mp3,vcodec=dummy}:standard{access=file,mux=raw,dst="/Users/yourname/Music/Output File.mp3"}' vlc://quit

Mac OS X Terminal (Multiple Files)

for file in /Users/$USER/Music/*.mp4; do /Applications/VLC.app/Contents/MacOS/VLC -I dummy "$file" --sout="#transcode{acodec=mp3,vcodec=dummy}:standard{access=file,mux=raw,dst=\"$(echo "$file" | sed 's/\.[^\.]*$/.mp3/')\"}" vlc://quit; done

Mac OS X GUI

  1. Open VLC
  2. File > Streaming/Exporting wizard…
  3. Transcode/Save to file
  4. Next
  5. Choose an input file under “Select a stream” or “Existing playlist item”
  6. Next
  7. Check “Transcode video”
  8. Codec: Dummy
  9. Check “Transcode audio”
  10. Codec: MP3
  11. Bitrate (kb/s): 128
  12. Next
  13. Encapsulation format: RAW
  14. Next
  15. Choose a destination file ending in .mp3. Note that if you click Browse, it will force you to use .raw, so choose both .mp3.raw and delete .raw in the input field.
  16. Next
  17. Finish

Windows Command Prompt

Change “C:\Input File.flv” and “C:\Output File.mp3”.

"%ProgramFiles%\VideoLAN\VLC\vlc.exe" "C:\Input File.flv" --sout=#transcode{acodec=mp3,vcodec=dummy}:standard{access=file,mux=raw,dst="C:\Output File.mp3"} vlc://quit

Windows Command Prompt (Multiple Files)

Change %USERPROFILE%\Music to the directory containing the files to convert (make sure you keep the \*.* at the end).

for %a in ("%USERPROFILE%\Music\*.*") do "%ProgramFiles%\VideoLAN\VLC\vlc.exe" "%a" --sout=#transcode{acodec=mp3,vcodec=dummy}:standard{access=file,mux=raw,dst="%a.mp3"} --intf=dummy --verbose=2 --play-and-exit

Note that this command will spawn multiple instances of VLC and convert each file in parallel, which can take a lot of CPU. I attempted to fix this using “–one-instance –playlist-enqueue” but the destination file does not get updated. As a workaround, you can throttle the invocations by adding this to the end of the command:

 && choice /T 30 /D y /M "Waiting 30 seconds..."

Windows GUI

  1. Open VLC
  2. Media > Convert / Save…
  3. Click [Add…] and select an input file
  4. Click [Convert / Save]
  5. Under “Destination” enter a destination file ending in .mp3
  6. Under “Settings” click the button with alt text “Create a new profile” to the right of the red “X”
  7. Enter a Profile Name (i.e. “MP3 Only”)
  8. On the /Encapsulation\ tab select “RAW”
  9. On the /Audio Codec\ tab check “Audio”
  10. Codec: MP3
  11. Bitrate: 128 kb/s
  12. Channels: 2
  13. Sample Rate: 44100
  14. Click [Save]
  15. Under “Settings” select the profile name from Step 7 (i.e. “MP3 Only”)
  16. Click [Start]

Instructions were written for VLC 1.0.5 “Goldeneye”