<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Automating QuickTime at the Command Line on Windows&#8230;</title>
	<atom:link href="http://www.xsi-blog.com/archives/103/feed" rel="self" type="application/rss+xml" />
	<link>http://www.xsi-blog.com/archives/103</link>
	<description>People and thoughts behind XSI in production...</description>
	<pubDate>Tue, 06 Jan 2009 06:50:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: cp</title>
		<link>http://www.xsi-blog.com/archives/103#comment-17358</link>
		<dc:creator>cp</dc:creator>
		<pubDate>Mon, 15 Dec 2008 21:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=103#comment-17358</guid>
		<description>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&#62;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&#62;

--SNIP--

Line 32 in my copy of your script is:

    var qtPlayerSrc = qtPlayerApp.Players(1);

Cheers for this post, regardless.  Very nicely done.</description>
		<content:encoded><![CDATA[<p>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.</p>
<p>&#8211;SNIP&#8211;</p>
<p>	H:\scripts&gt;rcmd \\render1 cscript c:\temp\still2qt.js c:\temp\file_101.sgi c:\temp\test.mov<br />
	Executing on \\render1 cscript c:\temp\still2qt.js c:\temp\file_101.sgi c:\temp\test.mov </p>
<p>	Microsoft (R) Windows Script Host Version 5.6<br />
	Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.</p>
<p>	Launched Quicktime<br />
	c:\temp\still2qt.js(32, 1) Microsoft JScript runtime error: The remote server machine does not exist or is unavailable</p>
<p>	Remote server \\render1 disconnected</p>
<p>	H:\scripts&gt;</p>
<p>&#8211;SNIP&#8211;</p>
<p>Line 32 in my copy of your script is:</p>
<p>    var qtPlayerSrc = qtPlayerApp.Players(1);</p>
<p>Cheers for this post, regardless.  Very nicely done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fun4you2</title>
		<link>http://www.xsi-blog.com/archives/103#comment-17357</link>
		<dc:creator>fun4you2</dc:creator>
		<pubDate>Thu, 04 Dec 2008 22:40:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=103#comment-17357</guid>
		<description>Oh it's working but no audio and video once played...</description>
		<content:encoded><![CDATA[<p>Oh it&#8217;s working but no audio and video once played&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fun4you2</title>
		<link>http://www.xsi-blog.com/archives/103#comment-17356</link>
		<dc:creator>fun4you2</dc:creator>
		<pubDate>Thu, 04 Dec 2008 21:42:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=103#comment-17356</guid>
		<description>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.</description>
		<content:encoded><![CDATA[<p>Running the script on com seems okay but once dialog box of QT appears a video preprocessing window appears and i&#8217;ve waited&#8230; waited&#8230; waited&#8230; ei btw dude does it take a while to process a .avi file? is it supported? Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tais</title>
		<link>http://www.xsi-blog.com/archives/103#comment-17348</link>
		<dc:creator>tais</dc:creator>
		<pubDate>Fri, 17 Oct 2008 22:47:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=103#comment-17348</guid>
		<description>hello,
sorry i'm a great newbe.
How to get quicktime codec in XMl form?
or How to export them?
thank you very much.</description>
		<content:encoded><![CDATA[<p>hello,<br />
sorry i&#8217;m a great newbe.<br />
How to get quicktime codec in XMl form?<br />
or How to export them?<br />
thank you very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nathang</title>
		<link>http://www.xsi-blog.com/archives/103#comment-17347</link>
		<dc:creator>nathang</dc:creator>
		<pubDate>Tue, 14 Oct 2008 14:03:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=103#comment-17347</guid>
		<description>//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 &#62;= 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();</description>
		<content:encoded><![CDATA[<p>//I&#8217;ve changed this so that it can take a mov as an input and output a tga sequence if you want.</p>
<p>// to run from the command line :<br />
// cscript //E:jscript jsQTtest.js sourcepath, destpath</p>
<p>// Get script arguments<br />
if (WScript.Arguments.Length &gt;= 2)  {<br />
    sourcePath = WScript.Arguments(0);<br />
    destPath = WScript.Arguments(1);</p>
<p>    temp = sourcePath.split(&#8217;.');<br />
    sourceExt = temp.pop();<br />
    temp = destPath.split(&#8217;.');<br />
    destExt = temp.pop();<br />
    WScript.Echo(&#8221;Source File extension is :&#8221;+sourceExt);<br />
    WScript.Echo(&#8221;Dest File extension is :&#8221;+destExt);</p>
<p>}   else    {<br />
    WScript.Echo(&#8221;not enough parameters&#8221;);<br />
    WScript.Quit();<br />
}</p>
<p>// Launch QuickTime Player Application<br />
var qtPlayerApp = WScript.CreateObject(&#8221;QuickTimePlayerLib.QuickTimePlayerApp&#8221;);</p>
<p>WScript.Sleep(2000)</p>
<p>if (qtPlayerApp == null)    {<br />
   WScript.Echo(&#8221;Unable to launch QuickTime Player!&#8221;);<br />
   WScript.Quit();<br />
}</p>
<p>// Get the QuickTime controler<br />
var qtPlayerSrc = qtPlayerApp.Players(1);</p>
<p>if (qtPlayerSrc == null)<br />
    WScript.Echo(&#8221;Null&#8221;);<br />
var qtControl =  qtPlayerSrc.QTControl;</p>
<p>// Set up the exporter and have it configured<br />
var qt = qtPlayerSrc.QTControl.QuickTime;</p>
<p>qt.Exporters.Add();<br />
var qtExporter = qt.Exporters(1);</p>
<p>if (destExt == &#8220;tga&#8221;){<br />
    var CodecInfoFileName = &#8220;C:\\QuickTimeCodecInfoTGA.xml&#8221;;<br />
}else{<br />
    var CodecInfoFileName = &#8220;C:\\QuickTimeCodecInfo.xml&#8221;;<br />
}<br />
var FileSystemObject =  WScript.CreateObject(&#8221;Scripting.FileSystemObject&#8221;);<br />
var CodecFileInfo;</p>
<p>if ( FileSystemObject.FileExists(CodecInfoFileName) )<br />
    CodecFileInfo =  FileSystemObject.OpenTextFile( CodecInfoFileName );</p>
<p>if (destExt == &#8220;tga&#8221;){</p>
<p>    qtExporter.TypeName = &#8220;Image Sequence&#8221;</p>
<p>}else{</p>
<p>    qtExporter.TypeName = &#8220;QuickTime Movie&#8221;<br />
}</p>
<p>if (sourceExt == &#8220;tga&#8221;){</p>
<p>    qtControl.CreateNewMovieFromImages( sourcePath,<br />
                                    25,     // frame rate<br />
                                    true ); // rate is in frames per seconds<br />
    WScript.Echo(sourcePath)</p>
<p>}else if(sourceExt == &#8220;mov&#8221;){</p>
<p>    qtPlayerSrc.OpenUrl(sourcePath)<br />
    WScript.Echo(sourcePath)</p>
<p>}</p>
<p>var qtMovie = qtControl.Movie;<br />
qtExporter.SetDataSource( qtMovie );</p>
<p>if ( CodecFileInfo )    {<br />
    var xmlCodecInfoText = CodecFileInfo.ReadAll();<br />
    // cause the exporter to be reconfigured<br />
    // <a href="http://developer.apple.com/technotes/tn2006/tn2120.html" onclick="javascript:pageTracker._trackPageview('/outbound/comment/developer.apple.com');" rel="nofollow">http://developer.apple.com/technotes/tn2006/tn2120.html</a><br />
    var tempSettings = qtExporter.Settings;<br />
    tempSettings.XML = xmlCodecInfoText;<br />
    qtExporter.Settings = tempSettings;<br />
} else  {<br />
    qtExporter.ShowSettingsDialog();</p>
<p>    var xmlCodecInfoText = qtExporter.Settings.XML;<br />
    CodecFileInfo = FileSystemObject.CreateTextFile( CodecInfoFileName );<br />
    if ( CodecFileInfo )  {<br />
        CodecFileInfo.WriteLine(xmlCodecInfoText);<br />
        CodecFileInfo.Close();<br />
    }<br />
}<br />
// do the actual export<br />
qtExporter.DestinationFileName = destPath;<br />
qtExporter.ShowProgressDialog = true;<br />
qtExporter.BeginExport();<br />
qtPlayerSrc.Close();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathang</title>
		<link>http://www.xsi-blog.com/archives/103#comment-17346</link>
		<dc:creator>Nathang</dc:creator>
		<pubDate>Tue, 14 Oct 2008 10:35:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=103#comment-17346</guid>
		<description>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.</description>
		<content:encoded><![CDATA[<p>I fixed the “C:\qttest\qttest.js(21, 1) (null): Unspecified error ” problem by&#8230;.</p>
<p>//under here:<br />
var qtPlayerApp = WScript.CreateObject(&#8221;QuickTimePlayerLib.QuickTimePlayerApp&#8221;);</p>
<p>//Add:<br />
WScript.Sleep(7000)</p>
<p>This give quicktime the chance to launch properly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nik</title>
		<link>http://www.xsi-blog.com/archives/103#comment-17333</link>
		<dc:creator>Nik</dc:creator>
		<pubDate>Mon, 22 Sep 2008 22:51:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=103#comment-17333</guid>
		<description>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!</description>
		<content:encoded><![CDATA[<p>Thank You Thank You Thank You!</p>
<p>I &#8216;ve been looking all over for such a script! &#8212; 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?</p>
<p>By the way, I also ran into the<br />
&#8220;C:\qttest\qttest.js(21, 1) (null): Unspecified error &#8221;<br />
problem. I am on Vista Ultimate, I already tried it with administrator privilege but with no success.</p>
<p>Thank you again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://www.xsi-blog.com/archives/103#comment-17301</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Mon, 30 Jun 2008 23:33:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=103#comment-17301</guid>
		<description>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</description>
		<content:encoded><![CDATA[<p>Great code snippet! I tried it out and it works great when converting a sequence of BMPs I have into an MOV.</p>
<p>Question for you &#8212; 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&#8217;ve been searching thru the QT API at developer.apple.com, but haven&#8217;t come across anything yet. Any suggestions or directions you could point me to would be greatly appreciated!</p>
<p>Thx for your help!<br />
-Dan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey</title>
		<link>http://www.xsi-blog.com/archives/103#comment-16092</link>
		<dc:creator>Sergey</dc:creator>
		<pubDate>Wed, 14 Nov 2007 14:39:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=103#comment-16092</guid>
		<description>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</description>
		<content:encoded><![CDATA[<p>Hello,<br />
Thanks for the script,<br />
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);<br />
Thanks in advance for your help.<br />
Regards<br />
Sergey</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Lane</title>
		<link>http://www.xsi-blog.com/archives/103#comment-15674</link>
		<dc:creator>Richard Lane</dc:creator>
		<pubDate>Mon, 20 Aug 2007 20:18:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=103#comment-15674</guid>
		<description>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.</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>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:</p>
<p>C:\qttest\qttest.js(21, 1) (null): Unspecified error </p>
<p>Regards<br />
Richard.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
