comparison itunes2mp3.py @ 2:1681a628ceb4

Pass desired bit rate in the right place otherwise newer FFmpeg's complain.
author Daniel O'Connor <darius@dons.net.au>
date Mon, 18 Aug 2014 13:38:06 +0930
parents 0ca90a90e723
children 30f4a5616692
comparison
equal deleted inserted replaced
1:0ca90a90e723 2:1681a628ceb4
33 33
34 devnull = file('/dev/null', 'w') 34 devnull = file('/dev/null', 'w')
35 if path.lower().endswith('.mp3'): 35 if path.lower().endswith('.mp3'):
36 shutil.copy(path, destmp3) 36 shutil.copy(path, destmp3)
37 elif path.lower().endswith('.m4a'): 37 elif path.lower().endswith('.m4a'):
38 ffmpeg = subprocess.Popen(['ffmpeg', '-y', '-v', 'quiet', '-b', '160', '-i', path, destmp3]) 38 ffmpeg = subprocess.Popen(['ffmpeg', '-y', '-v', 'quiet', '-i', path, '-b', '160', destmp3])
39 rtn = ffmpeg.wait() 39 rtn = ffmpeg.wait()
40 40
41 if rtn != 0: 41 if rtn != 0:
42 print "Failed to convert %s, return code %d" % (path, rtn) 42 print "Failed to convert %s, return code %d" % (path, rtn)
43 failures.append(path) 43 failures.append(path)