Saturday, August 30, 2014

#1 2012-05-05 10:57:27 pm

emikysa
Member
Registered: 2007-04-08
Posts: 36

Script to merge audio files?

Hello.  I need a script which, when run, processes all the m4a audio files (but not other files) in a folder called ".../Queue" as follows:

Combines the audio files into one file, inserting the contents of a file called ".../Spacer.m4a" after each clip being merged in.  E.g., when playing the combined file one would hear the contents of the first file in the Queue folder, then the contents of Spacer, then the contents of the second file, then the contents of Spacer, etc..

Saves the new file as "Combined-YYYY-MM-DD-HHMM##", with the YMHM part being the current date and time, and ## being the number of files being merged, into folder named ".../Processed".

Moves originals files into a folder named ".../Archive and appends "Processed-YYYY-MM-DD-HHMM-" to the name of each of the original files.

Displays a Growl message that signals that the process has completed and that indicates the number of files that were processed.

How difficult might this script be to create?  Can you please suggest the best forum for hiring someone to create this?  This forum?  Rent-A-Coder/V-worker?  Other suggestions?

Thank you!
Erik


Filed under: , Script, audio

Offline

 

#2 2012-05-07 08:46:46 am

SuperMacGuy
Member
From: Amish Country, Lancaster, PA
Registered: 2004-06-23
Posts: 416
Website

Re: Script to merge audio files?

Have you checked out the DougScripts site? Lots of iTunes scripts, mostly free, and a few paid apps available too. I know there is one that can merge clips, maybe not with spacers automatically.
http://dougscripts.com/itunes/


Scripts for InDesign: http://chris.paveglio.com
ASOC & Cocoa, specializing in InDesign, Photoshop, Ai, FileMaker

Offline

 

#3 2012-05-08 07:11:32 am

geddy76
Member
Registered: 2007-03-08
Posts: 65

Re: Script to merge audio files?

mp4Box, a command line application, will do the concatenation for you.  I've successfully written a script that will run the proper commands on the CLI.

In mp4Box, the code that worked for me was

mp4box -cat 'song1.m4a' -cat 'song2.m4a' -new 'combined_songs.m4a'

If you set your "silent" file to a variable, you could run a repeat look through the items in a list, using the above command in mp4Box.

In my quick test this worked for 2 m4a files and for 2 mp3 files, but it would not combine an mp3 with an m4a.  You could probably build in an if statement that converted an mp3 to m4a before concatenating.  Also, I'd imagine this would not work with protected media.

Sorry I can't be of more help right now, but I'm crashing on a deadline.



http://gpac.wp.mines-telecom.fr/mp4box/

Offline

 

Board footer

Powered by FluxBB

[ Generated in 0.029 seconds, 11 queries executed ]

RSS (new topics) RSS (active topics)