Benchmark Transcoding
This guide provides steps to test the performance of your GPU(s) with the
livepeer_bench
benchmark transcoding tool provided with the
Livepeer install.
The benchmarking tool is designed to:
- Simulate live-mode to measure transcoding as if connected to the network
- Gauge local transcoding capacity
- Provide output statistics to show real-time segment ratio and stream duration ratio
- Provide for adjusting configurations according to GPU capacity
Transcoding Performance
Overall transcoding performance on the network depends on the speed video is transcoded and uploaded/downloaded from an orchestrator.
The transcode time should be as low as possible. At the least, it should be lower than the total segment duration which is faster than real-time.
If you want to get an approximation of how many streams you can transcode
simultaneously, increase the number of concurrent sessions with the
-concurrentSessions
flag to assess the total transcoding time.
After running your benchmark transcoding, you can follow up with further instructions about setting session limits.
Start Benchmarking
- Download the test stream we provide for benchmarking transcoding:
It is important to note that running this benchmarking only gauges local transcoding capacity.
-
Download the common output rendition configuration
.json
file that you can copy and save in the Livepeer folder astranscodingOptions.json
. -
Run
livepeer_bench
The number and type of output renditions will impact benchmark results.
Flags
-
The
-nvidia
flag is only required when transcoding with Nvidia GPUs. It is used to specify a comma-delimited string of Nvidia GPU IDs. -
The
-concurrentSessions
flag is used to specify the number of concurrent transcoding sessions. The default value is 1.
Livestreams
Livestreams are the most common type of workload on the network. By default, the
flag is set to live mode -live=*true*
so that the segments of the stream will
be queued one-by-one as they arrive in a livestream.
If you want to queue all segments at once without any gaps in time, thus
replicating a video-on-demand scenario, you can switch off live mode by changing
the ‘live’ flag to =false
.
For example:
For the purposes of this example above, all other flags are omitted.
The first few lines of the output should display the source file, the output rendition profiles, and the number of concurrent sessions.
For example:
The transcoding metrics will be output in CSV format per segment as each segment gets transcoded.
For example:
When all the transcoding sessions end, metrics output will be generated.
-
Real-Time Segs Ratio
captures the number of segments transcoded in real-time. -
Real-Time Duration Ratio
captures the total time taken to transcode all segments relative to the total duration of all source segments.
You can export the per-segment CSV data to an output.csv
file to analyze it
with other tools:
Was this page helpful?