E90Post
 


Coby Wheel
 
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
8
Rep
2
Posts

Drives: BMW 318
Join Date: Jul 2009
Location: Belgium

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.
Appreciate 0
      07-08-2009, 03:49 AM   #2
E90M3CDFR
First Lieutenant
United_States
86
Rep
303
Posts

Drives: E91 Sportwagon
Join Date: Sep 2008
Location: NoVA

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.
Appreciate 0
      07-09-2009, 07:02 AM   #3
Wongy
Registered
8
Rep
2
Posts

Drives: BMW 318
Join Date: Jul 2009
Location: Belgium

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.
Appreciate 0
      07-09-2009, 07:55 AM   #4
E90M3CDFR
First Lieutenant
United_States
86
Rep
303
Posts

Drives: E91 Sportwagon
Join Date: Sep 2008
Location: NoVA

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).
Appreciate 0
      10-27-2009, 08:36 AM   #5
e90_rsa
Registered
0
Rep
1
Posts

Drives: BMW X6
Join Date: Oct 2009
Location: Germany

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!
Appreciate 0
      11-28-2009, 12:07 AM   #6
Moonbat
Private
Moonbat's Avatar
128
Rep
61
Posts

Drives: N/A
Join Date: Oct 2009
Location: N/A

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)
Appreciate 0
      11-28-2009, 12:17 AM   #7
Moonbat
Private
Moonbat's Avatar
128
Rep
61
Posts

Drives: N/A
Join Date: Oct 2009
Location: N/A

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, 5245 views)
Appreciate 0
      11-28-2009, 09:06 PM   #8
klipseracer
Banned
United_States
219
Rep
3,012
Posts

Drives: 2007 E90 335i, 05 E46 330i
Join Date: Aug 2009
Location: Arizona

iTrader: (27)

Garage List
2007 335i  [0.00]
2005 330i  [0.00]
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.
Appreciate 0
      11-28-2009, 09:09 PM   #9
klipseracer
Banned
United_States
219
Rep
3,012
Posts

Drives: 2007 E90 335i, 05 E46 330i
Join Date: Aug 2009
Location: Arizona

iTrader: (27)

Garage List
2007 335i  [0.00]
2005 330i  [0.00]
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.
Appreciate 0
      09-01-2010, 05:47 AM   #10
ILoveBR
New Member
2
Rep
10
Posts

Drives: 335i Convertible
Join Date: Sep 2010
Location: South Africa

iTrader: (0)

Would anyone have a tool to convert the BMW data files back into music format (MP3, MP4 and wave)? Many thanks, Joseph
Appreciate 0
      09-06-2010, 07:03 AM   #11
skanman
Registered
0
Rep
4
Posts

Drives: 2010 Carbon Black 535 M-Sport
Join Date: Sep 2010
Location: Silicon Valley

iTrader: (0)

I wrote a binary for pulling the backup files off my 535. Email me at 180ring@gmail.com.
Appreciate 0
      09-10-2010, 10:46 PM   #12
ILoveBR
New Member
2
Rep
10
Posts

Drives: 335i Convertible
Join Date: Sep 2010
Location: South Africa

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!
Appreciate 0
      09-11-2010, 08:54 AM   #13
Misterted
Maniac with a BMW
Misterted's Avatar
United_States
13
Rep
185
Posts

Drives: 2020 330 X-Drive
Join Date: Jul 2008
Location: Jersey Shore

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?
__________________
2021 330i X-Drive MSport
2019 X3 3.0 Phytonic Blue Metallic/Black
2020 228xi GC Black
Appreciate 0
      09-11-2010, 09:38 AM   #14
ILoveBR
New Member
2
Rep
10
Posts

Drives: 335i Convertible
Join Date: Sep 2010
Location: South Africa

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...
Appreciate 0
      04-16-2011, 10:02 AM   #15
Viper060
Registered
0
Rep
2
Posts

Drives: BMW 7
Join Date: Apr 2011
Location: RUSSIA

iTrader: (0)

BR-Converter http://depositfiles.com/files/3ie6nvrsf
Appreciate 0
      12-20-2011, 10:10 AM   #16
lucho1970
Enlisted Member
8
Rep
42
Posts

Drives: BMW 435i
Join Date: Nov 2011
Location: Holland Landing

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.
Appreciate 0
      12-24-2011, 01:43 PM   #17
Insomnium
Registered
2
Rep
1
Posts

Drives: BMW 520D
Join Date: Dec 2011
Location: Russia

iTrader: (0)

lucho1970, send me please your version of BR converter. thanks (kojioe6@gmail.com)
Appreciate 0
      12-28-2011, 02:40 AM   #18
sleepy_m3
E87 M2 2016 LBB
sleepy_m3's Avatar
Taiwan
0
Rep
6
Posts

Drives: E92 M3 '11 FG, F87 M2 '16 LBB
Join Date: Dec 2011
Location: Taiwan

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.
Appreciate 0
      01-01-2012, 10:55 AM   #19
Polets
Registered
0
Rep
1
Posts

Drives: BMW
Join Date: Jan 2012
Location: Portugal

iTrader: (0)

Hi lucho1970, could you send me your BR-Converter, please.
Ricardo_175_Poeira@hotmail.com
Thanks a lot.
Appreciate 0
      01-05-2012, 03:02 PM   #20
Fanfan
Registered
0
Rep
1
Posts

Drives: 335i
Join Date: Jan 2012
Location: France

iTrader: (0)

BR converter

lucho1970, send me please your version of BR converter. thanks (francois.bertauld@medianesysteme.com)
Appreciate 0
      01-10-2012, 07:40 PM   #21
kmarei
Major General
kmarei's Avatar
Egypt
685
Rep
6,844
Posts

Drives: 2018 Audi RS5 coupe
Join Date: Jul 2008
Location: Reston, VA

iTrader: (34)

Garage List
2018 Audi RS5  [0.00]
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.
__________________
Appreciate 0
      01-26-2012, 08:46 AM   #22
lucho1970
Enlisted Member
8
Rep
42
Posts

Drives: BMW 435i
Join Date: Nov 2011
Location: Holland Landing

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
Appreciate 0
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



All times are GMT -5. The time now is 01:32 AM.




e90post
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
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