Automating QuickTime at the Command Line on Windows…

June 26th, 2006 by Luc-Eric - Viewed 22258 times - Popularity: 41% [?]




The QuickTime engineers have a problem. The API is huge and difficult to get into, various parts are obsolete and replaced by newer ones and therefore it is error-prone, and it needs to get away from the old MacOS API.

For OS X developers, Apple has made QtKit for Objective C developers so that normal people (as normal as a person who choses Object C can be, anyway) can easily add QuickTime support to their app.

At about the same time, for Windows QuickTime 7.0 Apple has done the equivalent and added a new COM/ActiveX Control. This is not to be confused with the control that’s used in the Web Browser, it’s something totally different that is meant to be used in Visual Basic, C#, and C++ and other COM-enabled languages.

This new access to QuickTime is mostly meant for application developers in these programming languages, however it is possible to access these COM objects from ActiveScripting, so this means VBScript, JScript which come with Windows, and others like Python and Perl.

One little known fact is that you can run VBScripts and JScripts at the command-line on any Windows 2000 and XP machine. The command-line intepreter is called “cscript.exe” and is located in your “Windows\System32″ directory. “wscript.exe” is a windowed equivalent which will pop message boxes instead of displaying messages at the command line. If for some reason you don’t have it installed, it’s a free download.

The scripting interface to QuickTime is still largely undocumented, however you can check out the methods and properties with an OLE object viewer. I’ve also found some good examples on the web site for the book QuickTime for .NET and COM Developers , in the (Chapter 8) samples.

Time for some code.

I’ve created a script below which will convert an image sequence to a QuickTime movie.

The only hard part was the issue with codec settings. As you may know from XSI and other products, codec settings are a binary blob of data, and are not suitable to be set with a script, or nice human-readable properties: you have to go through the codec-specific custom user interface. However the QuickTime control does allow to save codec settings into an XML file, to be re-applied later. Again, the data is still not human-editable in this form — the XML file contains Base64 data — you will need to use the codec dialog to change the settings. But at least you only need to pick it interactively once and can re-use the XML file for batch processing.

The first time you run my script, you’ll pick the codec with the dialog box, and these settings will then be saved into an XML file on the C:\ for the next time. Only known issue: the UI for the QuickTime player will apear during the export process, but that shouldn’t cause any problem, the script doesn’t return until the task is done.

QuickTime detects image sequences automatically when you give it an image file with a number in it. To run the script, type something like
cscript jsQTtest.js D:\clock001.pic C:\clock.mov

If you’re playing with the script and get an Unspecified Error on line 21, try manually launching the QuickTime Player manually before running the script.  commenter Nathang wrote:

I fixed the “C:\qttest\qttest.js(21, 1) (null): Unspecified error ” problem by….

//under here:
var qtPlayerApp = WScript.CreateObject(”QuickTimePlayerLib.QuickTimePlayerApp”);

//Add:
WScript.Sleep(7000)

This give quicktime the chance to launch properly

To get access to the “Import Image Sequence” in QuickTime 7.0, normally you need to upgrade to QuickTimePro, but I’ve tested my script after disabling my QuickTime Pro license and it seems to work anyway.

Here is the script… click on the image to download it.
credits : I’ve received some from the QuickTime API mailing list on apple.com to resolve a codec setting issue, and I’ve used the samples from the book above.

This script converts images sequences to movies. It will exit and do nothing if you try to convert a movie to another movie Try changing the call to CreateNewMovieFromImages to CreateNewMovie to do that!

// to run from the command line :
// cscript jsQTtest.js sourcepath, destpath

// Get script arguments
if (WScript.Arguments.Length >= 2)  {
    sourcePath = WScript.Arguments(0);
    destPath = WScript.Arguments(1);
}   else    {
    WScript.Echo("not enough parameters");
    WScript.Quit();
}

// Launch QuickTime Player Application
var qtPlayerApp = WScript.CreateObject("QuickTimePlayerLib.QuickTimePlayerApp");
if (qtPlayerApp == null)    {
    WScript.Echo("Unable to launch QuickTime Player!");
    WScript.Quit();
}

// Get the QuickTime controler
var qtPlayerSrc = qtPlayerApp.Players(1);
if (qtPlayerSrc == null)
    WScript.Quit();
var qtControl =  qtPlayerSrc.QTControl;

// Set up the exporter and have it configured
var qt = qtPlayerSrc.QTControl.QuickTime;

qt.Exporters.Add();
var qtExporter = qt.Exporters(1);

var CodecInfoFileName = "C:\QuickTimCodecInfo.xml";

var FileSystemObject =  WScript.CreateObject("Scripting.FileSystemObject");
var CodecFileInfo;

if ( FileSystemObject.FileExists(CodecInfoFileName) )
    CodecFileInfo =  FileSystemObject.OpenTextFile( CodecInfoFileName );

qtExporter.TypeName = "QuickTime Movie";
qtControl.CreateNewMovieFromImages( sourcePath,
                                    30,     // frame rate
                                    true ); // rate is in frames per seconds
var qtMovie = qtControl.Movie;
qtExporter.SetDataSource( qtMovie );

if ( CodecFileInfo )    {
    var xmlCodecInfoText = CodecFileInfo.ReadAll();
    // cause the exporter to be reconfigured
    // http://developer.apple.com/technotes/tn2006/tn2120.html
    var tempSettings = qtExporter.Settings;
    tempSettings.XML = xmlCodecInfoText;
    qtExporter.Settings = tempSettings;
} else  {
    qtExporter.ShowSettingsDialog();

    var xmlCodecInfoText = qtExporter.Settings.XML;
    CodecFileInfo = FileSystemObject.CreateTextFile( CodecInfoFileName );
    if ( CodecFileInfo )  {
        CodecFileInfo.WriteLine(xmlCodecInfoText);
        CodecFileInfo.Close();
    }
}
// do the actual export
qtExporter.DestinationFileName = destPath;
qtExporter.ShowProgressDialog = true;
qtExporter.BeginExport();
qtPlayerSrc.Close();

Popularity: 41% [?]

39 Responses to “Automating QuickTime at the Command Line on Windows…”

  1. lernie says:

    hi, what does it mean, after trying to execute the script, winxp commandline tells me:

    c:\jsQTTest.js(14, 1) WScript.CreateObject: Could not locate automation class named “QuickTimePlayerLib.QuickTimePlayerApp”. ?

    what does that point to?

    thanks. :)

  2. Luc-Eric says:

    is quicktime 7 installed?

  3. Rockdeman says:

    Hi, I just ”ported” your script to PHP5, and well it works nice. However… did you notice that the Flash 8 export is unavailable? this is really strange. I wanted to automate FLV8 encoding!

  4. I tried your script, and it created a QuickTimeCodeInfo.xml file.
    It does not, however, create a movie, and I do not get any error messages.
    Is there a way of finding out why it goes wrong?

  5. Luc-Eric says:

    does it work with the Quicktime Animation Codec? That’’s the simplest codec there is. I am not sure what can fail, my script doesn”t do error reporting. Perhaps a codec-specific setting is wrong? Some codecs, for example, only accept images that are of size NTSC or PAL.
    If you have quicktime pro try to do it manually in the user interface of the quicktime player to see if you get error messages.

  6. I tried and I managed to create a movie interactively. The attempt to do the same with yous script failed.
    The script just stops, and no movie is created.

  7. Luc-Eric says:

    what is the exact command line that you are typing when you are using the script, and which codec are you using

  8. Anton says:

    Is it possible to use the same script for converting mpeg 4 to 3gp?
    Or what needs to be changed to make it work?

  9. Oscord says:

    How can I setup 3gpp exporter instead of QT Movie??

  10. Luc-Eric says:

    Converting to another type than quicktime is left as an exercise to the reader. On line 40, above, it specifically sets the type of the export to ”Quicktime Movie”. One could theorize that if an other typename is used, another type of exporter object will be created.

  11. jo says:

    when I run it, it opens a quicktime movie with the correct size and appearently length, but the image is blank

  12. Nick says:

    When I run the script, it converts the quicktime startup screen into a 160KB mov.
    I tried 10 .pic files at pal and 1080.

  13. wsacul says:

    I couldn’t get this to export anything, so after

    qtControl.CreateNewMovieFromImages( sourcePath,
    30, // frame rate
    true ); // rate is in frames per seconds

    I added

    if (qtControl.Movie == null) {
    WScript.Echo(“Unable to create movie from images!”);
    }

    Movie does in fact come out to be null- but is that in fact a valid test at that point?

  14. wsacul says:

    I was also thinking that this could be scripted with something like:

    qtPlayerSrc.DoMenu(“File”, “Open Image Sequence…”);

    and then somehow fill in the file name in the dialog box and finally

    qtPlayerSrc.DoMenu(“File”, “Save”);

    and fill in a name.

    What’s the DoMenu equivalent of filling in dialog boxes?

    Thanks

  15. bijurama says:

    Hello Luc:

    Thanks luc, it works like a charm. I was wondering if its possible to create a video layer (to stamp/watermark with an image) to create the .mov file ..?

  16. Jan Petzold says:

    Hi guys,

    I’ve been spending some hours, just to find out that it’s pretty easy to load a videoclip:

    except: qtControl.CreateNewMovieFromImages( sourcePath, 25, true );
    write: qtControl.URL = sourcePath;

    worked fine using an uncompressed avi – no idea about other file types, though.

    Together with

    qtExporter.TypeName = “3G”;

    I’ve built a 3GP CLI encoder based on Quicktime – something I wanted for several years now. Thanks!

  17. HP says:

    Hey

    This is a very good example but does anyone know how to rotate the movie (or access the movie matrix for rotating) before exporting?

  18. Tim Brown says:

    Hi,

    Thanks for posting this handy code.

    I wanted to mention that I ran into into what seems to be a bug and the workaround I found, in case it is messing anyone else up.

    Here’s the problem: when I load a folder of images using the “CreateNewMovieFromImages” call, it only loads about 3 images out of a folder of 1500. If I delete some of the images or load a different folder, it does the same thing but with a different small number of images.’

    The images I am using have super long filenames and when I rename them to have short filenames there is no problem loading the folder.

    So perhaps it has something to do with the length of names permitted on macs that they haven’t fixed in the windows version. Anyway, if you only get short movies that might be the problem.

    Another useful thing to know — you can pass QT a list of a folder of shortcuts to your images rather than the actual files which is handy if you are building movies out of images in multiple locations.

    Thanks!

    Tim

  19. Richard Lane says:

    Hi

    I had a an issue I was trying to solve with poor quality audio from my digital camera and I thought this approach to extracting the audio from my .mov on the command-line looked promising but came up against:

    C:\qttest\qttest.js(21, 1) (null): Unspecified error

    Regards
    Richard.

  20. Sergey says:

    Hello,
    Thanks for the script,
    however when i try to run it i end up with the same error as above. The line where the error happens is: var qtPlayerSrc = qtPlayerApp.Players(1);
    Thanks in advance for your help.
    Regards
    Sergey

  21. Dan says:

    Great code snippet! I tried it out and it works great when converting a sequence of BMPs I have into an MOV.

    Question for you — Do you know if it is possible to add an audio track (i.e. a WAV or MP3) to the creation of the MOV (obviouly adding an extra bit of code to your .js)? If so, how would I do that within the QuickTime API? I’ve been searching thru the QT API at developer.apple.com, but haven’t come across anything yet. Any suggestions or directions you could point me to would be greatly appreciated!

    Thx for your help!
    -Dan

  22. Nik says:

    Thank You Thank You Thank You!

    I ‘ve been looking all over for such a script! — Would you be kind enough to let me know how I may change it a bit so to export a movie to a image sequence? And how does one add in one more little thing: frames-per-second in the sequence generation?

    By the way, I also ran into the
    “C:\qttest\qttest.js(21, 1) (null): Unspecified error ”
    problem. I am on Vista Ultimate, I already tried it with administrator privilege but with no success.

    Thank you again!

  23. Nathang says:

    I fixed the “C:\qttest\qttest.js(21, 1) (null): Unspecified error ” problem by….

    //under here:
    var qtPlayerApp = WScript.CreateObject(“QuickTimePlayerLib.QuickTimePlayerApp”);

    //Add:
    WScript.Sleep(7000)

    This give quicktime the chance to launch properly.

  24. nathang says:

    //I’ve changed this so that it can take a mov as an input and output a tga sequence if you want.

    // to run from the command line :
    // cscript //E:jscript jsQTtest.js sourcepath, destpath

    // Get script arguments
    if (WScript.Arguments.Length >= 2) {
    sourcePath = WScript.Arguments(0);
    destPath = WScript.Arguments(1);

    temp = sourcePath.split(‘.’);
    sourceExt = temp.pop();
    temp = destPath.split(‘.’);
    destExt = temp.pop();
    WScript.Echo(“Source File extension is :”+sourceExt);
    WScript.Echo(“Dest File extension is :”+destExt);

    } else {
    WScript.Echo(“not enough parameters”);
    WScript.Quit();
    }

    // Launch QuickTime Player Application
    var qtPlayerApp = WScript.CreateObject(“QuickTimePlayerLib.QuickTimePlayerApp”);

    WScript.Sleep(2000)

    if (qtPlayerApp == null) {
    WScript.Echo(“Unable to launch QuickTime Player!”);
    WScript.Quit();
    }

    // Get the QuickTime controler
    var qtPlayerSrc = qtPlayerApp.Players(1);

    if (qtPlayerSrc == null)
    WScript.Echo(“Null”);
    var qtControl = qtPlayerSrc.QTControl;

    // Set up the exporter and have it configured
    var qt = qtPlayerSrc.QTControl.QuickTime;

    qt.Exporters.Add();
    var qtExporter = qt.Exporters(1);

    if (destExt == “tga”){
    var CodecInfoFileName = “C:\\QuickTimeCodecInfoTGA.xml”;
    }else{
    var CodecInfoFileName = “C:\\QuickTimeCodecInfo.xml”;
    }
    var FileSystemObject = WScript.CreateObject(“Scripting.FileSystemObject”);
    var CodecFileInfo;

    if ( FileSystemObject.FileExists(CodecInfoFileName) )
    CodecFileInfo = FileSystemObject.OpenTextFile( CodecInfoFileName );

    if (destExt == “tga”){

    qtExporter.TypeName = “Image Sequence”

    }else{

    qtExporter.TypeName = “QuickTime Movie”
    }

    if (sourceExt == “tga”){

    qtControl.CreateNewMovieFromImages( sourcePath,
    25, // frame rate
    true ); // rate is in frames per seconds
    WScript.Echo(sourcePath)

    }else if(sourceExt == “mov”){

    qtPlayerSrc.OpenUrl(sourcePath)
    WScript.Echo(sourcePath)

    }

    var qtMovie = qtControl.Movie;
    qtExporter.SetDataSource( qtMovie );

    if ( CodecFileInfo ) {
    var xmlCodecInfoText = CodecFileInfo.ReadAll();
    // cause the exporter to be reconfigured
    // http://developer.apple.com/technotes/tn2006/tn2120.html
    var tempSettings = qtExporter.Settings;
    tempSettings.XML = xmlCodecInfoText;
    qtExporter.Settings = tempSettings;
    } else {
    qtExporter.ShowSettingsDialog();

    var xmlCodecInfoText = qtExporter.Settings.XML;
    CodecFileInfo = FileSystemObject.CreateTextFile( CodecInfoFileName );
    if ( CodecFileInfo ) {
    CodecFileInfo.WriteLine(xmlCodecInfoText);
    CodecFileInfo.Close();
    }
    }
    // do the actual export
    qtExporter.DestinationFileName = destPath;
    qtExporter.ShowProgressDialog = true;
    qtExporter.BeginExport();
    qtPlayerSrc.Close();

  25. tais says:

    hello,
    sorry i’m a great newbe.
    How to get quicktime codec in XMl form?
    or How to export them?
    thank you very much.

  26. fun4you2 says:

    Running the script on com seems okay but once dialog box of QT appears a video preprocessing window appears and i’ve waited… waited… waited… ei btw dude does it take a while to process a .avi file? is it supported? Thanks.

  27. fun4you2 says:

    Oh it’s working but no audio and video once played…

  28. cp says:

    Do you know if there is a way to suppress the UI when invoking Quicktime like this? I notice the script fails when I attempt to run it remotely via rcmd, presumably because there is no display available.

    –SNIP–

    H:\scripts>rcmd \\render1 cscript c:\temp\still2qt.js c:\temp\file_101.sgi c:\temp\test.mov
    Executing on \\render1 cscript c:\temp\still2qt.js c:\temp\file_101.sgi c:\temp\test.mov

    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

    Launched Quicktime
    c:\temp\still2qt.js(32, 1) Microsoft JScript runtime error: The remote server machine does not exist or is unavailable

    Remote server \\render1 disconnected

    H:\scripts>

    –SNIP–

    Line 32 in my copy of your script is:

    var qtPlayerSrc = qtPlayerApp.Players(1);

    Cheers for this post, regardless. Very nicely done.

  29. [...] the QuickTime conversion? I installed the QuickTime SDK, went looking for examples, and found just what the doctor ordered. Thanks, [...]

  30. Alexis D. says:

    Hello Guys,

    I’ve been working on this converter project for quite sometime now. Somehow I managed to have it running but I’m having trouble in setting the frame rate, dimension and etc. The xml doc shows no tag for it and the DTD of quicktime also seem to miss that definition. Please see http://www.apple.com/DTDs/PropertyList-1.0.dtd.

    Once media to convert is uploaded to server, a node of my converter program is being invoked and it performs the conversion job. In light with that, let us say you have uploaded three videos then three nodes are being run to convert the video. After conversion you may download the file from “view job status” section of my upload page.

    Help is very much appreciated. Thanks guys!

  31. derringer says:

    Also note that quicktime will not create an image sequence if one of the images is 0k. If you delete the 0k images, it will run fine.

  32. Luc-Eric says:

    Sorry Alexis D., the role of the XML file is explained in the article and you cannot use it to set codec attributes programmatically. These properties are part of the codec’s binary blob. As mentionned in the article, try Quicktime Mailing list to get help on programming topics.

  33. Alexis D. says:

    Hi! Would you be so kind to show me how to set the dimension, audio codec an video codec of the output file using the QTExporter?

  34. Jonas says:

    C:\Documents and Settings\jonasa>cscript jsQTtest.js “C:\Documents and Settings\
    user\Desktop\Char-ANTHRO_04_v010_TEMP4c9a104c\playblastCam
    00000.jpg”, “C:\Documents and Settings\user\Desktop\Char-ANTHRO_04_v010_TEMP4c9a104c_OUTPUT\Marston-ANTHRO_04_v010.mov”

    Output: photoJPG

    XML:

    Date
    Fri Oct 30 12:17:54 2009

    Format
    MooV
    Name
    QuickTime Movie
    SettingsData

    AAAAAAAAAAAAAAAAAAAKRXNlYW4AAAABAAAABQAAAAAAAAGvdmlkZQAAAAEAAAAQAAAA
    AAAAACJzcHRsAAAAAQAAAAAAAAAAanBlZwAAAAAAGAAAAv0AAAAgdHBybAAAAAEAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAACRkcmF0AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAABVtcHNvAAAAAQAAAAAAAAAAAAAAABhtZnJhAAAAAQAAAAAAAAAAAAAAAAAAABhw
    c2ZyAAAAAQAAAAAAAAAAAAAAAAAAABViZnJhAAAAAQAAAAAAAAAAAAAAABZtcGVzAAAA
    AQAAAAAAAAAAAAAAAAAoaGFyZAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAFmVuZHMAAAABAAAAAAAAAAAAAAAAABZjZmxnA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ABAAAAAAAAAAAAAQ==

    Type
    Movie

    Result: Script exits without doing anything

    Also:

    // Launch QuickTime Player Application
    var qtPlayerApp = WScript.CreateObject(“QuickTimePlayerLib.QuickTimePlayerApp”);
    WScript.Sleep(7000);
    if (qtPlayerApp == null) {
    WScript.Echo(“Unable to launch QuickTime Player!”);
    WScript.Quit();
    }

    I don’t know if that is the correct syntax cause i’m not a js scripter.

    Help?

  35. Chip Chapin says:

    Outstanding, thank you! I was searching for how to script QuickTime and came quickly to this post, only to find that you had already written precisely the script I needed to write: making a movie from an image sequence.

    I suppose we’re all doing timelapse?

  36. Chip Chapin says:

    I was having trouble getting the script to work in most situations until I realized that I was using relative paths for the files. If it’s not working for you, be sure to fully specify the input and output, like “d:\bletch\foo\xxx_0001.jpg”, rather than cd’ing into d:\bletch\foo and specifying the input as “xxx_0001.jpg”. This solved the most perplexing issues.

  37. Anmol Mishra says:

    Anyone volunteer to make a script that will take n .mov files and cat them to a single .mov file :-)
    There is mp4box that does this for mp4 files but nothing yet for files in a .mov container..

  38. Chip Chapin says:

    I’ve posted an adaptation of Luc-Eric’s script in my blog here http://cchapin.blogspot.com/2010/01/scripting-conversion-of-image-sequences.html

    The changes are not great but there is somewhat more error handling (still problematic) and it works when called repeatedly from another script. The posting also includes a lot of references.

    Thanks again for putting this up.

  39. Chip Chapin says:

    I have now rewritten the script in Python and combined it with some other automation.

    http://cchapin.blogspot.com/2010/02/seqtoqt-python-conversion-of-still.html

Leave a Reply