This chapter shows you how to run Helix Producer from the command line. The Helix Producer command line application gives you the ability to encode streaming media, both as files and as a live broadcast. You will also learn about other installed utilities that allow you to use the command line to create and modify streaming media files.
The following command line programs are available to you:
The producer.exe application is fully functional, giving you the same encoding capabilities as the Helix Producer main interface. This application is also designed for users who want to encode a batch of files using wildcards.
There are two ways to use this application. The first way to use producer is to run the program, typing in options and their values for the different aspects of the encoding process. The second way is to create a job file and run the program with that job file. A job file is a saved text file that shows Helix Producer how to run an encoding session.
The rest of this section shows you the full syntax of the producer.exe application, then breaks down all of the options into different sections, giving a description of each option. Finally, some examples of common uses are provided.
This section shows you the basic syntax to encode streaming media with the producer command-line application. It also gives you a brief description of the options you can use with the application. Use the references to find more detailed information about these options, located later in this chapter.
The basic syntax of the producer.exe command-line application is as follows:
|
Where [input] is one of the following:
| Option | Value | Function | Reference |
|---|---|---|---|
-ac |
audioDeviceID |
Specifies the audio capture input device ID. | click here |
-ap |
audioPort |
Indicates the port of the audio capture input. | click here |
-i |
filename.ext |
Sets the input file name. | click here |
-vc |
videoDeviceID |
Specifies the video capture input device ID. | click here |
-vp |
videoPort |
Indicates the port of the video capture input. | click here |
| -vf | videoFormat | (Linux Only.) Specifies the video format of the video capture device. | click here |
And where [output] is one or more of the following:.
| Option | Value | Function | Reference | |
|---|---|---|---|---|
-o |
filename.rm |
Sets the output file name. | click here | |
-sg |
Username:Password@Server:Port/ |
Sets server definition using account-based encoder protocol. | click here | |
-si |
Password@Server:Port/ |
Gives settings required for a server-initiated broadcast output stream using the Pull Broadcast method. | click here | |
-sp |
Password@Server:PortRange/ |
Gives settings required for live server output using the Push Broadcast method. | click here | |
-sd |
|
Uses a pre-existing Server Destination as the output. | click here |
And where [general_options] are any of the following:
| Option | Value | Default | Function | Reference |
|---|---|---|---|---|
-a |
text |
(none) | Encodes an author name. | click here |
-ad |
audience_names |
16k, 28k, 56k, and 256k | Specifies audience encoding speeds. | click here |
-ag |
-12 to 12 |
0 |
Uses the audio gain filter. | click here |
-am |
voice|music |
voice |
Sets the audio type. | click here |
| -arq | fast|high |
high | Sets the type of audio resampling used. | click here |
-bl |
(none) | true | Applies the black level filter. | click here |
-c |
text |
(none) | Sets the encoded copyright. | click here |
-cj |
filename.rpjf |
(none) | Creates a job file. | click here |
-cr |
left,top,width,height |
(none) | Sets cropping parameters in pixels. | click here |
-d |
dd:hh:mm:ss.xyz |
infinite |
Sets total time for encoding. | click here |
-de |
text |
(none) | Sets clip description. | click here |
-di |
auto|d|i|both |
(none) | Applies deinterlace or telecine filters. | click here |
-dlf |
(none) | (none) | Disables logging to file. | click here |
-dls |
(none) | (none) | Disables logging to screen. | click here |
-k |
text |
(none) | Adds keywords. | click here |
-lc |
error|warning|info|diagnostic |
(none) | Specifies a logging category. | click here |
-nf |
low|high |
(none) | Applies the video noise filter. | click here |
-q |
(none) | (none) | Disables all screen output. | click here |
-rq |
fast|high |
fast |
Specifies the resize quality. | click here |
-rs |
widthxheight |
0x0 | Sets the resizing dimensions. | click here |
-t |
text |
(none) | Adds a title. | click here |
-dt |
(none) | (none) | Disables two-pass encoding. | click here |
| -da | (none) | (none) | Disables audio from the input. | |
| -dv | (none) | (none) | Disables video from the input. | |
-vm |
sharp|normal|smooth|slideshow |
normal |
Sets the video mode. | click here |
You can also use the application to display information without encoding streaming media:
|
Where [information_options] is one of the following:.
| Option | Function | Reference |
|---|---|---|
-pa |
Prints audience definitions for use with the -ad option. |
click here |
-pd |
Displays device information for use with the -d option. |
click here |
-ps |
Prints server definitions for use with the -sd option. |
click here |
-v |
Displays the Helix Producer version number. | click here |
The following sections describe in more detail the input and output options used with the producer command-line application.
The input file to be encoded, located on a network or local drive. Wildcards can be used to run a batch of jobs. The value is a valid file name of a job file. You can use either a relative path from the working directory, or an absolute path. Here are some examples:
-i myfile.avi |
Specifies the audio device ID for the input audio devices. Using this option
overrides the -i option. Use the Print Device Information (-pd) option to list
values on your system. You can also use wildcards. Here are some examples:
-ac 0 |
Specifies the audio port for the input audio devices. Overrides the -i option.
Use the Print Device Information (-pd) option to list values on your system.
For example:
-ap "mic" |
Specifies the device ID for the input video device. Overrides the -i option. Use
the Print Device Information (-pd) option to list values on your system. Here
are some examples:
-vc 0 |
Specifies the device port for the input video capture device. If omitted, the
current mixer settings are used. Overrides the -i option. Use the Print Device
Information (-pd) option to list values on your system. You can also use
wildcards. Examples:
-vp 0 |
Linux only option. Specifies the video format of the input video capture device. Value can be NTSC, PAL, SECAM, AUTO, or an integer. Examples:
-vf SECAM |
Specifies the amount of time before the job ends and encoding from the
device stops. Duration can be specified in Days:Hours:Minutes:Seconds:
[d:][h:][m:][s[.ms]] |
The default is an infinite duration. Here are some examples:
-d 90 (90 seconds) |
The file name for the output RealMedia file, or the directory if multiple input files are used (batch encoding). If multiple files are used, the output names are automatically generated. If the specified output directory does not exist, it will be created.
The general file extension for RealMedia files is .rm. If you are encoding with Variable Bit Rate (VBR), you must use the .rmvb extension.
-o C:\files\movie.rm |
Settings required for a live server output using the Push Broadcast method available in Helix Universal Server 9 and greater. Value is:
[password@]address[:startPort[-endPort]]/streamname |
-sp pass@server.co.com:3000-30001/live.rm |
Settings required for a server-initiated broadcast output stream using the Pull Broadcast method available in Helix Universal Server 9 and greater. Value is:
[password@]listenAddress:listenPort/streamname |
-si pass@192.168.224.221:3031/live.rm |
Settings required for encoding to RealServer versions G2 through 8.01. Value is:
[username:password@] address[:port]/streamname |
-sg name:pass@realserver.yourcompany.com/live.rm |
-sg jdoe:letmein@172.16.0.34:4040/meeting.rm |
May be either the name of a Server defined within the Helix Producer or a Server File located anywhere on the hard drive. If a Server File is referenced, the full filename must be included, including file extension. The producer application will search for a filename matching the filename first and then look in the Servers defined within the Helix Producer. If relative paths provided for server files, the location is relative to the working directory. Value is:
[username:password@]ServerDefinition,streamname |
| ServerDefinition | A string representing a Server Definition defined within the Helix Producer or the name of a Server File with extension. |
-sd janedoe:letmein@RBN Hosting Server,live.rm |
You can use the following encoding setting options with the producer utility.
This option provides a list of Audience Definitions defined within the Helix Producer. The name of the audience may be abbreviated with the first few letters. The closest matching audience is used. For example, "28k Dial-up" may be abbreviated with "28." The default is 28k Dial-up and 56k Dial-up. The value is a comma-separated list of strings that matches the names of an Audience Definitions defined within the Helix Producer.
You can also use an Audience File that you have created. An Audience File is an XML-based file that specifies the video codec, audio codec, bit rate and other settings for the audience. If you use an Audience File, you must enter the full filename, including the extension. For information on using Audience Files, see "Creating an Audience File".
-ad "28k,56k" |
Describes the type of audio content. This setting determines which audio
codec is to be assigned from an audience. Values are voice or music. The default
is voice. Example:
-am music |
Setting to control the picture quality of the encoded video. Values include
sharp, normal, smooth, and slideshow. The default is normal. For example:
-vm sharp |
The input file is read in two passes, the first to analyze, and the second to
encode. Only applies for encoding file-to-file. It is ignored if the input is a
device (-d) or the output is a server (-sg, -sp, -si, -sd). No value is required. For
example:
-dt |
If used, the audio from the input source will be stripped out. No value is required. For example:
-da |
If used, the video from the input source will be stripped out. No value is required. For example:
-dv |
Affects the resulting quality of an output file when resize is applied. Choosing
high results in a better quality resize, but uses considerably more CPU. Ignored
if the -rs option is omitted. Values are fast (default) and high. Example:
-rq high |
Sets the output video width and height in pixels. If either is set to 0, its value is computed from the original video's aspect ratio. Value is:
WxH |
W |
Width of the video in pixels from 0-2048. Must be divisible by 4. |
H |
Height of the video in pixels from 0-2048. Must be divisible by 4. |
-rs 320x240 |
Allows you to specify the quality of audio resampling. Resampling must be done if the sample rate required by the target audio codec is different from the input file or device sample rate. The producer automatically invokes the resampler for each audio codec as needed.
Values are high or fast. Choosing high results in an audio-only encode using as much as 2 times as much CPU for live broadcasting or taking twice as long to encode for file-to-file encoding. Choosing fast does not incur additional CPU but the encoded output will have a slightly lower quality. In all cases, there is no pitch shift incurred by the audio resampler.
-arq fast |
The following prefilter options are available for the producer utility.
Prevents the audio signal from clipping by applying dynamic range compression, as well as offering gain control to increase or decrease the gain of the signal. The value is any number from -12.0 to 12.0. For example:
-ag 0 |
This filter is designed to make black colors darker. If the source video has a washed-out appearance, use this filter to help restore proper color. No value is required. Example:
-bl |
Specifies use of inverse telecine and/or deinterlace filters. If you are unsure
whether input was created using the telecine or interlace processes, you can
specify autodetect. Values is auto, d, i or both, where:
auto |
Autodetect and apply De-interlace and Inverse Telecine filters as needed. |
d |
Use De-interlace filter only. |
i |
Use Inverse Telecine filter only. |
both |
Apply both de-interlace and Inverse Telecine. |
-di auto |
Prefilter that crops out unwanted video. Values are pixel values for left, top, width, and height. For example:
-cr 2,2,320,240 |
Removes small distortions or static in the video image. Value is low or high.
Examples:
-nf low |
The following clip information options are available for use with the producer utility.
The title for the recorded clip. Use quotes if spaces are used. The value can be any string up to 255 characters. Example:
-t "A Slug's Life" |
The author of the recorded clip. Use quotes if spaces are used. The value can be any string up to 255 characters. Example:
-a "Billy Shakespeare" |
The copyright owner and date for the recorded clip. Use quotes if spaces are used. The value can be any string up to 255 characters. Example:
-c "Diznee 2001" |
Keywords that will help search engines locate your clip. Use quotes if spaces are used. The value can be any string up to 1023 bytes. Example:
-k "pets slugs" |
A brief description of the clip. Use quotes if spaces are used. The value can be any string up to 64 kb. Example:
-de "a gripping story about a man and his pet banana slug |
Defines the age range for which the content is applicable. Available options are: 0 - No Rating , 1- All Ages 2 - Older Children, 3 - Younger Teens, 4 - Older Teens (15 & Up), 5 - Adult Supervision Recommended, 6 - Adults Only. Example:
-r 1 |
You can use the following screen output options with the producer utility.
Determines the level of logging messages used. Informational messages are
low volume and high importance while diagnostic messages are high volume
and generally low importance. Values are error, warning, info, and diagnostic.
Value may be abbreviated. Examples:
-lc "error,warning,diagnostic" |
Suppresses logging to file. No value is required. Example:
-dlf |
Suppresses logging to the screen. No value is required. Example:
-dls |
All output is disabled. Useful if you are running the producer from within another application that fails if data output to standard output or standard error. No value is required. Example:
-q |
The following information options are available for use with the producer utility.
Returns help for using the command line producer. No value is required. Example:
-h |
Extracts audio and video device information from the system for use in the -d
option. See "Audio/Video Device Duration (-d)" for information on how to
use the information printed with this command. This option may only be
used by itself on the command line. No value is required. Example:
-pd |
Prints a list of accepted Audience Definitions for use in the -ad option. No
value is required. Example:
-pa |
Prints a list of accepted Server Definitions for use in the -sd option. No value
is required. Example:
-ps |
Prints the version of Helix Producer used. No value is required. Example:
-v |
This section shows you some examples of how to put the preceding options together for some common uses of the producer.exe command line program.
The following example is a simple encode of a media file. Using the default
values for all options, the output is named file.rm and is encoded using the
28k and 56k audience definitions.
producer -i file.avi |
The following example encodes a batch of files using a wildcard to designate
the input files. The output files are all placed in the movies directory.
producer -i C:\capture\*.avi -o C:\movies\ |
The following example captures input from the video capture card and the
audio sound card and writes to output file capturefile.rm.
producer -vc 0 -ac 0 -o c:\capturefile.rm |
The following example captures audio and video and streams to a standard
Helix Universal Server using streamname live.rm.
producer -v 0:2 -ac 0 -s janedoe:pass@realserver.mycompany.com:4040/live.rm
The following example captures audio and video and streams both to a server and to a file. It also targets the 56k and 150k audiences.
producer -v 0:2 -ac 0 -s me:letmein@realserver.abc.com:4040/live.rm
-o archive.rm -ad "56k,150k"
The following example shows you how to encode using clip information: a title, author, and copyright.
producer -i myfile.mov -o output.rm -t "Summer Vaction" -a "John Doe"
-k "Cape Cod Summer Vacation 2001"
-de "Video from summer vacation in Cape Cod."
The final example shows you how to use prefilters. Here, the example uses the audio gain with a value of 4, audio mode of music, resizes to 240 high by maintaining aspect ratio, uses high quality resize, applies a black level filter and performs auto-detection of De-interlace and Inverse Telecine.
producer -i vacation.mov -o vacation.rm -ag 4 -am music -rs 240x0 -rq high -bl -di
auto
When you use a job file, all encoding options are listed within the file, and you need to pass a maximum of two options on the command line. Use the following syntax when encoding with a job file:
producer -j job_filename -sa Username:Password@ServerDefinition
Tells the utility to run a Job File from the command line. The value is a valid file name of a job file. You can use either a relative path from the working directory, or an absolute path. For example:
-j MyJob.rpjf |
Generates a Job File from the command line options provided. The value is a valid file name of a job file. You can use either a relative path from the working directory, or an absolute path. For example:
-cj NewJob.rpjf |
Audience Files are XML-based files that you edit using any text editor. These files can be used with the command line application to customize the audiences that you will use for encoding.
Helix Producer is installed with a number of default Audience Files that you can use to modify and create your own. These default files are located in the Audiences directory off of the application directory. It is recommended that if you modify a default audience file, you save it under a different filename.
Within the Audience File, there is a section for each audio stream used. For each stream you specify the codec name, codec flavor, and the context of the codec used.
Below are tables that lists codec names and flavors, and also lists the corresponding RealAudio codec. See "Appendix A: RealAudio Codec Reference" for more information on RealAudio codecs.
| Name | Flavor | RealAudio Codec Used |
|---|---|---|
| sipr | 2 | 5 kbps Voice |
| sipr | 0 | 6.5 kbps Voice |
| sipr | 1 | 8.5 kbps Voice |
| sipr | 3 | 16 kbps Voice |
| cook | 7 | 32 kbps Voice |
| cook | 14 | 64 kbps Voice |
Within the Audience File, there is a section for the video stream. Here, you specify the following:
| Name | RealAudio Codec Used |
|---|---|
| rv9 | RealVideo 9 |
| rv8 | RealVideo 8 |
| rvg2svt | RealVideo G2 with SVT |
The rmeditor.exe utility allows you to edit a RealMedia file, or get information about an encoded file. There are three ways to use this utility. The first is to get information about a RealMedia file (also called a "dump"). The second is to change metadata, such as title, author, and copyright information. The third way to use this utility is to cut files and paste two files together. The following table summarizes the rmeditor options, which have both long and short option flags.
Use the following syntax to create a text-based dump file that contains information about an encoded RealMedia file:
rmeditor -inputFile filename.rm -dumpFile filename.txt
rmeditor {-inputFile <filename>} {-outputFile <filename>}
[-t | -title <title>] [-a | -author <author>] [-c | -copyright <copyright>]
[-q | -description <description>] [-n | -keyword <keywords>]
rmeditor {-i | -input | -inputFile <input> [-s | -startTime <dd:hh:mm:ss.xyz>] [-e |
-endTime <dd:hh:mm:ss.xyz>] }
[-i | -input | -inputFile <input> [-s | -startTime <dd:hh:mm:ss.xyz>] [-e | -
endTime <dd:hh:mm:ss.xyz>] ]
{-o | -output | -outputFile <filename>}
[-t | -title <title>] [-a | -author <author>] [-c | -copyright <copyright>]
[-q | -description <description>] [-n | -keyword <keywords>]
The rmevents.exe utility lets you encode HTML-page URLs into a RealMedia clip. You can even target a specific HTML pane in RealOne Player's three-pane environment. Using rmevents.exe, you can also encode clip information such as title, author, and copyright, and create image maps with clickable hot spots in different shapes.
| For More Information: To learn more about RealOne Player's three-pane environment, download Introduction to Streaming Media with RealOne in PDF or zipped HTML format from http://service.real.com/help/library/encoders.html. |
You first create an events file, which is a plain text file that uses the standard
text extension of .txt. This file describes events that occur as the clip plays. You
write each event on a separate line, and you can use a pound sign (#) to start a
comment line. Each event line follows this format:
|
The flag indicates the type of event, which can be either to display clip information, or to open a URL in RealOne Player HTML pane automatically. The starting time and ending time are relative to the start of clip playback. You indicate the time value with the following format, in which only the seconds field is required:
dd:hh:mm:ss.x |
| Note: Define each event on a single line within the events text file. Do not press Enter to wrap long lines manually. |
When opening a URL automatically in a RealOne Player HTML pane, you use
the u event flag. The event syntax looks like this:
u |
The URL must be a fully qualified HTTP URL. For the parameters, you can
use rpcontextheight="pixels" and rpcontextwidtht="pixels" when sending a URL
to the related info pane. For target, use one of the following:
_rpcontextwin |
Display the URL in the related info pane. |
_rpbrowser |
Display the URL in the media browser pane. |
_rpexternal |
Display the URL in a secondary browsing window. |
The following is a sample events file that opens two URLs in the related info pane at different times, and two URLs in the media browser pane at different times:
# Open a URL in the related info pane when the clip starts, and size the pane. |
Note the following about this sample:
1:00 minutes, but no later than 1:59.9 minutes. If a viewer starts the clip and immediately seeks to its 3-minute mark, for example, the URL doesn't display because the clip never plays at any point between the URL's start and end times.Using rmevents.exe, you can encode the RealOne Player clipinfo parameters
into the clip. Separate the subvalues with vertical lines, or "pipes." For
example, the following shows an events file line that specifies clip
information, using i as the event flag:
i 00:00:00.0 00:00:10.0 clipinfo:title=My Presentation|artist name=Pat Morales|...(Does not work with Player version 8) |
For clip information, you can specify the start time as the clip's starting time
(00:00:00.0). Specifying an end time is required, but the actual end time
doesn't matter because the clip information will display throughout the
length of the clip playback. In the example above, the end time is set to 10
seconds after the clip starts.
The following table describes the name and value pairs that you can use with
clipinfo. You can use any set of values, and list them in any order. Most text
values can be over 100 characters long.
Note:
Do not use the title, author, and copyright parameters
along with clipinfo.
|
After you write your events file, you use the RMEvents utility to merge the events file with your clip.
| To merge an events file with a RealAudio or RealVideo clip on Windows: |
c:\Program Files\Real\Helix Producer Basic or c:\Program Files\Real\Helix Producer Plus.C:\>cd "C:\Program Files\Real\Helix Producer Basic" |
rmevents -i |
|
|
©2002 RealNetworks, Inc.
For more information, visit RealNetworks Click here if the Table of Contents frame is not visible at the left side of your screen. |