Elecard StreamEye Command line tool
With StreamEye command line tool, the complex analysis operations become as fast and easy as a few lines of commands.
Using this tool you'll be able to:
- Analyze the whole array of video files automatically;
- Address specific and complex challenges with a few lines of commands;
- Retrieve submitted results as a text file in CSV format for easy viewing in Excel;
- Customize a sequence of commands to perform your specific tasks;
- Accelerate and automate your regular tasks;
- Get access to most of StreamEye functionality and resources through StreamEye Console.
- How to use StreamEye Command line tool
- Notes on the Command line rules
- Sample Config.xml file
- List of commands
- Examples
How to use StreamEye Command line tool:
To streamline automatic analysis of several files the following rules are introduced. They reassign input and output parameters for configuration files.
Get to the command prompt by clicking Start->Run and type 'cmd'. Then enter the command to start the application first and proceed with the command line options. In general, the syntax is as follows:
SEyeConsole.exe <config path> <options>
Note: you should not relocate the <product> console without all the other applications of the product contained in the installation pack, otherwise the console application will not start.
Notes on the Command line rules
1. Parameters with default value are not required and can be omitted.
2. Rules for input and output file names:
- parameter /in:<file path> in the command line overwrites the value of the tag <input> in the configuration file;
- parameter /out:<file path> in the command line overwrites the value of the tag <output> in the configuration file;
- if <output> tag is missing (or not specified), output file names are formed from input file names plus suffix (if the latter is specified);
- if output file for a tag/section is not specified, the output file name for the tag/section is formed from the name specified in the <output/> tag plus suffix depeding on the name of the tag/section, e.g. ".message.csv", ".header.csv", etc.
<?xml version="1.0"?>
<stream version="1">
<input HEVCDecoder="Elecard(default)/Reference" SkipIncomplete="true(default)/false" file="…"/>
<output separator=".(default)/," delimiter=";(default)/," file="…"/>
<reference type="IYUV(default)/[*Upsampler Type]" filter="None(default)/FieldGen/Median/Sobel" offset="0(default)" increment="1(default)" file="…"/>
<range span="all(default)/start - stop" order="display(default)" indexmode="base/extended(default)"/>
<userdefs framerate="25(default)" timeperiod="1(default)"/>
<info>
<stream distribution="on(default)/off" file="…"/>
<picture distribution="on(default)/off" file="…">
<condition … />
</picture>
<data type="decoded(default)/predicted/unfiltered/residual/reference/difference" file="…"/>
<coefficients type="transform/dequantized" file="…"/>
<message level="all(default)/message/warning/error" file="…"/>
<header level="struct(default)/parameter" file="…">
<condition parameter="name" comparison="full/substring(default)">
<range value="min-max"/>
<equal value="value"/>
<less value="min"/>
<more value="max"/>
<not value="value"/>
</condition>
</header>
<index distribution="on(default)/off" order="display(default)/stream" file="…"/>
<metrics type="psnr(default)/[*Metric Type]" source="decoded(default)/predicted/unfiltered/residual/reference/difference" file="…"/>
<difference type="compare/psnr/psnr clip/subtraction/temperature" source0="decoded(default)/predicted/unfiltered/residual/reference" source1="reference(default)/decoded/predicted/unfiltered/residual" format="IYUV(default)/YV12" file="…"/>
<buffer file="…"/>
<block compact="false(default)/true" disable="block|subblock|prediction|transform" file="…"/>
<dpb description="on(default)/off" file="…"/>
<statistics mode="all(default)/stream/picture" type="all(default)/[*Statistic Type]" prediction="all(default)/sizes/mpe" component="all(default)/luma/chroma" by="all(default)/count/area" file="…"/>
</info>
</stream>
<stream>
<input file="…"/>
<output separator=";(default)/," delimiter=".(default)/," file="…"/>
<info>
<stream distribution="on(default)/off" file="…"/>
</info>
</stream>
* Upsampler types that can be used in a configuration file: I444, I422, IYUV, NV12, NV21, P444, RGB24, RGB32, UYVY (Y422, UYNV, HDYC), V210, V400, V444, Y42B, YUY2 (YUNV, V422, YUYV), YV12, YV16, YVYU, Y4M.
<input/> | The tag is used to configure the input file |
file | Sets the input file path |
<output/> | The tag is used to configure the output file |
separator | Allows selecting decimal comma or decimal dot to separate an integer part from a fractional one of a real number |
delimiter | Allows selecting comma or semicolon to specify boundaries in data stream |
file | Sets the output file path |
<reference/> | The tag is used to configure the reference file |
type | Defines the format of the raw data. YV12 (is set by default) / *Upsampler type are used now. More formats to be supported in the next updates) |
filter | Enables filtering in a frame (None (by default)/Field Generation/Median/Sobel) |
offset | Shifts the position from the first analyzed frame to the specified one in a reference stream. “0” is set by default |
increment | Coefficient used for calculation of a successive frame number intended for further analysis. “1” is set by default |
file | Sets the path to the reference file |
<range/> | The tag is used to define the range of analyzed frames |
span | Defines the range of frames (all (by default) /start - stop), 'start' - number of the first analyzed frame, 'stop' - number of the last analyzed frame |
order | Specifies the order of frames. Display is set by default |
index mode | Starts indexing mode (extended (by default) / base) |
<info/> | The tag is used to define the type/-s of information for output. |
<stream/> | The tag is used to output general information about the analyzed stream |
distribution | Contains information on data distribution by type of coding units (on (by default) / off) |
file | Sets the path for the output stream information |
<picture/> | The tag is used to output picture information |
distribution | Contains information on data distribution by type of coding units (on(default)/off) |
file | Sets the path for the output picture information |
<data/> | The tag is used to save output decoder information on any decoding step |
type | Specifies the type of data for saving (decoded (by default) / predicted / unfiltered / residual / raw data / difference) |
format | Defines the format for saving data (IYUV (by default)) |
file | Sets the output file path where the data will be saved |
<message/> | The tag is used to output messages that appear during analysis |
level | Defines the level of the saved messages (all(default)/message/warning/error) |
file | Sets the output file path where the messages will be saved |
<header/> | The tag is used to define the output headers information |
level | Defines the type of header output information (struct (by default) / parameter), 'struct' - full information on the header will be saved, 'parameter' - only information on the specified parameter(s) from the headers will be saved |
file | Sets the path to the output file with the headers information |
<condition/> | The tag is used to specify the required header parameters. If this section does not exist, all headers will be dumped |
parameter | Specifies the header parameter name |
comparison | Specifies the type of comparison check for the parameter name (full / substring (by default)) |
<range/> | The tag is used to specify the range of parameter values to be searched |
value | Defines the range for searching parameter values in the format “min-max&rdquo” |
<equal/> | The tag is used to set the search parameter value equal to the specified value |
value | Sets the parameter value for comparison |
<less/> | The tag is used to set the search parameter value less than the specified value |
value | Sets the parameter value for comparison |
<more/> | The tag is used to set the search parameter value exceeding the specified value |
value | Sets the parameter value for comparison |
<not/> | The tag is used to set the search parameter value NOT equal to the specified value |
value | Sets the parameter value for comparison |
<index/> | The tag is used to output information about frames (offset, frame type, frame size, average quantizer, etc.) |
distribution | Contains information on data distribution by type of coding units (on (by default) / off) |
order | Shows the order or sequence of index data that are saved (stream/display) |
file | Sets the output file path where information on frames will be saved |
<metrics/> | The tag is used to output information on quality metrics |
type | Specifies the metric type: PSNR (by default) | ssim | delta | msad | mse | VQM | NQI | APSNR | VMAF phone |
source | Defines the type of the source for metrics calculation (decoded (by default) / predicted / unfiltered) |
file | Sets the output file path where information on metrics will be saved |
<difference/> | The tag is used to output information on difference metrics |
type | Defines the type of difference (compare/subtraction/temperature). This is the required parameter for this tag. Its default value should be set. If the value is not set, this tag will be skipped |
source0 | Specifies the source type for difference calculation (decoded (by default) / predicted / unfiltered / residual/ reference) |
source1 | Specifies the source type for difference calculation (reference (by default) / decoded / predicted / unfiltered / residual) |
file | Sets the output file path where information on difference will be saved |
<buffer/> | The tag is used to save Decoder video buffer parameters |
file | Sets the path to the output file with the buffer information |
<block/> | The tag is used to define information about each encoding block |
compact | Data presentation type (false (by default)/true), false – each parameter of one block is presented in one line; true – combines a block data and presents as a column |
disable | Excludes data from the report (block and\or subblock and\or prediction and\or transform) |
file | Sets the output file path where information on difference will be saved |
<dpb/> | The tag is used to save information about decoded picture buffer for each frame; description on (by default) / off is used to display or not the additional information about the frame |
description | Enables/disables adding of frame description from the DPB panel |
file | Sets the output file path where information on difference will be saved |
<statistics/> | The tag is used to get statistics about streams and frames (see more details in the Statistics Panel section of User Guide) |
mode | Allows selecting a mode (stream / pictures) for getting statistics |
type | Shows statistics for the whole stream by structure or prediction |
prediction | Counts prediction types depending on the file format and components |
component | Allows selecting components for counting predictions |
by | Allows selecting the way of displaying statistics (by count / by area) |
file | Sets the output file path where information on difference will be saved |
These examples show how to perform some of the typical tasks from the command-line:
- Saving the general information on the stream and on each picture;
- Retrieving information on the number of IDR_W_RADL slices and offsets;
- Searching for all slices with the slice_type value equal to "2";
- Saving YUV data on the prediction step;
- Saving the block info data of the picture;
- Retrieving information on frame sizes and PSNR values for the first 10 frames.
1. Saving the general information on the stream and on each picture
config.xml:
<?xml version="1.0"?>
<stream version="1">
<input file="C:\Media\hevc\test_12_0_sei.h265"/>
<output file="C:\Media\hevc\out\"/>
<info>
<stream/>
<picture/>
</info>
</stream>
Output files:
test_12_0_sei.stream.csv:
name; | value; |
stream type; | HEVC/H.265; |
profile; | Main; |
compatibility; | Main; Main 10; |
level / tier; | Undefined / Main; |
chroma format; | 4:2:0; |
resolution; | 832 x 480; |
frame rate; | 50.00; |
bitrate; | 1 024 000 000; |
...
test_12_0_sei.stream.csv:
Picture #0; | |
name; | value; |
resolution; | 416 x 240; |
size (bytes); | |
cu; | 21 476; |
prediction; | 520; |
transform; | 19 264; |
qp; | |
min / max; | 23 / 23; |
pixels; | |
count; | 99 840; |
intra; | 99 840 (100.00%); |
distribution (bits); | |
total; | 174 352 (100.00%); |
split_cu_flag; | 297 (0.17%); |
cu_skip_flag; | 0 (0.00%); |
prediction; | |
intra_prediction; | 16 653 (9.55%); |
... | |
Picture #1: | |
name; | value; |
resolution; | 416 x 240; |
size (bytes); | |
cu; | 978; |
prediction; | 352; |
transform; | 511; |
... |
2. Retrieving information on the number of IDR_W_RADL slices and offsets
config.xml:
<?xml version="1.0"?>
<stream version="1">
<input file="C:\Media\hevc\test_12_0_sei.h265"/>
<output file="C:\Media\hevc\out\"/>
<info>
<header level="parameter">
<condition parameter="IDR_W_RADL" comparison="substring"/>
</header>
</info>
</stream>
Output file:
test_12_0_sei.header.csv:
offset; | name; |
0x000000AA; | slice_segment_layer() { IDR_W_RADL }; |
0x00025F47; | slice_segment_layer() { IDR_W_RADL }; |
3. Searching for all slices with the slice_type value equal to "2"
config.xml:
<?xml version="1.0"?>
<stream version="1">
<input file="C:\Media\hevc\test_12_0_sei.h265"/>
<output file="C:\Media\hevc\test_12_0_sei"/>
<info>
<header>
<condition parameter="slice_type">
<equal value="2"/>
</condition>
</header>
</info>
</stream>
Output file:
test_12_0_sei.header.csv:
offset; | name; | value; |
0x0000009C; | slice_segment_layer() { IDR_W_RADL }; | |
first_slice_segment_in_pic_flag; | 1; | |
no_output_of_prior_pics_flag; | 0; | |
slice_pic_parameter_set_id; | 0; | |
slice_type; | 2; | |
slice_sao_luma_flag; | 1; | |
slice_sao_chroma_flag; | 1; | |
slice_qp_delta; | 6; | |
slice_loop_filter_across_slices_enabled_flag; | 1; | |
0x0000D21A; | slice_segment_layer() { CRA_NUT }; | |
first_slice_segment_in_pic_flag; | 1; | |
no_output_of_prior_pics_flag; | 0; | |
slice_pic_parameter_set_id; | 0; | |
slice_type; | 2; | |
slice_pic_order_cnt_lsb; | 32; | |
short_term_ref_pic_set_sps_flag; | 0; | |
short_term_ref_pic_set(12); | ||
if(stRpsIdx != 0); | ||
... |
4. Saving YUV data on the prediction step
config.xml:
<?xml version="1.0"?>
<stream version="1">
<input file="C:\Media\hevc\test_12_0_sei.h265"/>
<output file="C:\Media\hevc\out\"/>
<info>
<data type="predicted"/>
</info>
</stream>
Output file:
test_12_0_sei.data.416x240.yuv
5. Saving the block info data of the picture
config.xml:
<?xml version="1.0"?>
<stream version="1">
<input file="C:\Media\hevc\test_12_0_sei.h265"/>
<output file="C:\Media\hevc\out\"/>
<info>
<block/>
</info>
</stream>
Output file:
test_12_0_sei.block10.csv
name; | value; |
lcu location; | 0x0; |
lcu slice\tile idx; | 0\0; |
lcu size total\prediction\transform; | 17\17\0; |
cu type\location\dimension\depth; | PART_2Nx2N\0x0\64x64\0; |
cu size total\prediction\transform; | 17\17\0; |
tu dimensions\qp; | 64x64\35; |
pu inter dimension\merge_flag\mvp_l0_flag\mvp_l1_flag; | 64x64\0\0\0; |
pu inter type\dimension; | 2 (Pred_BI)\64x64; |
pu L0 mv\mvd; | -1, 0, 1 / -1, 0; |
pu L1 mv\mvd; | -1, 1, 0 / -1, 1; |
pu mv candidates; | *[0]\mvL0(0,0)\[1]\mvL0(0,0)\*0]\mvL1(0,0)\1]\mvL1(0,0); |
lcu location; | 64x0; |
lcu slice\tile idx; | 0\0; |
... |
6. Retrieving information on frame sizes and PSNR values for the first 10 frames.
config.xml:
<?xml version="1.0"?>
<stream version="1">
<input file="C:\Media\hevc\test_12_0_sei.h265"/>
<output file="C:\Media\hevc\out\"/>
<reference file="C:\Media\raw\BasketballDrill_832x480_50.yuv"/>
<range span="0-10"/>
<info>
<metrics type="psnr"/>
<index distribution="off" order="display"/>
</info>
</stream>
Output file:
test_12_0_sei.index.csv:
stream; | display; | offset; | poc; | type; | time; | quant; | psnr y; |
0; | 0; | 0x00000000; | 0; | I; | 00:00:00:000; | 32; | 36.065069; |
1; | 8; | 0x000042B3; | 8; | B; | 00:00:00:160; | 33; | 36.065069; |
2; | 4; | 0x00005790; | 4; | B; | 00:00:00:160; | 34; | 36.065069; |
... | |||||||
10; | 12; | 0x00008343; | 12; | B; | 00:00:00:240; | 34; | 34.808986; |