...
Code Block |
---|
|
{
"uri": "transcoder://tcode1",
"remoteStreamName": "test",
"localStreamName": "testT",
"encoder": {
"width": 640,
"height": 480,
"keyFrameInterval": 30,
"fps": 30,
"watermark": "/opt/media/Test.png"
}
} |
Multithreaded encoding
Since build 5.2.816 multithreaded strems encoding is supported using OpenH264 encoder. Encoder threads count can be set with the following parameter
Code Block |
---|
|
video_encoder_max_threads=2 |
By default, streams will be encoded in 2 threads.
Multi threaded encoding is enabled depending on transcoder output stream resolution. The threshold can be set with the following parameter
Code Block |
---|
|
video_encoder_second_thread_threshold=777000 |
The threshold value is the product of the picture width multiplication to the height. Therefore, 720p and higher resolutions wiil be encoded in multiple threads. This threshold can be lowered if necessary. For example, to encode 480p pictures in multiple threads, set the following value
Code Block |
---|
|
video_encoder_second_thread_threshold=408950 |