Using CLExporter2.10.2 with Camtasia 2 Mac?

  • 1
  • Question
  • Updated 4 years ago
I’d like to use the commandline tool CLExporter 2.10.2 to batch-export a number of my Camtasia projects. It seems that the tool has a fairly simple syntax: 
Allowed options:
  --help                          produce help message
  -o [ --outputFile ] arg         output file or directory
  -t [ --tempOutputFile ] arg     path for the temporary intermediate file
  -p [ --project ] arg            project xml
  -s [ --combinedSettings ] arg   Camtasia production settings plist
  -c [ --component ] arg          Register component
  -i [ --progressIdentifier ] arg Unique identifier for where the progress gets
                                  written out to
  --debugAttachSleepSeconds arg   the number of seconds to sleep to allow
                                  debugger to attach
  --technicalPreviewBuild arg     the version of the technical preview build
  --fragmentShaderFile arg
  --fragmentShaderEntry arg
  --fragmentShaderTexture arg
  --vertexShaderFile arg
  --vertexShaderEntry arg
  --vertexShaderModelviewproj arg
1. Do I need to specify the -t option?
2. I can easily specify the -o, -p (project.xml inside the .cmproj) options. But I have no idea whether I need to provide the -c and -i options, and, above all, what to do with -s. I tried pointing it to 
Resources/ExportSettings/MP4SinglePassh264mp4.plist but quit with the message
/Users/adam/bin/ line 2: 51395 Abort trap: 6           "/Applications/Camtasia" -p "$1/project.xml" -o "$2" -t "$2.tmp" -s "/Applications/Camtasia"
I have a number of .cmproj to export, and I really would like to do them in batch.
Photo of Adam Twardoch

Adam Twardoch

  • 15 Posts
  • 4 Reply Likes

Posted 4 years ago

  • 1
Photo of David Cheng

David Cheng, Developer on Camtasia:mac

  • 47 Posts
  • 4 Reply Likes
Major caveat: The command-line interface wasn't meant to be used by anything other than the Camtasia, so proceed at your own risk! That said, you should be able to get it work if you're willing to jump through some hoops.

To answer you questions directly:
1. The -t option is a really old option that you probably don't need, but I always include it. You can just set it to any non-existent path like "/tmp/mytempfile".
2. You don't need the -i option, but you do need the -s option and probably the -c option. You'll need the -c option if your project contains TRECs, anything with TSC2 or any noise-reduction audio effects. You need the -s option, as this specifies what export settings you want.

To get the combinedSettings plist file:
1. Run Camtasia
2. Open any project (preferably one that takes more than 5 seconds to export)
3. Start exporting with the settings you want to use for your batch export
4. Immediately after export starts, force quit Camtasia 2 using "Activity Monitor". This prevents Camtasia 2 from deleting the exporting temp files (including the combinedSettings plist file)
5. In Terminal, type open "$TMPDIR/Camtasia 2"
6. There are two files in here, very unhelpfully named something like "tempEOBnyv" and "tempBFdfEs". The one that looks like a plist (2nd line is "<!DOCTYPE plist PUBLIC...") is the combined settings file. The other one is just a copy of your project file.
7. Copy the combined settings plist somewhere safe (out of the temp directory)

Your -c options will look something like:
-c "/Applications/Camtasia\"
-c "/Applications/Camtasia\"
-c "/Applications/Camtasia\"

To summarize, your command line will look something like this:

CLExporter2.10.2 -t "/tmp/mytempfile" 
-p "/path/to/yourproject" 
-s "/path/to/combinedSettings.plist" 
-o "/output/path/to/output.mp4" 
-c "/Applications/Camtasia\" 
-c "/Applications/Camtasia\" 
-c "/Applications/Camtasia\"
Let me know how that works for you!

Photo of Adam Twardoch

Adam Twardoch

  • 15 Posts
  • 4 Reply Likes
Hell yeah! I've just started a batch job like this: 
#!/usr/bin/env sh
find "$1" -iname "*.cmproj" | while read p; do \
"/Applications/Camtasia" \
-p "$p/project.xml" \
-s ./myCamtasiaSettings.plist \
-o "$p.mp4" \
-c "/Applications/Camtasia" -c "/Applications/Camtasia" -c "/Applications/Camtasia"; \
echo "### FINISHED!"
And now I can go out have some drinks! :) 

This conversation is no longer open for comments or replies.