Skip to content

VideoStreaming

A video-streaming service installed on a Server. Provides the per-stream cost model that converts VideoStreamingJobs (defined by resolution and duration) into bandwidth, CPU, and RAM demand on the server.

Usage from Python

Build VideoStreaming once per service tier, then attach VideoStreamingJobs for each specific resolution / duration combination. The server hosting the service is the one that bills for the streams.

Params

name

A human readable description of the object.

server

Server on which the streaming service is installed. Streams consume the server's CPU and RAM.

An instance of Server.

base_ram_consumption

RAM occupied per server by the operating system and streaming software, independent of users.

Unit: gigabyte_ram.

bits_per_pixel

Average compression density. Multiplied by pixel count and refresh rate to estimate the dynamic bitrate of one stream.

Unit: bit.

static_delivery_cpu_cost

CPU per unit of bitrate served (cores per GB/s). Multiplied by the dynamic bitrate to estimate the CPU consumed by one concurrent stream.

Unit: cpu_core * second / gigabyte.

ram_buffer_per_user

RAM held by the streaming server for each concurrent user (read-ahead buffers, sockets).

Unit: megabyte_ram.

base_compute_consumption

No value. Can be an EmptyExplainableObject in which case the optimum number of instances will be computed, or an ExplainableQuantity with a dimensionless value, in which case e-footprint will raise an error if the object needs more instances than available.

Fixed by VideoStreaming to no value — not configurable.

Calculated attributes