Chapter 7: Command Line Utilities
RealProducer Plus is installed with utilities that allow you to use the command line to create and modify streaming media files (.rm files). You run these utilities through the MS-DOS prompt.
The following programs are available to you:
- RMBatch allows you to create .rm files using all RealProducer Plus features, such as SureStream, live broadcasting, and recording preferences.
- RMEditor allows you to change information about an .rm file, trim the length of the clip, combine multiple .rm files, and create a text file containing the file's information.
- RMEvents allows you to merge image map and event text files into an existing .rm file and extract events and image maps from a .rm file into a text file.
Using RMBatch
RMBatch gives you the conversion and broadcasting capability of the RealProducer Plus main interface, but also allows you to create a batch file and record multiple .rm files with a single command.
To use the command line encoder:
- Open the MS-DOS prompt.
- Change the directory to the main RealProducer Plus directory.
The default main directory is c:\Program Files\Real\RealProducer.
- Type
rmbatch <switches> where <switches> are the recording switches you specify to record your media. See the tables below for more details on all necessary switches.
 |
Note |
|
You must specify an input by using the /I, /D, or /L
switches.
|
- The command line RealProducer Plus converts the specified input into RealAudio or RealVideo once you press Enter.
Switches
The following tables describe each switch that you can use on the command line. These switches are divided into Input/Output switches, Encoding switches, and Preferences switches.
Input/Output Switches
| Syntax |
Description |
Default Value |
Example |
| /I <input file> |
name and directory of the input file |
no default |
/I c:\Real\foo.avi
|
| /D <input dir> |
directory of the input files; ignores the /I switch |
no default |
/D c:\Real\avifiles\
|
| /L <audio>,<video> |
specifies live audio and video input(s), where <audio> and <video> represent the values assigned to an audio card driver and a video card driver; ignores /I or /D switches |
0,0
0 - primary audio card 0 - primary video card |
/L 3,1
|
| /O <output file> |
name of the output file |
<input file>.rm |
/O c:\Real\foo.rm
|
| /S "<server[:port]>/<file>" |
name of the output server, port, and file |
port defaults to 4040; output file must be specified |
/S "myserver:6060/foo.rm"
|
| /U <user name> |
the user name to log on to the server |
no default |
/U myname
|
| /P <password> |
the password for the user name |
no default |
/P mypassword
|
| /X <hh>:<mm>:<ss> |
maximum amount of time to record |
continuous |
/X 01:20:30
|
| /TP 0 or 1 |
turns on two-pass encoding 0 - off 1 - on |
0 - off |
/TP 1
|
Encoding Switches
| Syntax |
Description |
Default Value |
Example |
| /T <target1>,<target2>,... |
target audiences for the recording; use any of the following numbers: 0 - 28 Kbps Modems 1 - 56 Kbps Modems 2 - single ISDN 3 - dual ISDN 4 - DSL/cable modem 5 - corporate LAN 6 - 256K DSL/cable modem 7 - 384K DSL/cable modem 8 - 512K DSL/cable modem |
0 - 28 Kbps modem |
/T 1,2,3
|
| /A 0, 1, 2, or 3 |
audio format; use one of the following numbers: 0 - voice only 1 - voice with background music 2 - music 3 - stereo music |
0 - voice only |
/A 2
|
| /V 0, 1, 2, or 3 |
video quality; use one of the following numbers: 0 - normal motion 1- smoothest motion 2 - sharpest image 3 - slide show |
0 - normal motion |
/V 2
|
| /F 0 or 1 |
file type; use one of the following numbers: 0 - Single Rate 1- SureStream |
1 - SureStream |
/F 0
|
| /M <file> |
use the specified settings configuration file; overrides /T and /A; see below for more information |
none |
/M mysettings.txt
|
| /B <title> |
the title for the recorded clip |
none |
/B "The Title"
|
| /H <author> |
the author for the recorded clip |
none |
/H "Joe Schmoe"
|
| /C <date> |
the copyright owner and date for the recorded clip |
none |
/C "My Company 1999"
|
| /Y 0 or 1 |
enable audio recording; 0 - no 1 - yes |
1- yes |
/Y 0
|
| /Z 0 or 1 |
enable video recording; 0 - no 1 - yes |
1 - yes |
/Z 0
|
| /OS <width>,<height> |
output video size (in pixels) |
original size |
/OS 144,32
|
| /Q <description> |
a brief description of the clip; use quotes if spaces are used |
none |
/Q "a gripping story about a man and his pet banana slug"
|
| /N <keywords> |
keywords that will help search engines locate your clip |
none |
/N "pets slugs"
|
Preferences Switches
| Syntax |
Description |
Default Value |
Example |
| /K 0 or 1 |
allow download; 0 - no 1 - yes |
0 - no |
/K 1
|
| /AR 1, 2, 3, or 4 |
audience rating; 1 - general, all ages 2 - parental guidance 3 - adult supervision required 4 - adults only |
1 - general |
/AR 3
|
| /IN 0 or 1 |
allow search engines to index your clip; 0 - no 1 - yes |
1 - yes |
/IN 0
|
| /R 0 or 1 |
allow recording for RealPlayer Plus users; 0 - no 1 - yes |
0 - no |
/R 1
|
| /W 0 or 1 |
emphasize audio or video (SureStream recording only); 0 - emphasize audio 1 - emphasize video |
0 - audio |
/W 1
|
| /G 5 or 6 |
the version of RealPlayer the clip is compatible with (SureStream recording only); use one of the following numbers: 5 - RealPlayer 5.0 or later 6 - RealPlayer G2 |
6 - RealPlayer G2 |
/G 5
|
| /J <l>,<t>,<w>,<h> |
set cropping values where l=left, t=top, w=width, and h=height |
0,0,0,0 |
/J 0,0,200,150
|
| /? |
displays help information |
|
|
Video Filter Switches
| Syntax |
Description |
Default Value |
Example |
| /Rz 0 or 1 |
resize filter; 0 - fast resize 1 - high quality resize |
0 - fast resize |
/Rz 1
|
| /It 0 or 1 |
inverse-telecine filter; 0 - no 1 - yes |
0 - no |
/It 1
|
| /Di 0 or 1 |
de-interlace filter; 0 - no 1 - yes |
0 - no |
/Di 1
|
| /NF 0, 1, or 2 |
use video noise filter; 0 - off 1 - filter low noise 2 - filter high noise |
0 - off |
/NF 2
|
Video Codec Switches
| Syntax |
Description |
Default Value |
Example |
| /VB 0 or 1 |
variable bit rate encoding; 0 - no 1 - yes |
0 - off |
/VB 1
|
| /VL <seconds> |
variable bit rate max latency; from 5 to 60 seconds |
15 seconds |
/VL 30
|
| /LP 0 or 1 |
loss protection; 0 - no 1 - yes |
0 - no |
/LP 1
|
| /KF <milliseconds> |
keyframe frequency; from 0-60000 milliseconds |
10000 milliseconds |
/KF 20000
|
Examples
The following example records foo.avi 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 defaults to foo.rm.
rmbatch /I C:\foo.avi /T 0,1 /A 0 /V 0 /F 1 /B "The Title"
The next example records from a live source to a RealServer with the same settings as above.
rmbatch /L 0,0 /S "myserver:4040/foo.rm" /T 0,1 /A 0 /V 0 /F 1 /B "The Title"
Settings Configuration File
The Settings Configuration File switch (/M) allows the user to specify a text file that contains the necessary target audience settings for the recording. Using a settings file allows you to save different settings that you use all the time, plus you can specify the exact codec used.
The parameters contained used for each target audience are as follows:
Settings File Parameters
| Parameter |
Description |
| TARGET |
the target audience; see below for a list of values |
| TOTAL_BIT_RATE |
total bit rate for the target audience |
| AUDIO_CODEC |
the audio codec used for the target audience; see below for a list of values |
| VIDEO_CODEC |
the video codec used to create streaming video; see below for a list of values (defalut = RV300) |
| MAX_FRAME_RATE |
maximum frame rate, measured in frames per second (default = 15) |
 |
Warning |
|
Parameters must be in upper case.
|
The settings file contains a line for each target audience that the user wishes to record for. A sample configuration settings file for a SureStream recording would be as follows:
TARGET=0,TOTAL_BIT_RATE=20,AUDIO_CODEC=sipr0,VIDEO_CODEC=RV300,MAX_FRAME_RATE=7.5
TARGET=2,TOTAL_BIT_RATE=45,AUDIO_CODEC=sipr1,VIDEO_CODEC=RV300,MAX_FRAME_RATE=10
RealProducer Plus then takes these values and creates a RealMedia stream for the target audience specified in each line.
 |
Warning |
|
Using a settings configuration file will override the
Audio Format switch (/A) and the Target Audience
switch (/T).
|
Target Audience Values
| 0 |
28 Kbps Modems |
| 1 |
56 Kbps Modems |
| 2 |
Single ISDN |
| 3 |
Dual ISDN |
| 4 |
DSL/Cable Modem |
| 5 |
Corporate LAN |
| 6 |
256K DSL/Cable Modem |
| 7 |
384K DSL/Cable Modem |
| 8 |
512K DSL/Cable Modem |
Audio Codec IDs
| sipr0 |
6.5 Kbps Voice |
| sipr1 |
8.5 Kbps Voice |
| sipr2 |
5 Kbps Voice |
| sipr3 |
16 Kbps Voice |
| cook7 |
32 Kbps Voice |
| cook14 |
64 Kbps Voice |
| cook8 |
6 Kbps Music |
| cook0 |
8 Kbps Music |
| cook1 |
11 Kbps Music |
| cook2 |
16 Kbps Music |
| cook3 |
20 Kbps Music |
| cook15 |
20 Kbps Music - High Response |
| cook4 |
32 Kbps Music |
| cook16 |
32 Kbps Music - High Response |
| cook5 |
44 Kbps Music |
| cook6 |
64 Kbps Music |
| cook9 |
20 Kbps Stereo Music |
| cook10 |
32 Kbps Stereo Music |
| cook11 |
44 Kbps Stereo Music |
| cook12 |
64 Kbps Stereo Music |
| cook13 |
96 Kbps Stereo Music |
Video Codec IDs
| RV200 |
RealVideo codec compatible with older versions of RealPlayer |
| RV201 |
new RealVideo codec with SVT (Scalable Video Technology) |
| RV300 |
RealVideo 8.0 codec, compatible with RealPlayer versions 8.0 and above |
Using RMEditor
RMEditor allows you to modify a previously created .rm file by changing clip information, recording and downloading options, and clip length.
To use the command line editor:
- Open the MS-DOS prompt.
- Change the directory to the main RealProducer Plus directory.
The default main directory is c:\Program Files\Real\RealProducer.
- Type rmeditor -i input.rm -o output.rm <switches> where
input.rm is the name of the input file, output.rm is the name of the output file, and <switches> are the editing switches you specify. See the table below for more details on all necessary switches.
Switches
The following table describes each switch that you can use on the command line.
RMEditor Switches
| Syntax |
Description |
Example |
| -a <author> |
name of the author of the clip |
-a "New Name"
|
| -t <title> |
title of the clip |
-t "New Title"
|
| -c <copyright> |
copyright information |
-c "1999 by My Company"
|
| -C <comment> |
any comments about the clip; for example, any changes made and who made them |
-C "changed title on Sept. 24"
|
| -q <description> |
a brief description of the clip |
-q "blah blah"
|
| -n <keywords> |
keywords that will help search engines locate your clip |
-n "word key"
|
| -IN 0 or 1 |
allows search engines to index your content |
-IN 1
|
| -AR 1, 2, 3, or 4 |
audience rating; 1 - general, all ages 2 - parental guidance 3 - adult supervision required 4 - adults only |
-AR 2
|
| -k 0 or 1 |
allow download |
-k 1
|
| -r 0 or 1 |
allow recording for RealPlayer Plus users |
-r 1
|
| -s <dd:hh:mm:ss> |
start time of the edited clip in days:hours:minutes:seconds |
-s 00:00:30:45.20
|
| -e <dd:hh:mm:ss> |
end time of the edited clip in days:hours:minutes:seconds; use 0 to specify the end of the input file |
-e 00:02:15:00.00
|
| -l <file> |
the path and name of the log file; edit results are written to this file |
-l c:\Real\Producer\logs\logfile.txt
|
| -d <file> |
the path and name of the dump file; the contents of the input file are written to this file |
-d c:\Real\Producer\dumps\dumpfile.txt
|
| -? |
displays help information |
|
Examples
The following example allows you to view the current title, author, copyright, comments, mobile playback and selective record settings:
rmeditor -i input.rm
The following example changes the title of input.rm to "New Title" and saves the file as output.rm:
rmeditor -i input.rm -t "New Title" -o output.rm
The following example disables the selective record option and saves the file as output.rm:
rmeditor -i input.rm -r 0 output.rm
The following example trims both the beginning and end of input.rm and saves the result as output.rm:
rmeditor -i input.rm -s 0:0:3:2.20 -e 0:0:4:2.20 -o output.rm
 |
Note |
|
The start and end times will be adjusted in video clips so
that the clip starts and ends on keyframes.
|
The following example pastes several .rm files together into one output file:
rmeditor -i input1.rm -i input2.rm -i input3.rm -o output.rm
 |
Note |
|
If more than one input file is specified, any start and
end time arguments will be ignored.
|
Using RMEvents
RMEvents allows you to merge events and image map text files to an .rm file. Events and image map text files are created using a text editor. See "Creating an Events File" and "Creating an Image Map File" below for more information.
RMEvents also allows the user to extract events and image maps from a .rm file into a text file, so they may be edited using any text editor.
To use the command line events utility:
- Open the MS-DOS prompt.
- Change the directory to the main RealProducer Plus directory.
The default main directory is c:\Program Files\Real\RealProducer.
- Type rmevents -i input.rm -o output.rm <switches> where
input.rm is the name of the input file, output.rm is the name of the output file, and <switches> are the events switches you specify. See the table below for more details on all necessary switches.
Switches
The following table describes each switch that you can use on the command line.
RMEvents Switches
| Syntax |
Description |
Example |
| -e <file> |
path and name of the event text file |
-e c:\Real\event.txt
|
| -m <file> |
path and name of the image map text file |
-m c:\Real\image.txt
|
| -d <dump> |
the path and name of the dump files that hold the image maps and events dumped from the input file; events will be dumped into <dump>_evt.txt and image maps to <dump>_imap.txt |
-d c:\Real\events\input
|
| -? |
displays help information |
|
Examples
The following example merges an event text file with a .rm file:
rmevents -i input.rm -e events.txt -o output.rm
The following example merges an image map text file with a .rm file:
rmevents -i input.rm -m image.txt -o output.rm
The following example dumps image maps and events from the input file into files named input_imap.txt and input_evt.txt, respectively:
rmevents -i input.rm -d input
Creating an Events File
An events file is a simple text file that describes the different components of the event. Before you begin, make sure you have an updated list of the URLs you want to use. Events files should be created using a text editor and saved as text-only files.
The syntax for each entry in an events file is as follows:
| Type of Event |
Syntax |
| URL |
u <starttime> <endtime> <URL> |
| Title |
i <starttime> <endtime> <title> |
| Author |
a <starttime> <endtime> <author> |
| Copyright |
c <starttime> <endtime> <copyright> |
The time for <starttime> and <endtime> is represented as:
[[[days:]hours:]minutes:]seconds[.tenths]
The input file may also contain comment lines beginning with the # symbol. The comment lines are ignored by rmevents.
For example, the following text shows how an event file might look. Note that the time of each line must be in ascending order.
u 00:00:10.0 00:00:59.9 http://www.real.com/
u 00:01:00.0 00:02:00.0 http://www.mysite.com/page2/
This input file tells the RealPlayer to point the user's default Web browser to the RealNetworks home page ten seconds into the presentation. One minute into the presentation, the browser is pointed to a page from www.mysite.com.
Creating an Image Map File
An image map file is a text file with HTML-like tags that create a clickable image map within a RealVideo clip. Image maps can be a multitude of shapes, and they can be changed over a number of different times during the clip. They should be created using a text editor and saved as text-only files.
All tags shown below are required unless stated otherwise. Negative values for numbers are not allowed.
Duration Tag
This tag must be at the beginning of the file. The DURATION tag specifies the amount of time from the start of the first map to the end of the last map in the file. The syntax is as follows:
DURATION=days:hours:minutes:seconds:milliseconds
All time parameters must be present. If you don't need to use a time parameter, fill zeros in that space.
Map Tag
This tag describes the overall properties of the image map. You may have as many MAP tags in a file as you wish. The syntax is as follows:
<MAP START=days:hours:minutes:seconds.milliseconds END=days:hours:minutes:seconds.milliseconds COORDS=x,y,x1,y1>
</MAP>
As with the DURATION tag, all time parameters must be specified. The COORDS tag defines the rectangle of the video clip that the image map will occupy. If you enter an area bigger than the display area, the entire area is inactive. Any area not located within this rectangle will be inactive as well.
Area Tag
This tag describes the region within the map that is active. You can define more than one area within each map; all areas for a map must be between the <MAP> and the </MAP> tags. The syntax is as follows:
<AREA START=days:hours:minutes:seconds:milliseconds END=days:hours:minutes:seconds:milliseconds SHAPE=shape COORDS=x0,y0,x1,y1,x2,y2,...xn,yn action_tag ALT="">
The following table describes each sub-tag:
Area Sub-Tags
| Tag |
Description |
| START |
specifies the start time of this area of the map; optional |
| END |
specifies the end time of this area of the map; optional |
| SHAPE |
this tag can be one of three values, with the corresponding COORD tag:
CIRCLE - COORDS should specify centerX,centerY,radius
RECTANGLE - COORDS should specify left,top,right,bottom
POLYGON - COORDS should specify at least six values (x and y coordinates for three points) |
| action_tag |
The action_tag is one of the following:
PLAYER - specifies a new stream to play in the RealPlayer; for example, PLAYER="pnm://video.real.com/welcome.rm"
URL - specifies an URL to play in the browser; for example, URL="http//www.real.com"
SEEK - specifies a time in the current clip to seek to; for example, SEEK=0:0:0:5:0 |
| ALT |
text that appears in the status bar of the player when the mouse is over this area; if you want to show no text use "" only |
Example
DURATION=0:0:0:40:0
<MAP START=0:0:0:0:0 END=0:0:0:5:20 COORDS=0,0,100,100>
<AREA SHAPE=CIRCLE COORDS=50,50,10 URL="http://www.real.com" ALT="Home Page">
</MAP>
<MAP START=0:0:0:5:20 END=0:0:0:20:3 COORDS=0,0,100,100>
<AREA SHAPE=RECTANGLE COORDS=0,0,50,50 SEEK=0:0:0:3:98 ALT="Seek to a point in the clip">
</MAP>
<MAP START=0:0:0:20:3 END=0:0:0:40.0 COORDS=0,0,100,100>
<AREA END=0:0:0:30:0 SHAPE=POLYGON COORDS=0,50,50,0,100,50 PLAYER="pnm://video.real.com/welcome.rm" ALT="">
<AREA START=0:0:0:31:0 SHAPE=POLYGON COORDS=0,25,25,0,100,50 SEEK=0:0:0:0:0 ALT="Rewind to beginning">
</MAP>
Copyright © 1998-2000
RealNetworks
For information on RealNetworks' technical support, click here.
Comments on this document? Click here.
This file last updated on 06/12/00 at 15:12:53.