Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mp3_file_name = "John_Wesley_Coleman_-_07_-_Tequila_10_Seconds.mp3"
- with open(mp3_file_name ,"rb") as file_identifier:
- file_identifier.seek(-128, 2) #from end of file shift backwards by 128 bytes
- # typedef struct
- # {
- # char tag[3]; // 3 byte(s)
- # char title[30]; //30 byte(s)
- # char artist[30]; //30 byte(s)
- # char album[30]; //30 byte(s)
- # char year[4]; // 4 byte(s)
- # char comment[30]; //30 byte(s)
- # unsigned char genre; // 1 byte(s)
- # } mp3Tag ;
- tag = file_identifier.read(3) # 3 byte(s)
- #title = #30 byte(s)
- #artist = #30 byte(s)
- #album = #30 byte(s)
- #year = # 4 byte(s)
- #comment = #30 byte(s)
- #genre = #1 byte(s)
- print tag
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement