VideoStream#

class ansys.stk.core.graphics.VideoStream#

Bases: IRasterStream, IRaster

A raster stream that streams from a video. The video can be read from a file, or streamed from an HTTP, RTP, UDP, or TCP source. See the Video Streams Overview for a list of supported video formats and Uri usage.

Overview#

close

Close the video stream and any associated resources.

pause

Pauses the video when the playback property is set to real time.

play

Begins playing the video when the playback property is set to real time.

reinitialize_with_string_uri

Reinitializes the video stream from a Uri, which can be a file, HTTP, RTP, UDP, or TCP source. See the Video Streams Overview for a list of supported video formats and Uri usage.

reset

Seeks the video to its first frame and begins playing the video when the playback property is set to real time.

stop

Stop the video when the playback property is set to real time. Stopping the video will seek to the first frame and pause playback. Use the Play method to begin playing the video again.

allow_frame_drop

Get or set a value indicating if frames should be dropped if video processing can not keep up with a video stream. If this is set to false, the video quality may degrade when the processing load is too high…

audio_uri

Get the uri of the audio.

enable_audio

Get or set a value indicating if the encoded audio stream should be synchronized to video playback If this is set to false, the audio stream will be disabled…

end_frame

Get or set the end frame of the video. Changing the end frame property also changes the end time property to the time in the video that corresponds to the specified frame.

end_time

Get or set the end time of the video in seconds. Changing the end time property also changes the end frame property to the frame in the video that corresponds to the specified time.

frame_rate

Get or set the frame rate of the video when the playback property is set to real time. If this property is not set, the internal framerate of the video is used.

interval_end_time

Get or set the scene manager time at which the video will stop playing when the playback property is set to time interval.

interval_start_time

Get or set the scene manager time at which the video will begin playing when the playback property is set to time interval.

is_playing

Get whether or not the video is playing. Use the play, pause, stop, and Reset methods to control the playback of the video when the playback property is set to real time.

loop

Get or set whether the video will loop when it reaches its last frame when the playback property is set to real time.

packet_acquirement_yield_time

Get or set the thread processing yield time for asynchronous streaming of video over common protocols like udp. Setting a high value may increase performance, but may cause frames or packets to drop, effecting visual quality…

packet_buffer_limit

Get or set a value indicating the buffering limit for packets when processing a video stream…

playback

Get or set the video playback mode of the video.

start_frame

Get or set the start frame of the video. Changing the start frame property also changes the start time property to the time in the video that corresponds to the specified frame.

start_time

Get or set the start time of the video in seconds. Changing the start time property also changes the start frame property to the frame in the video that corresponds to the specified time.

uri

Get the uri of the video.

Import detail#

from ansys.stk.core.graphics import VideoStream

Property detail#

property VideoStream.allow_frame_drop: bool#

Get or set a value indicating if frames should be dropped if video processing can not keep up with a video stream. If this is set to false, the video quality may degrade when the processing load is too high…

property VideoStream.audio_uri: str#

Get the uri of the audio.

property VideoStream.enable_audio: bool#

Get or set a value indicating if the encoded audio stream should be synchronized to video playback If this is set to false, the audio stream will be disabled…

property VideoStream.end_frame: int#

Get or set the end frame of the video. Changing the end frame property also changes the end time property to the time in the video that corresponds to the specified frame.

property VideoStream.end_time: float#

Get or set the end time of the video in seconds. Changing the end time property also changes the end frame property to the frame in the video that corresponds to the specified time.

property VideoStream.frame_rate: float#

Get or set the frame rate of the video when the playback property is set to real time. If this property is not set, the internal framerate of the video is used.

property VideoStream.interval_end_time: Date#

Get or set the scene manager time at which the video will stop playing when the playback property is set to time interval.

property VideoStream.interval_start_time: Date#

Get or set the scene manager time at which the video will begin playing when the playback property is set to time interval.

property VideoStream.is_playing: bool#

Get whether or not the video is playing. Use the play, pause, stop, and Reset methods to control the playback of the video when the playback property is set to real time.

property VideoStream.loop: bool#

Get or set whether the video will loop when it reaches its last frame when the playback property is set to real time.

property VideoStream.packet_acquirement_yield_time: int#

Get or set the thread processing yield time for asynchronous streaming of video over common protocols like udp. Setting a high value may increase performance, but may cause frames or packets to drop, effecting visual quality…

property VideoStream.packet_buffer_limit: int#

Get or set a value indicating the buffering limit for packets when processing a video stream…

property VideoStream.playback: VideoPlayback#

Get or set the video playback mode of the video.

property VideoStream.start_frame: int#

Get or set the start frame of the video. Changing the start frame property also changes the start time property to the time in the video that corresponds to the specified frame.

property VideoStream.start_time: float#

Get or set the start time of the video in seconds. Changing the start time property also changes the start frame property to the frame in the video that corresponds to the specified time.

property VideoStream.uri: str#

Get the uri of the video.

Method detail#

VideoStream.close(self) None#

Close the video stream and any associated resources.

Returns:

None

VideoStream.pause(self) None#

Pauses the video when the playback property is set to real time.

Returns:

None

VideoStream.play(self) None#

Begins playing the video when the playback property is set to real time.

Returns:

None

VideoStream.reinitialize_with_string_uri(self, uri: str) None#

Reinitializes the video stream from a Uri, which can be a file, HTTP, RTP, UDP, or TCP source. See the Video Streams Overview for a list of supported video formats and Uri usage.

Parameters:

uri : str

Returns:

None

VideoStream.reset(self) None#

Seeks the video to its first frame and begins playing the video when the playback property is set to real time.

Returns:

None

VideoStream.stop(self) None#

Stop the video when the playback property is set to real time. Stopping the video will seek to the first frame and pause playback. Use the Play method to begin playing the video again.

Returns:

None