TweetFollow Us on Twitter

Unlocking Podcast Producer v2: Under the Hood

Volume Number: 26
Issue Number: 01
Column Tag: Podcasting

Unlocking Podcast Producer v2: Under the Hood

Customizing and extending workflows

by Michele (Mike) Hjörleifsson

Introduction

In the last article in this series, we took a the structure of a workflow in Podcast Composer, the new GUI tool in Snow Leopard creating workflows for Podcast Producer. Podcast Composer's export, publish and notification options will suite most administrators requirements, but its worth a review of what these are and what does an administrator do if they need to extend a workflow with other tools.

The default export options provide formats for iPod/iPhone, Apple TV, Computer, Audio Only, Mobile streaming and output to Compressor. The first five are accomplished using QuickTime X to transcode the video/audio into the appropriate format then hand them to the publishing stage. The Compressor option assumes that Compressor from Final Cut Studio is installed on the servers that will be doing the output and extends the number of types of transcoding an administrator can accomplish by leveraging the huge library of default Compressor output options as well as any plug-ins purchased from companies like TeleStream for output to Microsoft or Adobe Flash formats. Additionally utilizing Compressor allows administrators to leverage QMaster clustering technology to divide the transcoding operations to multiple computers running as QMaster agents. QMaster is included with Final Cut Studio (FCS) and does not require an additional license to be installed on any number of computers that form the cluster. With a single license of FCS and administrator can enable a large cluster of servers to handle these transcoding options.

Once the export stage is performed the output is handed to the publishing stage of the workflow where the podcast producer library receives the file by default (and is required for this stage), and the administrator has the additional options of sending notifications and/or export content to the Apple Wiki, File Transfer, Final Cut Server watch folder, a folder on the file system or even another workflow. Let's examine some of the options here.

The first option, Apple Wiki allows posting of content to the users default group wiki (default group is determined by Workgroup Manager or Active Directory), you must specify which user credentials are used to post the content. Which content type(s) to post (from the export types specified in the previous stage), or you can specify a custom blog or wiki to post to. For instance, if you have a blog called Daily Podcasts that has today's daily briefings you can post the podcasts directly to that blog versus the users blog or some other group wiki.

File transfer allows the administrator to pick the method that the exported item is being transmitted via: ftp, ftps, sftp, webdav or webdavs. This transfer can take place to another server on your network or across the world. As expected you would need to provide credentials appropriate to the service you select.

The next option allows you to export to a watch folder for Final Cut Server (FCS), where FCS will take the exported file and perform it's own workflow on that content, such as notifying editors, making a proxy copy of the content for laptop editing or any of a myriad of options supplied by FCS.

An administrator can also use the Folder publish option which simply drops the specified output(s) to a folder on a local or remote (must be previously mounted and accessible by all servers in the Podcast Producer cluster) file system for review or further processing. If you're experienced with Apple Script or Automator, you can attach additional actions to that folder that execute once content is placed there by Podcast Producer.

The last option allows you to create cascading workflows by submitting the output of one workflow to another workflow. Why would an administrator want to send content from one workflow to another? Well lets say you want all of your content archived onto a SAN in your data center, you can create a workflow that simply drops the files onto your SAN and then have all your other workflows call that as part of their workflow option. This would be more prevalent when administrators allow content publishers to create their own workflows but wants to standardize some of the output or notification options.

The next stage of the workflow, Notification allows the administrator to notify users and groups that the content is ready by email, iChat, iTunes Directory posting, iTunesU posting, or posting to a Web Service. Let's look at the options here:

Email Notification allows the workflow creator to specify whether to send the email notification to the Podcast Producer Administrator, the submitting user, both and or others. You will need to provide an email address and email server information so the service can facilitate delivery of the email. If you would like to change the format or design of the emails, you can. Please refer to the Podcast Administrator document located here:

http://images.apple.com/server/macosx/docs/Podcast_Producer_Admin_v10.6.pdf

iChat Notification allows the workflow creator to select the Podcast Producer Administrator, the submitting user, both and or others be notified by iChat. An iChat server id, password and the iChat message to send need to be specified.

iTunes Podcast Directory, this feature will post your podcast content to iTunes. For this notification to work, you must setup your feeds and be registered with iTunes. When this notification is sent to iTunes, the iTunes podcast repository syncs with your Podcast Library as soon as possible to reflect all changes.

The iTunesU feature is strictly for educational institutions that are setup with an iTunesU site(s). Simply specify the iTunes U site that you would like the workflow to update and that is all there is to it.

The Service setting allows the workflow creator to specify an external web service that is designed to accept publication notifications.

Podcast Composer provides a fairly comprehensive set of options for administrators to choose from, but what if your organization needs to take it a step further? For instance, what if your podcasts are actually testimonial depositions for a legal case and you need to digitally sign them to ensure their authenticity for potential court proceedings at a later time? What if you have to create some other format that isn't included as a QuickTime or Compressor option? Podcast workflows are simply an OS X bundle, similar to an application or other type of OS X bundle. So you can open the workflow's contents and examine and modify it, but before you go hacking away let's take a look at the bundle itself and the ramifications of editing one.

Create a new workflow with a few options in Podcast Composer and save it to your desktop. You must specify at least a few options for Podcast Composer to create the directories and files we are going to look at. Once created, Ctrl Click or right click and select Show Package contents to view the contents of the bundle. You will find a single folder labeled Contents. Open this folder and you will see 2 more items, Info.plist and a Resources folder. The Info.plist file contains an identifier for the bundle, its name, language, and other house keeping information including some unique identifier strings. While you could create a workflow totally from scratch the values in this file are somewhat of a pain to collect and may change with any OS X update, so it is preferable to create the majority of your workflow in Podcast Composer then edit a couple of files and locations. Opening the Resource folder exposes the items we are truly looking for.


As you can see in the screenshot there are several plist files and directories in the Resource folder. Primarily you will only modify a few items here. Namely, the template.plist and the Tools, Presets, Images, or Movies directories. The template.plist specifies the workflow tasks, dependencies and order of actions. This is where you would add any additional steps you require to perform during your podcast workflow, we will explore this in more detail in just a moment. The Images and Movies directories are where you would add any custom movie or image files your scripts or additional workflow tasks may need. You do not need to put leading or trailing videos in these directories, it's easier to specify those in Podcast Composer. Though you could easily change all your leading/trailing videos for all your workflows by writing a script to replace the old intro movie with a new intro movie in the Movie directory of all your workflows, of course you would need to ensure the permissions stay consistent. The Presets directory stores preset encoding to use for each of your selected export options, the defaults usually do the trick. The Compositions directory stores Quartz Composer compositions that are used in the workflow, typically the title introduction and movements of dual source videos. The Templates directory is used to hold any modified templates for your email, iChat or other notifications; by default this directory is empty and the standard system-wide templates will be used. Delving into the plist files in alphabetical order:

accounts.plist - doesn't seem to be used at this time but is designed to store credential information used by Podcast Composer.

configuration.plist - Stores the configurations of the Import, Edit, Export, Notify, and Publish stages of Podcast Composer.

sources.plist - Specifies the type of content processed by the workflow.

template.plist - Specifies the tasks to execute and the order of execution.

Extending your workflow to execute a predetermined script or other action is simply a matter of putting that script in the Tools directory and modifying the template.plist file to add the step for that script into the workflow. Opening the templates.plist file with Plist Editor (included as part of Xcode) reveals the contents and structure of the file as seen below.


Moving from top to bottom, there is the root of the plist file, then a dictionary named Item 0. Clicking the disclosure triangle to expose the contents of Item 0 exposes the heart of the plist file. The plist file is divided into four sections. artConditions, artSpecifications, taskSpecifications, and userRequirements. There are two additional items in the base of Item 0, name for the Xgrid job and notification email of an administrator.

The "art" prefixed files are used by Xgrid and should not be modified when creating a customized workflow. The userRequirements specify the required input from the user submitting the workflow and provide the default Title and Description though additional information could be required and added to this section.

The main section we are concerned with is the taskSpecifications, this is where the item-by-item execution of the workflow is read, prerequisites determined and then executed. The order of the items listed here serves as a graphical indicator of the order of execution though the prerequisites of each of the task items must be met prior to their execution or they will fail. Each task represents a UNIX shell script command and consists of the following elements:

arguments - Lists the arguments required by the command.

command - Specifies the command to run (including the path).

dependsOnTasks - (Optional) Lists the tasks that must be completed before this command runs.

So it's that easy: we just specify the command line of our script, arguments and any dependency on prior steps right? Wrong. There is one UNIX command called pcastaction that has been built to handle the majority of heavy lifting for the standard processing, export, and notifications options. So how do you specify a shell script, python, ruby or other command line executable that you want to use to customize your workflow? Enter pcastaction shell there is an argument you can pass to pcastaction called shell that specifies that you want to execute a shell command after which you can specify the arguments to send to that command like the filename to process etc. There are two-dozen or so replacement keys that can be specified to pass information to your script.Table 1 is a comprehensive list.


How would this work if we wanted to add a processing step to our workflow that executed a shell script called changeme.py to make some changes to our content? First place the changeme.py in the Tools directory and check to ensure its permissions follow the permissions of the balance of the directory. Second open the template.plist with Plist Editor, click the disclosure triangle on Root, click the disclosure triangle on Item 0 and click the disclosure triangle on taskSpecifications. Click on the word taskSpecification and a branching icon will appear to the right, click that to create a new branch (also called child) as seen here.


Change the entry's name from "New Item" to something more appropriate to your script, lets call that "generate-videoxml" for right now, change the type to "Dictionary" and drag it down to the bottom of the taskSpecification list (be careful not to drag it into the userRequirements branch.) Create 3 branches/children to your new generate-videoxml task item. Name the first one dependsOnTasks, the second one arguments and the third one command and set their types to Array, Array and String respectively. The processing is case sensitive so be aware of your case. So now we have a task with dependencies, arguments and command properties, lets edit these and enter some details for our workflow step.

Click the dependsonTasks and create a child/branch called Item 0 (the default name) of type string and put preflight in the value. This will tell Podcast Producer that this step requires the execution of the preflight step first. You can modify this to whatever step your workflow may require for your script to have the proper content as its input. Next, click on command and enter /usr/bin/pcastaction as the command's value. Now onto the heart of the matter, the arguments. Click on arguments and create 4 items of type string they will name themselves automatically as Item 0 à Item 3 which is fine for our purposes.

In Item 0, enter the value shell to tell Podcast producer that we will be executing a shell script, then in Item 1 enter the value $$Workflow Resource Path$$/Tools/changeme.py to tell Podcast producer where our script is actually located. Now you can add as many arguments you need to pass to your script as you deem necessary. The standard notation for the arguments is to preface them with a double hyphen (i.e. —description=$$Description$$ ). Your script will need to be able to parse these arguments and process them accordingly. Once you have completed your editing you can save your plist file. Now you have a workflow that executes a few steps set in Podcast Composer then your custom step. Unfortunately you can no longer open this workflow with Podcast Composer so you will have to manually verify and submit your new workflow.

Verifying the workflow is a fairly simple process, and will check the validity of your template.plist and the existence of the script specified but NOT that it will actually execute properly so some post install debugging may be needed and the Podcast Producer Application Error Log and /Library/Logs/pcastserverd/Diagnostic Reports/ are good areas to look at to trace your workflow's execution and success or failure. To verify your workflow zip up the workflow bundle. copy it to your server, unzip then execute

sudo pcastconfig -validate_workflow_at_path <Path to your workflow>

This will validate the xml formatting of template.plist and location any specified scripts. Once validated you can install the workflow by executing the pcast command:

sudo pcast -install_workflow -path <path to your workflow>

You will see some progress indications that your workflow has been copied up to the Podcast Producer service and installed. You may have to restart Podcast Producer from server admin or the command line:

sudo serveradmin stop pcastserverd
sudo serveradmin start pcastserverd

This will cause the workflow list to repopulate and your workflow will be available from the Podcast Capture application and web interface.

Conclusion

From the default configuration options available with Podcast Composer and the ability to add your own scripts to extend these workflows to anything your heart desires Podcast Producer provides a powerful media production streamlining and distribution tool for a myriad of uses from simple podcasting of lectures to complex multi-dimensional output. If your organization utilizes custom teleconferencing gear like Tandberg or other manufacturers you can, with a little work integrate these into your Podcast Producer workflow by examining the man pages for the various services and determining the appropriate method for submitting your content file to your custom workflow, the opportunities are endless. Well that is all for Podcast Producer for now, Till next time... Happy tech'ng.


Michele (Mike) Hjörleifsson has been programming Apple computers since the Apple II+, and implementing network and remote access security technologies since the early '90s. He has worked with the nation's largest corporations and government institutions. Mike is currently a certified Apple trainer and independent consultant. Feel free to contact him at mhjorleifsson@me.com

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Fresh From the Land Down Under – The Tou...
After a two week hiatus, we are back with another episode of The TouchArcade Show. Eli is fresh off his trip to Australia, which according to him is very similar to America but more upside down. Also kangaroos all over. Other topics this week... | Read more »
TouchArcade Game of the Week: ‘Dungeon T...
I’m a little conflicted on this week’s pick. Pretty much everyone knows the legend of Dungeon Raid, the match-3 RPG hybrid that took the world by storm way back in 2011. Everyone at the time was obsessed with it, but for whatever reason the... | Read more »
SwitchArcade Round-Up: Reviews Featuring...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for July 19th, 2024. In today’s article, we finish up the week with the unusual appearance of a review. I’ve spent my time with Hot Lap Racing, and I’m ready to give my verdict. After... | Read more »
Draknek Interview: Alan Hazelden on Thin...
Ever since I played my first release from Draknek & Friends years ago, I knew I wanted to sit down with Alan Hazelden and chat about the team, puzzle games, and much more. | Read more »
The Latest ‘Marvel Snap’ OTA Update Buff...
I don’t know about all of you, my fellow Marvel Snap (Free) players, but these days when I see a balance update I find myself clenching my… teeth and bracing for the impact to my decks. They’ve been pretty spicy of late, after all. How will the... | Read more »
‘Honkai Star Rail’ Version 2.4 “Finest D...
HoYoverse just announced the Honkai Star Rail (Free) version 2.4 “Finest Duel Under the Pristine Blue" update alongside a surprising collaboration. Honkai Star Rail 2.4 follows the 2.3 “Farewell, Penacony" update. Read about that here. | Read more »
‘Vampire Survivors+’ on Apple Arcade Wil...
Earlier this month, Apple revealed that poncle’s excellent Vampire Survivors+ () would be heading to Apple Arcade as a new App Store Great. I reached out to poncle to check in on the DLC for Vampire Survivors+ because only the first two DLCs were... | Read more »
Homerun Clash 2: Legends Derby opens for...
Since launching in 2018, Homerun Clash has performed admirably for HAEGIN, racking up 12 million players all eager to prove they could be the next baseball champions. Well, the title will soon be up for grabs again, as Homerun Clash 2: Legends... | Read more »
‘Neverness to Everness’ Is a Free To Pla...
Perfect World Games and Hotta Studio (Tower of Fantasy) announced a new free to play open world RPG in the form of Neverness to Everness a few days ago (via Gematsu). Neverness to Everness has an urban setting, and the two reveal trailers for it... | Read more »
Meditative Puzzler ‘Ouros’ Coming to iOS...
Ouros is a mediative puzzle game from developer Michael Kamm that launched on PC just a couple of months back, and today it has been revealed that the title is now heading to iOS and Android devices next month. Which is good news I say because this... | Read more »

Price Scanner via MacPrices.net

Amazon is still selling 16-inch MacBook Pros...
Prime Day in July is over, but Amazon is still selling 16-inch Apple MacBook Pros for $500-$600 off MSRP. Shipping is free. These are the lowest prices available this weekend for new 16″ Apple... Read more
Walmart continues to sell clearance 13-inch M...
Walmart continues to offer clearance, but new, Apple 13″ M1 MacBook Airs (8GB RAM, 256GB SSD) online for $699, $300 off original MSRP, in Space Gray, Silver, and Gold colors. These are new MacBooks... Read more
Apple is offering steep discounts, up to $600...
Apple has standard-configuration 16″ M3 Max MacBook Pros available, Certified Refurbished, starting at $2969 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free,... Read more
Save up to $480 with these 14-inch M3 Pro/M3...
Apple has 14″ M3 Pro and M3 Max MacBook Pros in stock today and available, Certified Refurbished, starting at $1699 and ranging up to $480 off MSRP. Each model features a new outer case, shipping is... Read more
Amazon has clearance 9th-generation WiFi iPad...
Amazon has Apple’s 9th generation 10.2″ WiFi iPads on sale for $80-$100 off MSRP, starting only $249. Their prices are the lowest available for new iPads anywhere: – 10″ 64GB WiFi iPad (Space Gray or... Read more
Apple is offering a $50 discount on 2nd-gener...
Apple has Certified Refurbished White and Midnight HomePods available for $249, Certified Refurbished. That’s $50 off MSRP and the lowest price currently available for a full-size Apple HomePod today... Read more
The latest MacBook Pro sale at Amazon: 16-inc...
Amazon is offering instant discounts on 16″ M3 Pro and 16″ M3 Max MacBook Pros ranging up to $400 off MSRP as part of their early July 4th sale. Shipping is free. These are the lowest prices... Read more
14-inch M3 Pro MacBook Pros with 36GB of RAM...
B&H Photo has 14″ M3 Pro MacBook Pros with 36GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 Pro MacBook Pro (... Read more
14-inch M3 MacBook Pros with 16GB of RAM on s...
B&H Photo has 14″ M3 MacBook Pros with 16GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $150-$200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 MacBook Pro (... Read more
Amazon is offering $170-$200 discounts on new...
Amazon is offering a $170-$200 discount on every configuration and color of Apple’s M3-powered 15″ MacBook Airs. Prices start at $1129 for models with 8GB of RAM and 256GB of storage: – 15″ M3... Read more

Jobs Board

*Apple* Systems Engineer - Chenega Corporati...
…LLC,** a **Chenega Professional Services** ' company, is looking for a ** Apple Systems Engineer** to support the Information Technology Operations and Maintenance Read more
Solutions Engineer - *Apple* - SHI (United...
**Job Summary** An Apple Solution Engineer's primary role is tosupport SHI customers in their efforts to select, deploy, and manage Apple operating systems and Read more
*Apple* / Mac Administrator - JAMF Pro - Ame...
Amentum is seeking an ** Apple / Mac Administrator - JAMF Pro** to provide support with the Apple Ecosystem to include hardware and software to join our team and Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.