Batch convert broken audio files

152 views
Skip to first unread message

Lucas Krech

unread,
Nov 16, 2012, 4:10:07 PM11/16/12
to QLab
Anyone have a quick/easy way to batch convert MP3s that won't play in Qlab into a workable format?

-L

Lucas Benjaminh Krech
Lighting and Video Artist

Twitter: lucaskrech
- - - - - - - - - - - - - - - - - - - - - - -
"What I give form to in daylight is only one percent of what I have seen in darkness."  
~M.C. Escher









Brendan Aanes

unread,
Nov 16, 2012, 4:15:26 PM11/16/12
to ql...@googlegroups.com
http://sbooth.org/Max/ is the freeware batch converter I use.

(not to be confused with Max/MSP)


--
Change your preferences or unsubscribe here:
http://groups.google.com/group/qlab
 
Follow Figure 53 on Twitter: http://twitter.com/Figure53

Paul Gotch

unread,
Nov 16, 2012, 4:17:40 PM11/16/12
to ql...@googlegroups.com, QLab
XLD.

-p

Lucas Krech

unread,
Nov 16, 2012, 4:21:42 PM11/16/12
to ql...@googlegroups.com
Thanks. A friend is in Paris with a computer full of unreadable MP3s, no audio technician, and a show that opens tomorrow.

-L

Lucas Benjaminh Krech
Lighting and Video Artist

Twitter: lucaskrech
- - - - - - - - - - - - - - - - - - - - - - -
"Processing seeks to ruin the careers of talented designers by tempting them away from their usual tools and into the world of programming and computing." ~Ben Fry

Angus Turner

unread,
Nov 16, 2012, 4:22:21 PM11/16/12
to ql...@googlegroups.com
+1 to XLD. 

Thanks
Angus Turner
angus...@gmail.com

Rich Walsh

unread,
Nov 16, 2012, 4:58:59 PM11/16/12
to ql...@googlegroups.com
On 16 Nov 2012, at 21:10, Lucas Krech wrote:

> Anyone have a quick/easy way to batch convert MP3s that won't play in Qlab into a workable format?

I wrote routines into QLab Script Companion to take all mp3 files in a QLab workspace, convert them to wav/aiff and replace them – or you can drop them on the app and do it before adding them to QLab. It uses a command line tool you already have.

Rich


Chris Bakos

unread,
Nov 16, 2012, 5:17:26 PM11/16/12
to ql...@googlegroups.com, des...@lucaskrech.com
Rich's Script is magic and you should consider using it but requires that Audacity be installed as well. XLD is fast and easy and will place the files right back in the same folder and is super duper fast. It's literally a drag and drop with almost no interface at all. 

Rich Walsh

unread,
Nov 16, 2012, 5:21:10 PM11/16/12
to ql...@googlegroups.com
On 16 Nov 2012, at 22:17, Chris Bakos wrote:

> Rich's Script … requires that Audacity be installed as well

No it doesn't. Nothing I've written _requires_ any other third-party software. The template uses Audacity as an example audio editor, but you can change that - or delete that Script Cue. QSC is self-contained, and supports drag & drop.

Rich

Chris Bakos

unread,
Nov 16, 2012, 6:02:15 PM11/16/12
to ql...@googlegroups.com
Oops, Sorry Rich. It has been a while since I looked at it. 

Lucas Krech

unread,
Nov 16, 2012, 8:27:54 PM11/16/12
to ql...@googlegroups.com
Thanks everyone!

I've passed the info on to my friend. One way or another the show will go on.

-L

Lucas Benjaminh Krech
Lighting and Video Artist

Twitter: lucaskrech
- - - - - - - - - - - - - - - - - - - - - - -
"Where the light is brightest, the shadows are deepest." 
~Johann Wolfgang von Goethe






On Nov 16, 2012, at 3:02 PM, Chris Bakos wrote:

Oops, Sorry Rich. It has been a while since I looked at it. 

Paul

unread,
Nov 16, 2012, 9:17:16 PM11/16/12
to ql...@googlegroups.com
Audiofile Engineerings Sample Manager would be a great candidate and less than twenty bucks for quite a few features including batch processing. I have often used Peak Pro for batch processing, and its coming soon to Sound Forge Pro Mac - but its not there yet. XLD looks useful too, but I think I'd like Sample Manager more. Is Barbabatch still a popular contender? Haven't heard about it for some time. Anyhow, I'd pick Sample Manager or XLD and be up and running in time.

Jeremy Lee

unread,
Nov 17, 2012, 7:56:46 AM11/17/12
to ql...@googlegroups.com
I use Peak, but that's not going to be an option anymore.  You could always just use iTunes.

--
Change your preferences or unsubscribe here:
http://groups.google.com/group/qlab
 
Follow Figure 53 on Twitter: http://twitter.com/Figure53

-- 
Jeremy Lee
    Sound Designer, NYC - USA 829


Jeremy Lee

unread,
Nov 17, 2012, 7:57:16 AM11/17/12
to ql...@googlegroups.com
That's unwise...

On Nov 16, 2012, at 4:21 PM, Lucas Krech wrote:

Thanks. A friend is in Paris with a computer full of unreadable MP3s, no audio technician, and a show that opens tomorrow.

Alex Kliner

unread,
Dec 6, 2016, 6:55:01 AM12/6/16
to QLab, des...@lucaskrech.com
Hello everyone! I know this is an old thread and relates to codes written for QLab 2, but I've been searching around for a way to batch replace all my .mp3 and  .m4a (and even my .cafs if possible) in a QLab 3.0.15 project to something uncompressed. 

My board op/sound engineer manually drops all compressed and uncompressed files into a 3rd party program to make them all uniformly 48000k .aif files. She then has to re-target them and refer to a separate copy of the workspace for start times. I want to spare her this time-consuming process.

If I'm barking up the wrong tree, I apologize and will start a new thread. Any help is deeply appreciated!

Rich Walsh

unread,
Dec 6, 2016, 7:01:52 AM12/6/16
to ql...@googlegroups.com
Been using this for years. It works on selected cue, but you could make it repeat on each cue in selected. You’ll need to adjust the user settings to suit.

set userFormat to item 1 of {"wav", "aif"} -- Change this to "item 2" to convert to aiff
set userBitDepth to 16
set userBitRate to 44100

-- Declarations

global dialogTitle
set dialogTitle to "Convert to " & userFormat

-- Prepare some variables

if userFormat is "wav" then
set acceptableTypes to {"com.microsoft.waveform-audio"}
set formatString to "WAVE -d LEI"
else if userFormat is "aif" then
set acceptableTypes to {"public.aifc-audio", "public.aiff-audio"}
set formatString to "AIFF -d BEI"
else
return -- Protection against erroneous user modification
end if

-- Convert the cue

tell front workspace
try -- This protects against no selection (can't get last item of (selected as list))
set selectedCue to last item of (selected as list)
if q type of selectedCue is "Audio" then
set currentFileTarget to file target of selectedCue as alias
tell application "System Events"
set currentType to type identifier of currentFileTarget
end tell
if currentType is not in acceptableTypes then
set currentStart to start time of selectedCue
set currentEnd to end time of selectedCue
tell application "System Events"
set theContainer to path of container of currentFileTarget
set theExtension to name extension of currentFileTarget
if theExtension is "" then
set theName to name of currentFileTarget
else
set theFullName to name of currentFileTarget
set theName to text 1 through (-1 - ((length of theExtension) + 1)) of theFullName
end if
set newFileTarget to theContainer & theName & "." & userFormat
set fileExists to exists file newFileTarget
end tell
if fileExists is true then
display dialog "The destination file for the conversion already exists. What now?" with title dialogTitle with icon 0 ¬
buttons {"Cancel", "Replace"} default button "Replace" cancel button "Cancel"
end if
display dialog "Preparing to convert…" with title dialogTitle with icon 1 ¬
buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel" giving up after 3 -- You have 3s to change your mind
do shell script "afconvert -f " & formatString & userBitDepth & "@" & userBitRate & " " & ¬
quoted form of POSIX path of currentFileTarget & " " & quoted form of POSIX path of newFileTarget
set file target of selectedCue to newFileTarget
set start time of selectedCue to currentStart
set end time of selectedCue to currentEnd
set q name of selectedCue to "" -- Remove this line if you don't want to reset the cue name too
display dialog "Done." with title dialogTitle with icon 1 buttons {"OK"} default button "OK" giving up after 5
end if
end if
end try
end tell

Rich

Alex Kliner

unread,
Dec 6, 2016, 7:34:07 AM12/6/16
to QLab, des...@lucaskrech.com
You're absolutely amazing. Thank you. I just found your QLab v3 Template and am playing with it. Thank you. Thank you. Thank you.

Is there a tweak to the script that lets me retain the text I gave the cue in its previous format? It seems to be renaming it with the new filename. Which is not a huge deal. 

Thank you.


On Friday, November 16, 2012 at 3:10:07 PM UTC-6, Lucas Krech wrote:

Alex Kliner

unread,
Dec 6, 2016, 7:47:54 AM12/6/16
to QLab, des...@lucaskrech.com
Figured out it's just as easy to use SHIFT-CNTRL-N afterwards to normalize the names.

Thanks!


On Friday, November 16, 2012 at 3:10:07 PM UTC-6, Lucas Krech wrote:

Christopher Ashworth

unread,
Dec 6, 2016, 7:58:30 AM12/6/16
to ql...@googlegroups.com
Hi Alex,

Side note: unless there's a specific reason not to do so, I'd recommend upgrading from 3.0.15 when convenient; there are several years of bug fixes available.

(mobile)

Craig K

unread,
Dec 7, 2016, 6:56:15 PM12/7/16
to QLab
I used to love peak, and was sorry to see it go, but now I use TwistedWave, and I can't imagine building a show with out it there. Great app for the toolbox.

Craig K.

Jeremy Lee

unread,
Dec 7, 2016, 8:05:52 PM12/7/16
to ql...@googlegroups.com
Ah, November 2012, I remember thee fondly. 

- Jeremy Lee's mobile device
--
--
Change your preferences or unsubscribe here:
http://groups.google.com/group/qlab
 
Follow Figure 53 on Twitter: http://twitter.com/Figure53
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/c8605883-58f1-43a6-a792-4284383bbcf6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages