E90Post
 


European Auto Source
 
BMW 3-Series (E90 E92) Forum > E90 / E92 / E93 3-series Technical Forums > ConnectedDrive / I-Drive / Navigation Related Discussion > Idrive backup MP3 to USB



Reply
 
Thread Tools Search this Thread
      07-06-2009, 09:51 AM   #1
Wongy
Registered
 
Drives: BMW 318
Join Date: Jul 2009
Location: Belgium

Posts: 2
iTrader: (0)

Idrive backup MP3 to USB

Hi,

I have the BMW 318 since a couple of months with the latest version of the Idrive.
I have put some MP3 from USB sticks (in the glove department) to the harddrive.
Now I'd like to save all the music from the harddrive to a high capacity USB stick.

I've tried with a 4GB stick and it indeed copied all the MP3's from the harddrive, BUT the file extension has changed from MP3 to BR4.
The file sizes are exactly the same (MP3 <-> BR4), but the file contents are different. I opened them with an hexadecimal editor and they indeed do not match.

I tried with another stick (SanDisk 8GB) => same result.

Does anyone know why the extension is changed by my BMW, and how to open those BR4 files? I've checked with Google -> no luck. I changed the extension to MP3 -> did not work.

Thanks for any help you can provide me.
Wongy is offline  
0
Reply With Quote
      07-08-2009, 03:49 AM   #2
E90M3CDFR
First Lieutenant
 
Drives: E91 Sportwagon
Join Date: Sep 2008
Location: NoVA

Posts: 303
iTrader: (1)

Backup of MP3 to USB: File format

It is a copyright protection scheme. The files created by the backup routine are meant only for restoring back to the HDD (and probably keyed to your car in particular). I suppose they are concerned that you might use the DVD drive to rip CDs and then copy them over to a USB stick.

There is also a SIB/bulletin from BMW that prohibits service personnel from doing a back up of the MP3 colleciton for you, in case they were about to erase/replace the HDD. Again, mainly to prevent copyright infringement issues.

So its useful to do a back-up any time you expect the hard drive/CIC to be serviced, in case they nuke the contents for you.
E90M3CDFR is offline   United_States
0
Reply With Quote
      07-09-2009, 07:02 AM   #3
Wongy
Registered
 
Drives: BMW 318
Join Date: Jul 2009
Location: Belgium

Posts: 2
iTrader: (0)

Thanks for your reply.
BMW should put this information in their manual!

Anyway, if now I want to put back in the car the backed up data (i.e. BR4 files), they will be decrypted by the car and converted back to MP3, right?

Thanks.
Wongy is offline  
0
Reply With Quote
      07-09-2009, 07:55 AM   #4
E90M3CDFR
First Lieutenant
 
Drives: E91 Sportwagon
Join Date: Sep 2008
Location: NoVA

Posts: 303
iTrader: (1)

Restoring

That's how its supposed to work. I have only done a backup so far, so I can't say for sure it will work as advertised. I should have tested it right after I got the car when I only had a few songs loaded and re-loading would have been a breeze if they were wiped out by the restoring process failing.

Maybe someone else will give it a try before they load up their HDD (and hopefully not because they have suffered a system crash).
E90M3CDFR is offline   United_States
0
Reply With Quote
      10-27-2009, 08:36 AM   #5
e90_rsa
Registered
 
Drives: BMW X6
Join Date: Oct 2009
Location: Germany

Posts: 1
iTrader: (0)

Hi,

The original file seems to be bitwise negated.

The corresponding format is:

- br3: mp4
- br4: mp3
- br5: wma

Appropriate tools should be available or must be programmed.

Hope this helps!
e90_rsa is offline  
0
Reply With Quote
      11-28-2009, 01:07 AM   #6
doug_335ic
New Member
 
doug_335ic's Avatar
 
Drives: 2011 MINI Countryman
Join Date: Oct 2009
Location: TX

Posts: 7
iTrader: (0)

Idrive backup MP3 to USB (script)

Thanks! Flipping the bytes worked. Attached Python script (running on SUSE 11.1 32-bit PC) takes my OGG/VORBIS collection of music and puts it in proper format on a USB for a BMW iDrive restore. Output looks like:

Removing existing /media/disk/BMWData/Music/*
1/4 Tool,Lateralus,1:The Grudge... MP3, ID3, Flipped.
2/4 Tool,Lateralus,1:Eon Blue Apocalypse... MP3, ID3, Flipped.
3/4 System of a Down,Mezmerize,1:Soldier Side - Intro... MP3, ID3, Flipped.
4/4 System of a Down,Mezmerize,1:B.Y.O.B.... MP3, ID3, Flipped.
Writing out data_1 index
Done. Size in Mb should be under 125000 for a 2010 iDrive
18 /media/disk/BMWData/Music/

#!/usr/bin/python
import os,struct,sys,string
#----------------------------------------------------------------------
# In my case, I've got a number of ogg files with embedded vorbis
# comments. Script is run in some directory within that ogg
# collection, and it reads all the ogg files below that point
# converting the vorbis comments to id3 tags, creating the BR4
# files BMW wants. You do have to create the BMWData / Music /
# data_1 file with all the directory names to read for it to
# restore properly. So for a different car than my 2010, you could
# make a backup and then see if your structure is the same as my:
#
# BMWData
# BMWBackup.ver
# Music
# data_1 <-script creates this
# media_directory_1 <-script creates this
# media_directory_2 <-script creates this
#
# ...and update the script as necessary. Code_1 and Code_2
# could also be unique to my car or the year or model. I just
# copy a bunch of CD directories ripped in ogg format for other
# players into some fresh directory and then run this script
# from the top of that fresh directory to get a new USB load for
# the vehicle.
#----------------------------------------------------------------------

# base_directory=os.getenv('HOME')+'/conversion/BMWData/Music/'
base_directory='/media/disk/BMWData/Music/'
data_1=[]
code_1='1258287780'
code_2='8'
quality='160k' # Or you can go down to 128k rate MP3 if acceptable
# I think a -q6 setting ogg file is the equivalent of a 192k MP3, but
# in a car I dunno if anyone but the most refined audiophile could
# hear the difference on our BMW speakers between 160k and a higher
# fidelity (and thus much larger) file.
map={'.BR3':'.mp4','.BR4':'.mp3','.BR5':'.wma',
'.mp4':'.BR3','.mp3':'.BR4','.wma':'.BR5'}
number_of_files=0

print 'Removing existing',base_directory+'*'
# Caution: the following line removes existing USB music
# collection. In your environment change the base_directory and
# comment out this line until it all works to your satisfaction.
os.system('rm -rf '+base_directory+'*')

# Get the count of all .ogg files below this point...
for root, dirs, files in os.walk('.', topdown=True):
for name in files:
filename=os.path.join(root, name)
if filename.find('.ogg')>0:
number_of_files+=1
file_number=0

# And then process all those .ogg files into .BR4 files
for root, dirs, files in os.walk('.', topdown=True):
for name in files:
filename=os.path.join(root, name)
if filename.find('.ogg')>0:
file_number+=1
os.system('vorbiscomment -l '+filename+' > foo')
fh=open('foo')
fd=fh.readlines()
os.unlink('foo')
the_title=filename[filename.rfind('/')+1:-4]
the_artist='Unknown'
the_genre='Unknown'
the_date='2009'
the_album='Unknown'
the_track='1'
for l in fd:
if l.find('title=')==0: the_title=l[6:-1]
elif l.find('artist=')==0: the_artist=l[7:-1]
elif l.find('genre=')==0: the_genre=l[6:-1]
elif l.find('date=')==0: the_date=l[5:-1]
elif l.find('album=')==0: the_album=l[6:-1]
elif l.find('tracknumber=')==0: the_track=str(int(l[12:-1]))
album_directory=string.lower(the_album.replace(' ','_'))
data_1_entry='/'+album_directory+'/\t'+the_album+'\t'+code_1+'\t'+code_2+'\t\n'

if not os.access(base_directory+album_directory,os.R_OK):
os.mkdir(base_directory+album_directory)
output_filename=base_directory+album_directory+'/'+the_title+'.mp3'
sys.stdout.write(' '+str(file_number)+'/'+str(number_of_files)+' '+the_artist+','+the_album+','+the_track+':'+the_t itle+'...')
sys.stdout.flush()
# Create the mp3 from the ogg in the correct USB directory
if os.access(output_filename,os.R_OK):
os.unlink(output_filename)
command='ffmpeg -i "'+filename+'" -ab '+quality+' "'+output_filename+'" >& /dev/null'
os.system(command)
sys.stdout.write(' MP3,')
sys.stdout.flush()
# Put the tag back on
command= 'id3v2 -a "'+the_artist+'" -A "'+the_album+'" -t "'+the_title+\
'" -g "'+the_genre+'" -y "'+the_date+'" -T "'+the_track+'" "'+\
output_filename+'" >& /dev/null'
os.system(command)
sys.stdout.write(' ID3,')
sys.stdout.flush()
bmw_name=output_filename.replace('.mp3',map['.mp3'])
ih=open(output_filename,'rb')
oh=open(bmw_name,'wb')
while True:
element = ih.read(1)
if len(element)>0:
mybyte = struct.unpack("<b",element)[0]
inverted_data = ~ mybyte
oh.write(struct.pack(">b",inverted_data))
else: break
oh.close()
sys.stdout.write(' Flipped.\n')
os.unlink(output_filename)
# Remove the .mp3 file now that the .BR4 is there...
sys.stdout.flush()
if not data_1_entry in data_1:
data_1.append(data_1_entry)
elif filename.find('.BR5')>0:
# This was just to test/verify that a BR5 was just a flipped wma
ih=open(filename,'rb')
bmw_name=filename.replace('.BR5',map['.BR5'])
oh=open(bmw_name,'wb')
while True:
# I know... one byte at a time is too slow...
element = ih.read(1)
if len(element)>0:
mybyte = struct.unpack("<b",element)[0]
inverted_data = ~ mybyte
oh.write(struct.pack(">b",inverted_data))
else: break
oh.close()

print 'Writing out data_1 index'
data_1.sort()
fh=open(base_directory+'data_1','w')
fh.writelines(data_1)
fh.close()

print 'Done. Size in Mb should be under 125000 for a 2010 iDrive'
os.system('du -ms '+base_directory)
doug_335ic is offline  
0
Reply With Quote
      11-28-2009, 01:17 AM   #7
doug_335ic
New Member
 
doug_335ic's Avatar
 
Drives: 2011 MINI Countryman
Join Date: Oct 2009
Location: TX

Posts: 7
iTrader: (0)

Attachment instead of inline...

Oops... Python is indentation dependent, so in-lined text got messed up. Same script as an attachment. If you already have MP3s with ID3 tags included, most of the script can be eliminated...
Attached Files
File Type: txt bmw_idrive_flip.txt (5.6 KB, 2491 views)
doug_335ic is offline  
0
Reply With Quote
      11-28-2009, 10:06 PM   #8
klipseracer
Banned
 
Drives: 2007 E90 335i, 05 E46 330i
Join Date: Aug 2009
Location: Arizona

Posts: 3,012
iTrader: (27)

Garage List
2007 335i  [0.00]
2005 330i  [0.00]
Send a message via MSN to klipseracer
Quote:
Originally Posted by e90_rsa View Post
Hi,

The original file seems to be bitwise negated.

The corresponding format is:

- br3: mp4
- br4: mp3
- br5: wma

Appropriate tools should be available or must be programmed.

Hope this helps!
Great first post whoever this is.
klipseracer is offline   United_States
0
Reply With Quote
      11-28-2009, 10:09 PM   #9
klipseracer
Banned
 
Drives: 2007 E90 335i, 05 E46 330i
Join Date: Aug 2009
Location: Arizona

Posts: 3,012
iTrader: (27)

Garage List
2007 335i  [0.00]
2005 330i  [0.00]
Send a message via MSN to klipseracer
Quote:
Originally Posted by doug_335ic View Post
Oops... Python is indentation dependent, so in-lined text got messed up. Same script as an attachment. If you already have MP3s with ID3 tags included, most of the script can be eliminated...
someone should compile this into a binary. I don't have the new iDrive to test otherwise I'd take the time to port it over.
klipseracer is offline   United_States
0
Reply With Quote
      09-01-2010, 05:47 AM   #10
ILoveBR
New Member
 
Drives: 335i Convertible
Join Date: Sep 2010
Location: South Africa

Posts: 10
iTrader: (0)

Would anyone have a tool to convert the BMW data files back into music format (MP3, MP4 and wave)? Many thanks, Joseph
ILoveBR is offline  
0
Reply With Quote
      09-06-2010, 07:03 AM   #11
skanman
Registered
 
Drives: 2010 Carbon Black 535 M-Sport
Join Date: Sep 2010
Location: Silicon Valley

Posts: 4
iTrader: (0)

I wrote a binary for pulling the backup files off my 535. Email me at 180ring@gmail.com.
skanman is offline  
0
Reply With Quote
      09-10-2010, 10:46 PM   #12
ILoveBR
New Member
 
Drives: 335i Convertible
Join Date: Sep 2010
Location: South Africa

Posts: 10
iTrader: (0)

Hi Skanman, txs, i have emailed you. Looking forward to hearing from you! I have lost my music collection due to a computer crash and the car is the only place i have it!
ILoveBR is offline  
0
Reply With Quote
      09-11-2010, 08:54 AM   #13
Misterted
Maniac with a BMW
 
Misterted's Avatar
 
Drives: '12 135i Vert M-Sport 6mt
Join Date: Jul 2008
Location: Jersey Shore

Posts: 159
iTrader: (0)

Quote:
Originally Posted by skanman View Post
I wrote a binary for pulling the backup files off my 535. Email me at 180ring@gmail.com.
Can you explain how I would use it? Is it a program?
__________________
2012 135i Vert 6mt
Space Gray Metallic/Black/M-Sport
Harmon Kardon/Sirius/HD/iPod
Heated Power Seats
Misterted is offline   United_States
0
Reply With Quote
      09-11-2010, 09:38 AM   #14
ILoveBR
New Member
 
Drives: 335i Convertible
Join Date: Sep 2010
Location: South Africa

Posts: 10
iTrader: (0)

good question. Probably a program we would run in the computer, that would take the specified file (the one containing the backup data files) and convert it back to mp3, by negating its bytes. I suppose after running the program a new output file would be created with the mp3 songs on it...
ILoveBR is offline  
0
Reply With Quote
      04-16-2011, 10:02 AM   #15
Viper060
Registered
 
Drives: BMW 7
Join Date: Apr 2011
Location: RUSSIA

Posts: 2
iTrader: (0)

BR-Converter http://depositfiles.com/files/3ie6nvrsf
Viper060 is offline  
0
Reply With Quote
      12-20-2011, 11:10 AM   #16
lucho1970
Enlisted Member
 
Drives: BMW 335i sedan
Join Date: Nov 2011
Location: Holland Landing

Posts: 34
iTrader: (0)

I couldn't find this file to download as it seems to have been deleted.
So I created my own version and I just ran it through a backup that I created and it worked perfectly.
I made it this morning and wouldn't be surprised if it has some issues, but I converted 200 files in a couple of minutes.
If anyone is interested, send me a note and I'll send you the file. If enough people want it, I'll post it somewhere.
lucho1970 is offline  
0
Reply With Quote
      12-24-2011, 02:43 PM   #17
Insomnium
Registered
 
Drives: BMW 520D
Join Date: Dec 2011
Location: Russia

Posts: 1
iTrader: (0)

lucho1970, send me please your version of BR converter. thanks (kojioe6@gmail.com)
Insomnium is offline  
0
Reply With Quote
      12-28-2011, 03:40 AM   #18
sleepy_m3
New Member
 
sleepy_m3's Avatar
 
Drives: E92 M3 2011 Frozen Gray
Join Date: Dec 2011
Location: Taiwan

Posts: 5
iTrader: (0)

lucho1970, please send me a copy of your file, thanks! (lieu@pchome.com.tw)
Quote:
Originally Posted by lucho1970 View Post
I couldn't find this file to download as it seems to have been deleted.
So I created my own version and I just ran it through a backup that I created and it worked perfectly.
I made it this morning and wouldn't be surprised if it has some issues, but I converted 200 files in a couple of minutes.
If anyone is interested, send me a note and I'll send you the file. If enough people want it, I'll post it somewhere.
sleepy_m3 is offline   Taiwan
0
Reply With Quote
      01-01-2012, 11:55 AM   #19
Polets
Registered
 
Drives: BMW
Join Date: Jan 2012
Location: Portugal

Posts: 1
iTrader: (0)

Hi lucho1970, could you send me your BR-Converter, please.
Ricardo_175_Poeira@hotmail.com
Thanks a lot.
Polets is offline  
0
Reply With Quote
      01-05-2012, 04:02 PM   #20
Fanfan
Registered
 
Drives: 335i
Join Date: Jan 2012
Location: France

Posts: 1
iTrader: (0)

BR converter

lucho1970, send me please your version of BR converter. thanks (francois.bertauld@medianesysteme.com)
Fanfan is offline  
0
Reply With Quote
      01-10-2012, 08:40 PM   #21
kmarei
Major General
 
kmarei's Avatar
 
Drives: 1988 E30 M3 Evo II
Join Date: Jul 2008
Location: Reston, VA

Posts: 6,479
iTrader: (33)

Garage List
i'd be more interested in converting MP3s to BR4s
that way i can create the folders i like, with the songs i like
then when i am done, convert the whole folder to BR4 files and import that as a backup into idrive
as if this is a backup i had created earlier using idrive.
__________________
This user has been banned from the 4 series forum because he doesn't sing its merits like the admins want us all to

kmarei is offline   Egypt
0
Reply With Quote
      01-26-2012, 09:46 AM   #22
lucho1970
Enlisted Member
 
Drives: BMW 335i sedan
Join Date: Nov 2011
Location: Holland Landing

Posts: 34
iTrader: (0)

I have attempted to email the program that I have created to some people. Was having some trouble so I decided to share it here:
http://www.mdssconsulting.com/download/BR-converter.zip

I have password encrypted the zip file so that certain virus programs don't block it. But I'm not sure if that is really making a difference.
Password: www.e90post.com

Let me know if this works for you and any comments you might have. I can be used to convert files both ways from Backup format to MP3/WMA and also allows you to create a Backup that can be used to restore to BMW.

It was thrown together fairly quickly, so there are bound to be some bugs. Just let me know what they are and I'll update it.

Luis
lucho1970 is offline  
0
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:46 PM.




e90post
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
1Addicts.com, BIMMERPOST.com, E90Post.com, F30Post.com, M3Post.com, ZPost.com, 5Post.com, 6Post.com, 7Post.com, XBimmers.com logo and trademark are properties of BIMMERPOST