Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Old Aug 24, 2010, 12:57 PM   #1
macrumors newbie
Join Date: Aug 2010
Merge QuickTime movies through code

Is there a way, either through coding or command line, to take two QuickTime movies and combine them into one.

I know that this can be done manually through QuickTime player, but we need to be able to do this using code or command line.

Thx for your help.
dduke is offline   0 Reply With Quote
Old Aug 24, 2010, 02:22 PM   #2
macrumors 603
Join Date: Aug 2009
I googled these search terms:
quicktime command line

The results look promising.

If those results are unsatisfactory, please provide a more detailed explanation.
chown33 is offline   0 Reply With Quote
Old Aug 24, 2010, 04:32 PM   #3
Thread Starter
macrumors newbie
Join Date: Aug 2010

Thx for your reply.

We have tried you query multiple times and have not found a solution.

To be more specific, we are trying to implement a system for reducing the time that it takes to make a large movie by making pieces of the final product on multiple machines. Lets say we have 100,000 frames that we want to turn into a movie. We send a job out to 10 machines to 10 different ranges:

1 - 10,000
10,001 - 20,000
20,001 - 30,000

Now that we have the ten slices, we need to merge them together into one QuickTime movie encoded with the animation codec.

This must be done from the command line, or through coding as the process has to be automatic.

Does anyone know of a solution, or could at least point us to a place that does. We have exhausted Google with every variation of 'quicktime command line'.
dduke is offline   0 Reply With Quote
Old Aug 24, 2010, 05:41 PM   #4
macrumors 68040
Join Date: Feb 2008
I would look into QTKit and Quicktime frameworks, loading the files, combining the buffers and saving to a new file can most certainly be done there I'd say.
subsonix is offline   0 Reply With Quote
Old Aug 24, 2010, 05:41 PM   #5
macrumors 603
Join Date: Aug 2009
Will any of these meet your requirements or not?

The first is more recently updated, but seems to require an activation code.

It looks like at least one of them may work, but since you haven't said anything about trying anything you might have found, you may have to try them first.

It's also possible that ImageMagick will work, but it seems more still-image oriented than movie-oriented, so that's just a wild guess.

If these don't meet your requirements, please provide more detail. Specifically:
  1. What price are you willing to pay, or must it be free?
  2. What is your command-line experience?
  3. What is your experience in making or modifying scripts (in any scripting language)? If it's non-zero, what language?
  4. What tools are you using to assemble the 10k frames into movies?
  5. Do the fragments to be assembled have audio or not?
  6. Summarize some of the tools you've evaluated and rejected (e.g. MovieStitch).

#3 doesn't need to be your personal experience, but someone else in your work group. I'm asking in order to have some idea of whether a close-but-not-exact script would be acceptable or not.

#4 is to know what your tools are, so we know what can be done with what you already have.

I found the above tools by visiting www.macupdate.com and searching it with terms like:
join movies
combine movies
movie command line
quicktime command
chown33 is offline   0 Reply With Quote
Old Aug 24, 2010, 11:41 PM   #6
macrumors 601
HiRez's Avatar
Join Date: Jan 2004
Location: Western US
You're basically describing a distributed render farm. What you probably want to do is have the client machines render self-contained single frames in an appropriate losslessly-compressed format such as .tif or .png, then send all the frames back to a central server which stitches the frames together and encodes it as a QuickTime movie. Theoretically you could have each client make its own QuickTime but it might be easier to use individual frames. This can certainly be done through code using the QuickTime API, however one of the functions of the AppleScriptable QuickTime Player app is to read in a series of numbered still frames, which can then be saved out as a QuickTime movie with any encoding that QuickTime supports. So you might be able to achieve it with little more than some AppleScripting. But the hard part will be coordinating between all the clients and the server, making sure all the frames get rendered and are valid, etc.
Go outside, the graphics are amazing!
HiRez is offline   0 Reply With Quote
Old Aug 25, 2010, 10:37 AM   #7
Thread Starter
macrumors newbie
Join Date: Aug 2010
Yes those links are great I will have to investigate them. We have only tried solutions for PC but we have access to a mac.

Things that we have tried are the obvious ffmpeg, mencoder, and other pretty hacky things that aren't worth mentioning.
  1. At this point, I'm sure my company could spend money if it needed to. I don't have a solid number but we do have resources.
  2. I would call myself a novice command-liner
  3. I am a very experienced programmer. Languages I can use include java, j-script, vb.net, c#, python, c++, actionscript, aescript, vbscript. I'm probably leaving some out but that's all off the top of my head.
  4. We are using ffmpeg and a tool that comes with Royal Render 6(our render farm manager)
  5. The assembled fragments do not have audio, but the final product could depending on what project we are working on
  6. Tools we have evaluated are ffmpeg, mencoder, avimerge (don't even know why we tried that one), and some other windows based stuff. Haven't explored mac options but it looks like we are gonna have to go that route.

Thx for your reply and hopefully continued help


We are using a distributed render farm to make frames almost exactly as you described. We need to create uncompressed movies which can get very large (100,000+ frames at 5mb each = A LARGE MOVIE ). We are trying to find a way to decrease the amount of time that it takes to create an uncompressed movie by having multiple chunks of frames encoded on the farm and stitched together at the end. We have already implemented the part where we encode all the pieces. Now we just need a solution for combining them into one uncompressed movie for delivery to clients.

Thanks to you also.
dduke is offline   0 Reply With Quote
Old Aug 25, 2010, 06:57 PM   #8
macrumors regular
Join Date: Jul 2010
I've used a Ruby Gem called rmov for exactly this purpose. It's basically a wrapper around the C QuickTime API, and it works quite well for combining movies, modifying, adding, or deleting tracks, and so on.


You didn't mention Ruby as one of the languages you are familiar with, but if you are an experienced programmer you should have no trouble figuring out what you need to do from the examples provided. Or even better, you can use the opportunity to learn Ruby, which is in my opinion the single handiest programming language available on the Mac.
ytk is offline   0 Reply With Quote
Old Aug 26, 2010, 09:44 AM   #9
Thread Starter
macrumors newbie
Join Date: Aug 2010
@Peter Maurer
That looks like it will work perfectly, thx!

No I don't know ruby at all, but like you said I'm sure it wouldn't take long to pick up. I'll look at the samples you provided and see if there is a way to implement them in our production pipeline.
dduke is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
.AVI movies wont play on Quicktime fitworldmac Digital Video 4 Dec 18, 2013 07:45 AM
Quicktime Export Code woodaman09 Mac Programming 0 Sep 17, 2013 12:32 PM
Combining 2 Movies in Quicktime - audio issues Aragornii Mac Applications and Mac App Store 0 May 2, 2013 07:02 PM
QuickTime Code mortfe Mac OS X 10.7 Lion 13 Jan 20, 2013 01:31 AM
Partition Merge Problem (Can't Merge Empty Space) Zanon OS X 10.8 Mountain Lion 1 Sep 24, 2012 09:59 PM

Forum Jump

All times are GMT -5. The time now is 11:57 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC