mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 11:23:45 +02:00
@mediabunny/server: Properly force IDR frames when encoding AVC/HEVC on NVENC
This commit is contained in:
@@ -203,6 +203,11 @@ export class NodeAvVideoEncoder extends CustomVideoEncoder {
|
|||||||
if (isRealtime) {
|
if (isRealtime) {
|
||||||
codecContext.setOption('preset', '12');
|
codecContext.setOption('preset', '12');
|
||||||
}
|
}
|
||||||
|
} else if (this.avCodec.name === 'h264_nvenc') {
|
||||||
|
// When we force a key frame, we want a true IDR frame, not just an I frame
|
||||||
|
codecContext.setOption('forced-idr', '1');
|
||||||
|
} else if (this.avCodec.name === 'hevc_nvenc') {
|
||||||
|
codecContext.setOption('forced-idr', '1');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.codec === 'prores') {
|
if (this.codec === 'prores') {
|
||||||
|
|||||||
Reference in New Issue
Block a user