Typically, a Podcast Producer workflow will contain one or more tasks which encode content for distribution. For example, the following workflow task, encode_ipod, sets up the pcastaction command to use its ipod encoder to encode content suitable for an iPod:
<key>encode_ipod</key>
<dict>
<key>arguments</key>
<array>
<string>encode</string>
<string>--basedir=$$Base Directory$$</string>
<string>--input=$$Content File Basename$$-final.mov</string>
<string>--output=$$Content File Basename$$-ipod.m4v</string>
<string>--encoder=ipod</string>
</array>
<key>command</key>
<string>/usr/bin/pcastaction</string>
<key>dependsOnTasks</key>
<array>
<string>annotate</string>
</array>
</dict>
If the ipod encoder didn’t do what we needed, Podcast Producer is bundled with a number of other versatile encoders which we could have used in its place:
$3gpp2_ezmovie
$3gpp2_release_A
$3gpp2_release_A_hint
$3gpp2_release_A_hint_server
$3gpp_mobile_mp4
$3gpp_mobile_mp4_hint
$3gpp_mobile_mp4_hint_server
$3gpp_release_5
$3gpp_release_5_hint
$3gpp_release_5_hint_server
$amc_ezmovie appletv
$avi
$avi_1cd
$avi_2cd
$h264
$h264_hint
$h264_hint_server
$iphone
$iphone_cellular
$ipod
$mp4_audio_high
$mp4_audio_low
$mp4_high
$mp4_lan
$mp4_low
$mp4_low_stream
$mp4_medium
$mp4_medium_stream
As long as any of these encoders does what we need, we’ll be in great shape. But what if, for whatever reason, we need a bundled encoder to do something it doesn’t quite do? Or what if we would like to create our own encoder—an encoder that functions in a way substantially different than any of the bundled encoders? Well, the good news is that if we can configure QuickTime on all of our Xgrid agents to encode to our liking, then we can modify an existing Podcast Producer encoder—or even create our own—to do what we need. Let’s see how to do just that.
First, we’ll need to know where the bundled encoders live…they’re in the /System/Library/PodcastProducer/Encodings directory:
$ cd /System/Library/PodcastProducer/Encodings/
$ ls -la
total 432
drwxr-xr-x 32 root wheel 1088 Apr 18 16:50 .
drwxr-xr-x 6 root wheel 204 Jul 28 2008 ..
-rw-r--r-- 1 root wheel 2144 Mar 18 2008 encode_3gpp2_ezmovie.plist
-rw-r--r-- 1 root wheel 2120 Mar 18 2008 encode_3gpp2_release_A.plist
-rw-r--r-- 1 root wheel 7481 Mar 18 2008 encode_3gpp2_release_A_hint.plist
-rw-r--r-- 1 root wheel 7481 Mar 18 2008 encode_3gpp2_release_A_hint_server.plist
... etc ...
-rw-r--r-- 1 root wheel 4252 Mar 18 2008 encode_mp4_medium.plist
-rw-r--r-- 1 root wheel 4252 Mar 18 2008 encode_mp4_medium_stream.plist
If we’d like to add a new encoder, we’ll have to put it here.
It’s important to note that, normally, we would never, ever add to, or modify, something in the /System directory, or any of its subdirectories because Apple claims exclusive ownership of /System. But this is one of the very few extraordinary cases in which we will want to modify this special directory. We’ll have to exercise some caution though—“in principle” an Apple system update can modify, or delete, our work without any sort of warning. It is for this reason that it’s absolutely vital to backup any new encoding we create and to check the /System/Library/PodcastProducer/Encodings directory after every system update. For the curious, we cannot create an /Encodings directory inside /Library/PodcastProducer to hold our changes in the way that we can do with workflows—pcastaction will not look in that directory for encodings.
So now we have a place to put our new encodings—but we also have to make note of naming conventions used by encoding files. For example, notice the way in which the encoding argument that we used for our pcastaction workflow task:
<string>--encoder=ipod</string>
corresponded to this encoding file:
-rw-r--r-- 1 root wheel 2144 Mar 18 2008 encode_ipod.plist
So whatever we decide to call our new encoding, we’ll need to map it to a filename in the form encoding_custom-name.plist. For example, if we want to create a new encoding called my_encoder, we’ll need to wrap it in a file whose name is encode_my_encoder.plist.
So now the million-dollar question is: how do we actually create the encoding plist file? Well, it turns out there’s a nifty utility, created by King Huang of The University of Calgary, that can examine and modify the encoding plist files. This utility is called PCP Encodings Editor and you can get it here.
When we launch the PCP Encodings Editor application, a small window will appear. This window displays a single pop-up menu labelled Encode Component and an Options button. The pop-up menu displays every encoding QuickTime knows on the Mac from which we launched the application. Since we can count on nearly every Mac to have QuickTime, we can use our own desktop computer to create an encoding for Podcast Producer, save it, and transfer it to our Xgrid agents.

We begin by selecting the QuickTime encoder that does the kind of encoding in which we’re interested from the Encode Component pop-up menu. Once we have our target encoder selected, we click on the Options button to display the settings for that encoder. A QuickTime settings sheet for the selected encoder will drop down from the PCP Encodings Editor window. We can change the settings in whatever way is appropriate for our needs, given the capabilities of QuickTime on the Mac from which we launched the application.

One cautionary note…if we’ve installed encoding software on our desktop Mac that doesn’t exist on one or more of our Xgrid agents—for example, Tlelestream’s Windows Media encoders, we’ll need to be careful to either install the Telestream software on all our agents, or avoid the Telestream encoder on our desktop Mac altogether (in the menu shown below, the Telestream encoder is called Windows Media).
Once we’ve configured our encoder in the way that we want, we’ll click on the OK button in the encoder settings sheet. The PCP Encodings Editor will appear from beneath it. To save our changes, we’ll select Save As… from the File menu. Recall from our previous discussion that we’ll need to be careful in the way in which we name this new encoding file—we have to make sure it is preceded by encoding_ prefix (PCP Encodings Editor will add the plist extension automatically for us).

Now that we’ve got an encoding file, we’ll need to copy it into the /System/Library/PodcastProducer/Encodings directory of each of our Xgrid agents (we must not forget a single agent, or any workflows that depend on this new encoding may not work properly). As a reality check, we’ll make sure that permissions are set correctly for the new encoding on each Xgrid agent—we’ll need any user on each agent system to be able to read the encoding:
$ ls -la
total 432
drwxr-xr-x 32 root wheel 1088 Apr 19 14:00 .
drwxr-xr-x 4 root wheel 136 Apr 19 14:00 ..
-rw-r--r-- 1 root wheel 2144 Oct 6 2007 encode_3gpp2_ezmovie.plist
-rw-r--r-- 1 root wheel 2120 Oct 6 2007 encode_3gpp2_release_A.plist
-rw-r--r-- 1 root wheel 7481 Oct 6 2007 encode_3gpp2_release_A_hint.plist
-rw-r--r-- 1 root wheel 7481 Oct 6 2007 encode_3gpp2_release_A_hint_server.plist
... etc ...
-rw-r--r-- 1 root wheel 4252 Oct 6 2007 encode_mp4_medium.plist
-rw-r--r-- 1 root wheel 4252 Oct 6 2007 encode_mp4_medium_stream.plist
-rw-r--r-- 1 root wheel 2135 Apr 19 02:17 encode_my_encoder.plist
We can verify that we’ve properly installed our new encoder on each of our Xgrid agents by asking pcastaction to show us a list of the encoders it knows. To do that, we execute the pcastaction help encode command in a Terminal window.
$ pcastaction help encode
Podcast Producer action task, version 0.1
Copyright 2007 Apple Computer, Inc.
encode: transforms the input file to the output file with the specified encoder
usage: encode --basedir=BASEDIR --input=INPUT --output=OUTPUT --encoder=ENCODER
the available encoders are:
3gpp2_ezmovie
3gpp2_release_A
3gpp2_release_A_hint
3gpp2_release_A_hint_server
3gpp_mobile_mp4
3gpp_mobile_mp4_hint
... etc ...
mp4_medium
mp4_medium_stream
my_encoder
Now that we have created our encoder, and verified that it’s correctly installed on each of our Xgrid agents, we are finally free to use it in a workflow:
<h;key>h;encode_custom<h;/key>h;
<h;dict>h;
<h;key>h;arguments<h;/key>h;
<h;array>h;
<h;string>h;encode<h;/string>h;
<h;string>h;--basedir=$$Base Directory$$<h;/string>h;
<h;string>h;--input=$$Content File Basename$$-final.mov<h;/string>h;
<h;string>h;--output=$$Content File Basename$$-ipod.m4v<h;/string>h;
<h;string>h;--encoder=my_encoder<h;/string>h;
<h;/array>h;
<h;key>command<h;/key>h;
<h;string>/usr/bin/pcastaction<h;/string>h;
<h;key>dependsOnTasks<h;/key>h;
<h;array>h;
<h;string>annotate<h;/string>h;
<h;/array>h;
<h;/dict>h;