Chapter 7: Using AppleScript
RealProducer Plus is installed with an AppleScript version that allows you to create streaming media files (.rm files). You should be completely familiar with AppleScript and RealProducer Plus before you read this chapter.
Commands
The following tables describe the different commands necessary to create a recording session. See "Examples" below to see how to use them in an AppleScript file.
Session Parameters
Sets the input and output parameters for a recording session from an input file.
Parameter Descriptions
| Parameter |
Accepted Values |
Description |
| Input |
any valid file name |
file to be encoded; either Input or Input Folder parameter is required |
| Input Folder |
any valid folder |
folder containing files to be encoded |
| Output |
any valid file name |
name of the output .rm file; either Output or Output Folder parameter is required |
| Output Folder |
any valid folder |
folder for the output files |
Broadcast Server Parameters
Sets the parameters for the RealServer used for live broadcasts.
Parameter Descriptions
| Parameter |
Accepted Values |
Description |
| Address |
any valid server address |
the address of the server used for broadcast; either the host name or the IP address |
| Port |
any valid port nuber |
the number of the port used for broadcasts |
| File |
any valid file name |
name of the output .rm file |
| User |
any valid user name |
user name for connecting to the server |
| Password |
any valid password |
password used for authentication |
Live Session Parameters
Sets parameters for a live capture recording session.
Parameter Descriptions
| Parameter |
Values Accepted |
Description |
| Video Driver |
string |
name of the QuickTime video driver used |
| Video Source |
Composite sVideo RGB RGB Sync YUV YUV Sync TV SDI |
video format used to capture video |
| Video Standard |
NTSC PAL Secam |
video standard used to capture video |
| Video Width |
integer |
width of the video capture (default: 160) |
| Video Height |
integer |
height of the video capture (default: 120) |
| Audio Driver |
string |
name of the QuickTime audio driver used |
| Audio Source |
string |
the source of the audio capture |
| Output |
any valid file name |
name of the output .rm file |
| Broadcast |
True or False |
used when using the default settings |
| Duration |
HH:MM:SS.SS |
amount of time for the capture session |
| Video Capture |
True or False |
use when not defining other video settings to trigger video capture |
| Audio Capture |
True or False |
use when not defining other audio settings to trigger audio capture |
Encoding Parameters
Sets the encoding parameters for the recording session.
Parameter Descriptions
| Parameter |
Values Accepted |
Description |
| Target Audience |
Modem_28k Modem_56k ISDN Dual_ISDN Corporate_LAN DSL_Cable_Modem_256k DSL_Cable_Modem_384k DSL_Cable_Modem_512k |
target audiences used for encoding; you may use more than one if File Type is set to SureStream (default: last selected) |
| Audio Format |
Voice Only Voice with Background Music Music Stereo Music |
type of audio used (default: last selected) |
| Video Quality |
Normal Motion Smoothest Motion Sharpest Image Slide Show |
type of video used (default: last selected) |
| File Type |
Single Rate SureStream |
type of file to be encoded (default: last selected) |
| Backwards Compatibility |
true or false |
create a stream compatible with older versions of the RealPlayer (default: last selected) |
| Audio Encoding |
true or false |
whether or not the audio input will be encoded (default: true) |
| Video Encoding |
true or false |
whether or not the video input will be encoded (default: true) |
| Clip Title |
any string |
title of the clip (default: name of the encoded file) |
| Clip Author |
any string |
name of the clip's author |
| Clip Copyright |
any string |
copyright date and owner |
| Clip Keywords |
any string |
words that a search engine would use to find the clip |
| Clip Description |
any string |
brief summary of the clip |
| Emphasize Audio |
true or false |
whether or not you want audio to be emphasized during limited bandwidth conditions; cannot be used with Emphasize Video |
| Emphasize Video |
true or false |
whether or not you want video to be emphasized during limited bandwidth conditions; cannot be used with Emphasize Audio |
| Allow Recording |
true or false |
whether or not you want your audience to be able to record your clip with RealPlayer Plus |
| Allow Download |
true or false |
whether or not you want your audience to be able to save your clip onto their computers |
| Allow Indexing |
true or false |
whether or not search engines are allowed to list your clip |
| Rating |
G PG R NC |
the audience rating of the clip |
| Show Input Source |
true or false |
whether or not the input window is shown (default: true) |
| Show Encoded Output |
true or false |
whether or not the output window is shown (default: true) |
| Show Audio Meters |
true or false |
whether or not the audio meter is shown (default: true) |
Configure Video
Sets video settings for a target audience.
Parameter Descriptions
| Parameter |
Values Accepted |
Description |
| Target Audience |
Modem_28k Modem_56k ISDN Dual_ISDN Corporate_LAN DSL_Cable_Modem_256k DSL_Cable_Modem_384k DSL_Cable_Modem_512k |
choose one target audience to set |
| Video Codec |
G2 G2_SVT |
the video codec used to encode video |
| Max Frame Rate |
any real number (up to 30) |
the maximum frame rate of the output clip |
Configure Audio
Sets audio settings for a target audience
Parameter Descriptions
| Parameter |
Values Accepted |
Description |
| Target Audience |
Modem_28k Modem_56k Dual_ISDN Corporate_LAN DSL_Cable_Modem_256k DSL_Cable_Modem_384k DSL_Cable_Modem_512k |
choose one target audience to set |
| Audio Format |
Voice Only Voice with Background Music Music Stereo Music |
choose one audio format to set; if not specified, will use the Encoding Parameters setting |
| Audio Codec |
Voice6_5 Voice8_5 Voice5 Voice16 Voice32 Voice64 Music6 Music8 Music11 Music16 Music20 Music32 Music44 Music64 StereoMusic20 StereoMusic32 StereoMusic44 StereoMusic64 StereoMusic94 |
the actual audio codec used during encoding; use either this parameter or Audio Codec ID plus Audio Codec Flavor parameters |
| Audio Codec ID |
string |
name of the codec; with Audio Codec Flavor, an alternative to Audio Codec |
| Audio Codec Flavor |
integer |
bit rate of the codec; use with Audio Codec ID |
.
Configure Bit Rate
Sets bit rate settings for a target audience.
Parameter Descriptions
| Parameter |
Values Accepted |
Description |
| Target Audience |
Modem_28k Modem_56k ISDN Dual_ISDN Corporate_LAN DSL_Cable_Modem_256k DSL_Cable_Modem_384k DSL_Cable_Modem_512k |
choose one target audience to set |
| Bit Rate |
any real number |
the target bit rate of the output clip |
Video Codec Preferences
Allows you to set various preferences for the video codec.
Parameter Descriptions
| Parameter |
Values Accepted |
Description |
| Two Pass Encoding |
true or false |
analyze static files prior to encoding |
| Variable Bitrate |
true or false |
increase quality by varying the bit rate |
| Loss Protection |
true or false |
protect against packet loss |
| VBR Latency |
any integer |
the maximum startup latency (in seconds) |
| Keyframe Frequency |
any integer |
the maximum time between keyframes (in milliseconds) |
Video Filter Preferences
Allows you to use video filters during video encoding.
Parameter Descriptions
| Parameter |
Values Accepted |
Description |
| Noise Filtering |
Off High Low |
type of noise filtering allowed during recording |
| Resize Filter |
Fast High Quality |
the quality of filtering for resized video |
| Inverse Telecine |
true or false |
removes extra frames caused by the telecine (24 fps to 30 fps) conversion process |
| Deinterlace |
true or false |
cleans video artifacts |
Crop
Crops the output video to dimensions that you set.
Parameter Descriptions
| Parameter |
Values Accepted |
Description |
| Width |
any integer |
the width of the output video (in pixels) |
| Height |
any integer |
the height of the output video (in pixels) |
| Left |
any integer |
left offset of the output video (in pixels) |
| Top |
any integer |
top offset of the output video (in pixels) |
Resize
Changes the size of the output video.
Parameter Descriptions
| Parameter |
Values Accepted |
Description |
| Width |
any integer |
the width of the resized output video (in pixels) |
| Height |
any integer |
the height of the resized output video (in pixels) |
Start
Starts encoding. (No parameters needed.)
Examples
The following AppleScript example records foo.mov into a RealMedia file for 28 and 56 Kbps audiences, audio set to voice only, video set to normal, file type set to SureStream, and "The Title" as the title of the clip. The output file is called foo.rm and is cropped.
tell application "Real Producer Plus"
with timeout of 99999 seconds
activate
Session Parameters Input file "MyComputer:Movie Files:foo.mov" Output¬
file "MyComputer:Movie Files:foo.rm"
Encoding Parameters Target Audience {Modem_28K, Modem_56K} Audio¬
Format Voice Only Video Quality Normal Motion Clip Title "The Title"
Crop Left 39 Top 88 Width 112 Height 84
Start
end timeout
end tell
 |
Note |
|
You have to set a large timeout value, or the AppleScript
RealProducer Plus will quit before encoding is
finished.
|
The following example configures video, audio, and bit rate target audience settings for 28 and Dual ISDN modems, then it encodes all files within the Movie Files folder using these settings.
tell application "Real Producer Plus"
with timeout of 99999 seconds
activate
Configure Video Target Audience Modem_28K Max Frame Rate 15.0
Configure Audio Target Audience Modem_28K Audio Format Voice Only¬
Audio Codec Voice6_5
Configure BitRate Target Audience Modem_28K Bit Rate 20.0
Configure Video Target Audience Dual_ISDN Max Frame Rate 15.0
Configure Audio Target Audience Dual_ISDN Audio Format Voice Only¬
Audio Codec Voice8_5
Configure BitRate Target Audience Dual_ISDN Bit Rate 80.0
Session Parameters Input Folder "MyComputer:Movie Files" Output Folder¬
"MyComputer:Movie Files"
Encoding Parameters Target Audience {Modem_28K, Dual_ISDN} Video¬
Quality Normal Motion Clip Title "The Title"
Start
end timeout
end tell
The following example configures video, audio, and bit rate target audience settings for DSL/Cable modems and Corporate LANs, then it encodes a live video capture.
tell application "Real Producer Plus"
with timeout of 99999 seconds
activate
Configure Video Target Audience DSL_Cable_Modem Max Frame Rate 15.0¬
Video Codec G2
Configure Audio Target Audience DSL_Cable_Modem Audio Format Music¬
Audio Codec Music32
Configure BitRate Target Audience DSL_Cable_Modem Bit Rate 220.0
Configure Video Target Audience Corporate_LAN Max Frame Rate 15.0¬
Video Codec G2
Configure Audio Target Audience Corporate_LAN Audio Format Music¬
Audio Codec Music32HighResponse
Configure BitRate Target Audience Corporate_LAN Bit Rate 150.0
Live Session Parameters Video Driver "ATI Video Digitizer" Video Source¬
Composite Video Standard NTSC Video Width 160 Video Height 120 Audio¬
Driver "Built-in" Audio Source "Sound In" Output "MyComputer:Dekstop¬
Folder:test.rm:" Duration "00:01:00.000"
Encoding Parameters Target Audience {DSL_Cable_Modem,Corporate_LAN}¬
Audio Format Music Video Quality Normal Motion File Type SureStream¬
Clip Title "A Slug's Life" Clip Author "F. Ritz" Clip Copyright "©1999" Clip¬
Keywords "slugs childhood friendship" Clip Description "an amusing story¬
about a boy and his pet slug" Noise Filtering Off Rating General with¬
Emphasize Audio without Show Input Source, Show Encoded Output,¬
Backwards Compatibility, Allow Recording, Allow Download and Allow¬
Indexing
Start
end timeout
end tell
Copyright © 1998-2000
RealNetworks
For information on RealNetworks' technical support, click here.
Comments on this document? Click here.
This file last updated on 06/05/00 at 17:21:01.