Welcome to our community

Be a part of something great, join today!

  • Hey all, just changed over the backend after 15 years I figured time to give it a bit of an update, its probably gonna be a bit weird for most of you and i am sure there is a few bugs to work out but it should kinda work the same as before... hopefully :)

Apple Automator : Merge Audio with Video

Aaron Hucker

Well-known member
Joined
Sep 1, 2008
Messages
124
Reaction score
0
Points
0
Here is my question if you don't mind taking the time to help me out.

Recently we finished shooting our feature on the RED and have arranged our workflow as follows. For editing right now we've processed to 720p and most clips have a scratch audio directly inputed into the camera. We recorded audio seperatly at most times using 4 tracks. What I am looking to do is automate an action that prompts you to pick a 4 channel audio (which is trimmed to frame match the picture files, and named identically aside from the extension obviously), then quicktime will open the file, select all, copy, then close. Then automator will take that file name minus the extension (ex. A013_C065_0910J5) and store that to a variable (i've gotten this far and am now stuck)

What I want to happen next is automator will find the filename that stored to the variable (A013_C065_0910J5) and add '.mov' to it and open that file in quicktime. From there I am pretty sure i know how i'll add those 4 audio tracks to the movie file thus creating a quicktime movie with 5 audio tracks all in sync.

Again, thank you in advance, if you can help great, if not, not to worry
 
If you figure this one out - that would be soooo useful.

Best of luck!
-Rowland
 
i'm very very close... but for some reason, reguardless of the settings i use for the loop function in automator, i only can get it to do 2 files before stopping for no known reason.

the way i have it working now is the program prompts you to select your audio folder (ex. SCENE_1_AUDIO) and your video folder ( ex. SCENE_1_VIDEO) then, as long as your audio files are named the exact same (aside from extension) the program will only open and affect the video files with corresponding audio files. So for example, if you have a few takes in a scene that you didn't record seperate audio for, thus creating more video files then audio, the program will exclude those files as they do not require audio merging.

anyone have a clue why i can only get automator to loop twice?
 
Anyone know off hand the applescript code to do the equivalent of Quicktime's 'Add to Movie' ? that is one of the very few things stopping me from getting this totally finished.

thanks in advance

ps. here is what i am talking about

tell application "QuickTime Player"
select all ---- (thats the audio file)
copy
close front window
rewind ----- (this is the video file)
add <------- I'm not sure how to get this to add to movie
delay 2
save
close front window
 
UPDATE:

so, it seems by adding 'document 1' to the end of each line that this now works. so I'm heading off to pickup the real files from our sound guy and try and merge them with our video files. I'll post when this i complete that.
 
WORKING VERSION UPDATE

Alright, so much to my own surprise, I've created an automator script to take EXTERNALLY recorded audio and merge it with our processed RED footage (applePRORES 422HQ)

Please read carefully as there are a few specifics that you MUST have in order for this to work properly.
I have poor coding skills so it's a bit sloppy, sorry.


First:

- Sync Up your external audio to your video (we used proTools HD)
- Trim your audio file so that it is frame accurate with the entire duration of the Video file
- save your new trimmed audio file with the exact same name as your video file it belongs to, obviously do not include the extension. (ex. A013_C065_0910J5.aif , to match your video file A013_C065_0910J5.mov)


Second:

Arrange your file structure so that the folder containing your audio for that scene is in the same root folder as the folder containing your video

example:

MAC HD ->
FILM ->
SCENE_1_AUDIO
SCENE_1_VIDEO
SCENE_2_AUDIO
SCENE_2_VIDEO

etc.
This is important so that when you are prompted to select your Audio and Video folders you can select both at the same time. YOU MUST SELECT BOTH.


Third :

Launch the automator script:

- You will be prompt with a screen to select your audio and video folders (read step two). Select both at the same time then click choose

- The script will then compare the two folders you selected and open ONLY the files which have a corresponding audio track (this is why you must name them the same)

- The files are then ordered alphabetically and my little quicktime script gets to work.

**warning** I have the repeat function set to 99 times, it should just crap out and end the program when all your files are complete, but I haven't tested this much, so use caution. For those that want to know, if you look in the 'Run AppleScript' window, change the 'repeat 99 times' to the appropriate number of AUDIO files you have and you shouldn't run into issues.

Also, be warned. This script will save additional audio to your .mov files. so duplicate if you feel necessary.

Please, for all that can, feel free to clean up this code and send it back to me.

Best of luck, I hope this works as well for everyone as it's working for me. If you have problems feel free to ask.

disclaimer, I am not responsible for what this could do or does to any of your files.
 
Did anyone else try this?

I know the steps are pretty specific and wont work for all projects.

But I'm interested to know if anyone else has given this a shot, or is at least using this as framework for a better working program?
 
Hi hucker, thanks so much for the script !

I used it to combine a loooot of mov and aif files, works like a charm :)

Greetings,

David
 
You're a clever man. Great job!!

Now ... you need to automate -

- Sync Up your external audio to your video (we used proTools HD)
- Trim your audio file so that it is frame accurate with the entire duration of the Video file
- save your new trimmed audio file with the exact same name as your video file it belongs to, obviously do not include the extension. (ex. A013_C065_0910J5.aif , to match your video file A013_C065_0910J5.mov)

it's along weekend ... how about it??
 
While we are on the subject - here's what I'd like ANYOBODY to make:

#1: APP batch creates "non-self contained" Quicktimes in a pre-determined folder structure:

typically - there's a folder of REDCODE media and a separate folder of AUDIO files (most ofter BWF) - path of least resistance (no pun intended) would be to make these folders SUBFOLDERS of a "batch".

So ... make a folder called the_movie_titled_day01 - this would be the "master" folder of a "batch".

subfolders would be redcode & audio - then -

APP would WRITE A NEW SUBFOLDER called merged_clips inside the root of the "batch" folder.

Now the APP batch creates non-self-contained Quicktimes inside the merged_clips folder.

#2: the APP then auto-syncs - by TC - ADDING the audio into the non-self-contained Quicktime TRIMMED to the length of the QUICKTIME VIDEO FILE.

If the APP locates MORE THAN ONE piece of AUDIO with the same TC as the video clip - it warns you - asks you to choose - allows you to review and re-make with another audio file.

#3: allow user the option to DELETE EXISTING AUDIO TRACKS on the quicktimes prior to sync - as many times it's just scratch audio - again, you would be only removing audio from the "non-self contained" quicktime clones

#4: now you can BATCH render the "merged quicktime reference movies" to whatever flavor and size of self-contained quicktime file you want - with all the audio tracks from your BWFs.

I'm happy to beta this if anyone wants to code it ... Anders ...? Ian ...? Deanan ...?:devil: :devil: :devil:
 
I dont have pro tools myself but i'll get to work on it asap. although it seems more complex then what i've made so far


You're a clever man. Great job!!

Now ... you need to automate -

- Sync Up your external audio to your video (we used proTools HD)
- Trim your audio file so that it is frame accurate with the entire duration of the Video file
- save your new trimmed audio file with the exact same name as your video file it belongs to, obviously do not include the extension. (ex. A013_C065_0910J5.aif , to match your video file A013_C065_0910J5.mov)

it's along weekend ... how about it??
 
Back
Top