Oracle Video Server Utilities User's Guide Release 2.1.7 A42268-3 |
|
The Video Server utilities perform special operations on content files in the Oracle Media Data Store (MDS) or a host file system. These utilities include:
The following information applies to video server utilities.
Refer to Chapter 1, Working With Oracle Media Data Store Files for the following information:
Rate control is the ability to play video at different speeds and in different directions, to seek in either direction, to scan in either direction, or to pause and resume playback of video files.
Currently, the Oracle Video Server does not allow the prohibition of any rate control operations, except pause, scan forward, and scan backward, even if these prohibitions have been specified.
This utility verifies the integrity of a content file wrapped in a MPEG2 transport wrap, and returns a message indicating whether the file is valid or corrupted.
This utilitiy is not used in a corporate LAN environment.
vsmpegchk [-s] filename [filename ...]
where:
shows the type and quantity of each packet type in the file.
filename
is a file to be verified. You may specify multiple files.
This utility is used only with content wrapped in MPEG 2 transport. Verify that you are using MPEG 2 encoded content prior to using vsmpegchk.
This example verifies the integrity of the files goodmen.mpg2 and ghost.mpg2 in the volume movies:
% vsmpegchk /mds/movies/goodmen.mpg2 /mds/movies/ghost.mpg2 goodmen.mpg2: ok
ghost.mpg2: error at position 188: 23 45 31
This returned message shows that:
This utility generates a tag file for a video content file. You must create a tag file for all corresponding video content files for the server to play them.
vstag requires that the full MDS path of the output file be explicitly stated, or that the MDS_CWD environment variable be set to the appropriate MDS volume.
vstag [-a] [-p integer ] [ -e integer ] [ -f {i|n} ]
[ -s integer ] [ -d description ]
[ -D {p | s | k | K | n | N | f | F} ] [ -E output-file-extension ]
[ -n slave specification][ -r integer ] [ -S service-name ] [ files ... ]
The files argument is interpreted in one of these ways:
vstag [options] input-filename output-filename
vstag -E extension [options] input-filename1 [input-filename2 ...]
where:
% vstag -D NKF /mds/video/spleen.mpg /mds/video/spleen.mpi
% vstag -E mpi /mds/mpg/rutabaga.mpg
% setenv OMS_BIN $ORACLE_HOME/bin
This example generates a tag file for each of the specified MPEG files:
% vstag -E mpi /mds/movies/oracle1.mpg /mds/movies/oracle2.mpg
This example tags all of the files in the volume movies that have the file extension .mpg into corresponding .mpi files.
% vstag -E mpi "/mds/movies/*.mpg"
This example takes the input file fugitive.mpg and produces the output tag file fugitive.mpi without the ability to scan forward:
% vstag -D k -d "The Fugitive-no seeking" /mds/sample/fugitive.mpg \
/mds/sample/fast_fugitive.mpi
This example produces a tag file using the -d option, which writes "The Fugitive" in the comment field. You can use the comment files to identify or record special information about a content file:
% vstag -d "The Fugitive" /mds/sample/fugitive.mpg \
/mds/sample/fugitive.mpi
The vstagpatch utility is used to fill in information in the tag file in case the vstag utility, for whatever reason, skipped some of the detail.
vstagpatch can be used to change the following tag file properties:
vstagpatch [-c] [-s] [-p] [ -a integer ] [ -A integer ] [ -b integer ]
[ -d "text" ] [ -D { 0 | p | s | k | K | n | N | f | F} ]
[ -e integer ] [ -E integer ] [ -f compression-fmt] [ -F integer ]
[ -l integer ] [ -L integer ] [ -m integer ]
[ -M integer ] [ -n filename ] [ -N integer ]
[ -r integer ] [ -t transport-fmt]
input-filename
where:
input-filename
is the tag file to be modified.
bit rate with which the associated MPEG content file is to be played. This value is expressed in bits per second.
Changing the bit rate in the tag file does not change the encoding rate of the associated MPEG file, it simply replaces incorrect bit rate information.
certifies that tags are valid, but does not check against the content
file itself. If -s is specified, -c is deactivated.
adds a descriptive comment to the tag file. If the tag file already contains a comment, vstagpatch overwrites it.
modifies the tag file so that it does not allow the specified rate control operations:
These rate control prohibitions, with the exception of pause, scan forward, and scan backward, are not currently supported.
duration in milliseconds of the associated content file.
associated MPEG content file. If you use -n, you must give the full MDS path of the content file.
prints the entire tag file in the format used by the vstagprint utility.
if you specify -p, vstagpatch prints the header of the tag file without the entire contents.
The following options are currently not supported-do not use them unless so directed by Oracle.
compression format.
specifies the member of the tag file to be modified if you are using
multi-stream rate control.
transport format.
presentation rate of the associated content file. Regular forward is represented by 1000, regular reverse by -1000, double speed forward by 2000, half speed forward by 500, etc.
number of tags in the tag file or member.
audio program identifier (PID).
audio stream.
video program identifier (PID).
video stream.
length in bytes of associated content file.
first presentation time stamp.
last presentation time stamp.
When you play a content file, the stream service uses the tag file to play the content file appropriately. The tag file provides the content file's name (including its path), bit rate, and other information.
If you move or rename a content file, you must update the tag file with the new path and name using the vstagpatch utility with the -n option.
You can use the vstagprint utility to review the information contained in the tag file.
Note that vstagpatch modifies the input file and does not accept an output file specification. If you want to modify a tag file and give it a new name, you must explicitly copy it with mdscopy before using vstagpatch.
In this example, quizshow.mpi is the tag file for quizshow.mpg. This example uses the mdscopy utility to copy these files from one MDS volume to another and then uses vstagpatch to associate the new tag file with the new content file:
% mdscopy /mds/newrel/quizshow.mpg /mds/redford/quizshow.mpg
% mdscopy /mds/newrel/quizshow.mpi /mds/redford/quizshow.mpi
% vstagpatch -n "/mds/redford/quizshow.mpg" /mds/redford/quizshow.mpi
This example modifies the tag file bladrunr.mpi, adding a comment and changing the bit rate to 2.048 Mbps:
% vstagpatch -d "Blade Runner Directors Cut" -b 2048000 \
/mds/rscott/bladrunr.mpi
This utility displays the contents of a tag file from either an MDS file or a file on a host computer.
vstagprint [-c] [-s] input-file
where:
input -filename
specifies the file to be printed.
certifies that tags are valid, but does not check against the content
file itself. If -s is specified -c is deactivated.
prints only the header of the tag file without the entire contents.
The output looks this:
% vstagprint /mds/bvs23/tromance.mpi
Tag file version: 3.6
Current code is version 3.6, back-compatible to version 3.4
magic=aabbccdd (should be aabbccdd)
file describes content for:
1 member files:
All rate control operations are allowed on this file
# 1. format=MPEG 2 Transport transport=MPEG 2 Transport flags=1
file="/mds/bvs23/tromance.m2t" Size = 1367205936
creation time of content: Apr 12 13:04:21
bitrate=1536029 bits/second
elapsed length=7120729 milliseconds
presentation rate=1000
frames/sec(* 1000)=23976
5695 tags in tag file.
audio PID/stream = 0/0 video PID/stream = 33/224
width: 352, height: 240, pel aspect ratio (* 10000): 10950
Tags for member file #1:
1:1, pos= 5315, PTS- 16262 [002f0005a20b0000000000000000]
2:1, pos= 231383, PTS- 128875 [0b8b0034808d0000000a00000000]
3:1, pos= 471340, PTS- 241487 [0c14003f39930000000c00010000]
4:1, pos= 711650, PTS- 354100 [0c420055891d0000000f00010000]
5:1, pos= 951971, PTS- 466712 [0c7b00570b960000001100020000]
[etc.]
The output header tells you:
The flags statement can be ignored.
Each numbered line of output following the header describes a single tag point and has these fields:
This example prints the header of the tag file fugitive_t1.mpi:
% vstagprint -s /mds/bvs23/fugitive_t1.mpi
Tag file version: 3.6
Current code is version 3.6, back-compatible to version 3.4
magic=aabbccdd (should be aabbccdd)
file describes content for:
1 member files:
All rate control operations are allowed on this file
# 1. format=MPEG 2 Transport transport=MPEG 2 Transport flags=1
file="/mds/holly/fugitive_t1.m2t" Size = 1499818128
creation time of content: Apr 9 11:13:51
bitrate=1536029 bits/second
elapsed length=7811405 milliseconds
presentation rate=1000
frames/sec(* 1000)=23976
6245 tags in tag file.
audio PID/stream = 0/0 video PID/stream = 33/224
width: 352, height: 240, pel aspect ratio (* 10000): 10950
This utility converts a binary file into a format suitable to be sent to a set-top box and generates a tag file for it.
This utility is not used in a corporate LAN environment.
vswrap [ -p { boot | blob } ] [ -t { gen | m2t | raw } ]
[-s integer] [-n integer] [-e integer] [-b integer]
[-S integer] [-B integer] [-m integer] [-r integer]
/host/path/input-file /mds/volume/output-file /mds/volume/tag-file
where:
specifies the protocol of the output file:
The default is boot.
specifies the format of the output file:
The default is m2t.
specifies how many MPEG null packets vswrap puts before the first message in the output file. The minimum is 0 and there is no maximum. The default is 3.
specifies how many MPEG null packets vswrap puts between each message in the output file. The minimum and default are 0. There is no maximum.
specifies how many MPEG null packets vswrap puts after the last message in the output file. The minimum and default are 0. There is no maximum.
The -s, -n, and -e switches put MPEG-2 null packets in the output file to allow the set-top box to receive the boot image or blob properly. Appropriate values for these switches vary greatly for different types of set-top boxes.
specifies the size in bytes of the boot protocol or Oracle Media Net messages. The utility divides the file into messages of this size and stores them in the output file. The minimum is 1 and there is no maximum. For BLOBs the default is 7148 bytes. For boot images the default is the size of the boot image input file which means vswrap stores the entire boot image in a single message.
Using the default values is highly recommended.
Use this switch only to convert boot images, not BLOBs.
specifies a hexadecimal MPEG2 program identifier (PID) for the boot size messages. The default is 0x11.
specifies a hexadecimal MPEG2 PID for the boot data messages. The default is 0x11.
specifies a hexadecimal MPEG2 PID for the Oracle Media Net BLOB messages. The default is 0x10.
specifies how many data messages appear between each size message in the output file. The default is infinite, which means there is only one size message followed by all the data messages that make up the input file.
input-file
specifies the name of the input binary file.
output-file
specifies the name of the output file to be created, suitable to be sent to a set-top box. If the output file already exists, vswrap overwrites it.
tag-file
specifies the name of the tag file for the output file. To receive a boot image or a BLOB, an application must request it by referring to its tag file, so you must create a tag file when converting a binary file to be stored in the MDS.
Although the tag, input, and output files can be either in the MDS or in the host file system, it is typical to create a tag file and output file in the MDS from an input file in the host file system.
This example converts the boot image nomo_os9 in the host file system into the file newboot.bi in the MDS:
vswrap -p boot -t m2t -s 450 -n 450 -e 10 \
/host$OMS_HOME/omo/admin/nomo_os9 /mds/bootimages/newboot.bi \
/mds/bootimages/newboot.tag
The new file is formatted with MPEG-2 framing with 450 null packets between each boot protocol message, 450 null packets before the first boot protocol message, and 10 null packets after the last boot protocol message. This example also creates the tag file newboot.tag in the MDS volume bootimages.
This example converts the BLOB file omsBlob1 in the host file system into the file omsBlob1 in the MDS:
vswrap -p blob -t m2t \
/host$ORACLE_HOME/bin/omsBlob1 /mds/bin/omsBlob1 \
/mds/bin/omsBlob1.tag
The new file is formatted with MPEG-2 framing with the default message size of 7148 bytes, three nulls before the first message, and no nulls between messages or after the last message. This example also creates the tag file omsBlob1.tag in the MDS volume bin.