Google Cloud Video Transcoder V1 Client - Class SpriteSheet (0.10.5)

Reference documentation and code samples for the Google Cloud Video Transcoder V1 Client class SpriteSheet.

Sprite sheet configuration.

Generated from protobuf message google.cloud.video.transcoder.v1.SpriteSheet

Namespace

Google \ Cloud \ Video \ Transcoder \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ format string

Format type. The default is jpeg. Supported formats: - jpeg

↳ file_prefix string

Required. File name prefix for the generated sprite sheets. Each sprite sheet has an incremental 10-digit zero-padded suffix starting from 0 before the extension, such as sprite_sheet0000000123.jpeg.

↳ sprite_width_pixels int

Required. The width of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_width_pixels field or the SpriteSheet.sprite_height_pixels field, but not both (the API will automatically calculate the missing field). For portrait videos that contain horizontal ASR and rotation metadata, provide the width, in pixels, per the horizontal ASR. The API calculates the height per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.

↳ sprite_height_pixels int

Required. The height of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_height_pixels field or the SpriteSheet.sprite_width_pixels field, but not both (the API will automatically calculate the missing field). For portrait videos that contain horizontal ASR and rotation metadata, provide the height, in pixels, per the horizontal ASR. The API calculates the width per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.

↳ column_count int

The maximum number of sprites per row in a sprite sheet. The default is 0, which indicates no maximum limit.

↳ row_count int

The maximum number of rows per sprite sheet. When the sprite sheet is full, a new sprite sheet is created. The default is 0, which indicates no maximum limit.

↳ start_time_offset Google\Protobuf\Duration

Start time in seconds, relative to the output file timeline. Determines the first sprite to pick. The default is 0s.

↳ end_time_offset Google\Protobuf\Duration

End time in seconds, relative to the output file timeline. When end_time_offset is not specified, the sprites are generated until the end of the output file.

↳ total_count int

Total number of sprites. Create the specified number of sprites distributed evenly across the timeline of the output media. The default is 100.

↳ interval Google\Protobuf\Duration

Starting from 0s, create sprites at regular intervals. Specify the interval value in seconds.

↳ quality int

The quality of the generated sprite sheet. Enter a value between 1 and 100, where 1 is the lowest quality and 100 is the highest quality. The default is 100. A high quality value corresponds to a low image data compression ratio.

getFormat

Format type. The default is jpeg.

Supported formats:

  • jpeg
Returns
Type Description
string

setFormat

Format type. The default is jpeg.

Supported formats:

  • jpeg
Parameter
Name Description
var string
Returns
Type Description
$this

getFilePrefix

Required. File name prefix for the generated sprite sheets.

Each sprite sheet has an incremental 10-digit zero-padded suffix starting from 0 before the extension, such as sprite_sheet0000000123.jpeg.

Returns
Type Description
string

setFilePrefix

Required. File name prefix for the generated sprite sheets.

Each sprite sheet has an incremental 10-digit zero-padded suffix starting from 0 before the extension, such as sprite_sheet0000000123.jpeg.

Parameter
Name Description
var string
Returns
Type Description
$this

getSpriteWidthPixels

Required. The width of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_width_pixels field or the SpriteSheet.sprite_height_pixels field, but not both (the API will automatically calculate the missing field).

For portrait videos that contain horizontal ASR and rotation metadata, provide the width, in pixels, per the horizontal ASR. The API calculates the height per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.

Returns
Type Description
int

setSpriteWidthPixels

Required. The width of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_width_pixels field or the SpriteSheet.sprite_height_pixels field, but not both (the API will automatically calculate the missing field).

For portrait videos that contain horizontal ASR and rotation metadata, provide the width, in pixels, per the horizontal ASR. The API calculates the height per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.

Parameter
Name Description
var int
Returns
Type Description
$this

getSpriteHeightPixels

Required. The height of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_height_pixels field or the SpriteSheet.sprite_width_pixels field, but not both (the API will automatically calculate the missing field).

For portrait videos that contain horizontal ASR and rotation metadata, provide the height, in pixels, per the horizontal ASR. The API calculates the width per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.

Returns
Type Description
int

setSpriteHeightPixels

Required. The height of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_height_pixels field or the SpriteSheet.sprite_width_pixels field, but not both (the API will automatically calculate the missing field).

For portrait videos that contain horizontal ASR and rotation metadata, provide the height, in pixels, per the horizontal ASR. The API calculates the width per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.

Parameter
Name Description
var int
Returns
Type Description
$this

getColumnCount

The maximum number of sprites per row in a sprite sheet. The default is 0, which indicates no maximum limit.

Returns
Type Description
int

setColumnCount

The maximum number of sprites per row in a sprite sheet. The default is 0, which indicates no maximum limit.

Parameter
Name Description
var int
Returns
Type Description
$this

getRowCount

The maximum number of rows per sprite sheet. When the sprite sheet is full, a new sprite sheet is created. The default is 0, which indicates no maximum limit.

Returns
Type Description
int

setRowCount

The maximum number of rows per sprite sheet. When the sprite sheet is full, a new sprite sheet is created. The default is 0, which indicates no maximum limit.

Parameter
Name Description
var int
Returns
Type Description
$this

getStartTimeOffset

Start time in seconds, relative to the output file timeline. Determines the first sprite to pick. The default is 0s.

Returns
Type Description
Google\Protobuf\Duration|null

hasStartTimeOffset

clearStartTimeOffset

setStartTimeOffset

Start time in seconds, relative to the output file timeline. Determines the first sprite to pick. The default is 0s.

Parameter
Name Description
var Google\Protobuf\Duration
Returns
Type Description
$this

getEndTimeOffset

End time in seconds, relative to the output file timeline. When end_time_offset is not specified, the sprites are generated until the end of the output file.

Returns
Type Description
Google\Protobuf\Duration|null

hasEndTimeOffset

clearEndTimeOffset

setEndTimeOffset

End time in seconds, relative to the output file timeline. When end_time_offset is not specified, the sprites are generated until the end of the output file.

Parameter
Name Description
var Google\Protobuf\Duration
Returns
Type Description
$this

getTotalCount

Total number of sprites. Create the specified number of sprites distributed evenly across the timeline of the output media. The default is 100.

Returns
Type Description
int

hasTotalCount

setTotalCount

Total number of sprites. Create the specified number of sprites distributed evenly across the timeline of the output media. The default is 100.

Parameter
Name Description
var int
Returns
Type Description
$this

getInterval

Starting from 0s, create sprites at regular intervals. Specify the interval value in seconds.

Returns
Type Description
Google\Protobuf\Duration|null

hasInterval

setInterval

Starting from 0s, create sprites at regular intervals. Specify the interval value in seconds.

Parameter
Name Description
var Google\Protobuf\Duration
Returns
Type Description
$this

getQuality

The quality of the generated sprite sheet. Enter a value between 1 and 100, where 1 is the lowest quality and 100 is the highest quality.

The default is 100. A high quality value corresponds to a low image data compression ratio.

Returns
Type Description
int

setQuality

The quality of the generated sprite sheet. Enter a value between 1 and 100, where 1 is the lowest quality and 100 is the highest quality.

The default is 100. A high quality value corresponds to a low image data compression ratio.

Parameter
Name Description
var int
Returns
Type Description
$this

getExtractionStrategy

Returns
Type Description
string