Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Concatenate Quicktime movies via AppleScript Apps
If you have QuikcTime Pro, you can use the following AppleScript to merge sequentially-named movies into one big one.
on open these_items
  tell application "Finder" to set sorted_items ¬
   to sort these_items by name
  repeat with i from 1 to the count of sorted_items
  set this_item to (item i of sorted_items)
    tell application "QuickTime Player"
      if i is equal to 1 then
        make new movie
      end if
      open this_item
      tell movie 1
        rewind
        select all
        copy
        select none
      end tell
      close movie 1 saving no
      tell movie 1
        add
        select none
      end tell
    end tell
  end repeat
end open
It's written to be an applet, so just save it as an application, then drop a bunch of QuickTime movies onto it. The script will then assemble the parts into one big movie. I use this for movies with part # in the name, for import into Front Row.

[robg adds: I haven't tested this one.]
    •    
  • Currently 2.25 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[27,313 views]  

Concatenate Quicktime movies via AppleScript | 10 comments | Create New Account
Click here to return to the 'Concatenate Quicktime movies via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Concatenate Quicktime movies via AppleScript
Authored by: BrentT on May 23, '07 07:59:19AM

I found the donationware AddMovie (http://www.limit-point.com/Utilities.html#AddMovie) allows concatenation of several formats into lots of different output formats including Quicktime.



[ Reply to This | # ]
AddMovie is not donationware
Authored by: lras on May 23, '07 10:54:25PM

AddMovie is not donationware since you are REQUIRED to pay. It's just commercial software that costs $10, and comes with a free 10-day trial.

But it seems to be a good piece of software.



[ Reply to This | # ]
AddMovie is not donationware
Authored by: BrentT on May 25, '07 04:42:27AM

The developer allows you decide what to pay which he refers to as a "donation". You are right in that payment is required for use. An extra bonus is that the password is usable on over a dozen of his other cool utilities.



[ Reply to This | # ]
Concatenate Quicktime movies via AppleScript
Authored by: DirtyF on May 23, '07 08:38:04AM

You can also use copy and paste to merge one or more movies in QT pro and save it as a new sequence.



[ Reply to This | # ]
Concatenate Quicktime movies via AppleScript
Authored by: chrononaut on May 23, '07 10:59:50AM

Works great!



[ Reply to This | # ]
Concatenate Quicktime movies via AppleScript
Authored by: Anonymous on May 23, '07 03:33:55PM
This looks like an evolution of a simpler script "Merge Movie 1 into Movie 2.scpt" from Apple's QuickTime script collection, where a bunch more goodies QuickTime can do only thru AppleScript are documented.

To do this without QTPro, or with formats that QuickTime Pro does not handle (MPEG2 for example are read-only by QTPro), use the unix cat command in Terminal (or with do shell script in AppleScript):
cat /Path/To/movie1.mpg /Path/To/movie2.mpg /Path/To/movie3.mpg > /Path/To/combined.mpg
(I've only used it for MPEG2, don't quote me on being able to cat valid files with other formats. There might be headers that get horked.)

[ Reply to This | # ]
Concatenate Quicktime movies via AppleScript
Authored by: tubbyman on May 23, '07 06:06:17PM
It is based on the Quicktime applescript "Merge Movie 1 onto Movie 2" or whatever it's called that comes with the Quicktime applescript set, just on a bigger scale. That script didn't work so hot for a 35 part movie that I wanted to assemble, so I wrote this script to would work for any number of movies, and handle the sorting on the fly. I've tried the "cat movie1.mov movie2.mov > movie3.mov" thing before, but the final movie is always hosed.

It works particulary well if you combine it with curl (or some webpage downloader) and fetch movies from the web, then drop the resulting movies onto it.

curl -O --url "http://somemoviesite.com/chapter[1-40].mov";

[ Reply to This | # ]
Concatenate Quicktime movies via AppleScript
Authored by: shell on May 23, '07 11:52:56PM

very, very nice!



[ Reply to This | # ]
Concatenate Quicktime movies via AppleScript
Authored by: derrickbass on May 24, '07 01:03:16AM
If you are comfortable on the command-line, you can try QTCoffee:
http://www.3am.pair.com/QTCoffee.html

(Disclosure: That's one of my company's products.)

[ Reply to This | # ]
Concatenate Quicktime movies via AppleScript
Authored by: Westacular on May 31, '07 06:35:09PM
I modified this script to

1) be used as a context menu item in Finder (create a new Automator workflow with the Run AppleScript, cut and paste this into the box, and then Save As Plugin for Finder)

2) mark each of the files as a distinct chapter, to make it easy to jump to the start of each file

The code:


on run {input, parameters}
	tell application "Finder" to set input ¬
		to sort input by name
	repeat with i from 1 to the count of input
		set this_item to (item i of input)
		tell application "QuickTime Player"
			if i is equal to 1 then
				make new movie
			end if
			open this_item
			tell movie 1
				rewind
				select all
				copy
				select none
			end tell
			close movie 1 saving no
			tell movie 1
				add
				select none
				if i is equal to 1 then
					set this_track to make new track at beginning with data "Chapter 1"
					set enabled of this_track to false
					set the name of this_track to "Chapter Track"
					set chapterlist of track 1 to track "Chapter Track"
					set the movie_length to the duration
					tell chapter 1
						set the time to 0
						set the duration to movie_length
					end tell
				else
					set the newmovielength to the duration
					set the duration of this_track to newmovielength
					set the chapter_list to the name of every chapter
					set the new_chapter_list to chapter_list & (i as string)
					set the contents of the current chapter track to the new_chapter_list
					set the time of chapter i to movie_length
					set the duration of chapter i to newmovielength - movie_length
					set the name of chapter i of this_track to "Chapter " & (i as string)
					set movie_length to the duration
				end if
			end tell
		end tell
	end repeat
	return input
end run


[ Reply to This | # ]