This commit is contained in:
matty 2024-03-07 20:22:56 -05:00
parent 33da091ba7
commit 2d0694dc8c

View File

@ -38,7 +38,7 @@ export async function register({settingsManager, peertubeHelpers, transcodingMan
logger = peertubeHelpers.logger logger = peertubeHelpers.logger
transcodingManager = transcode transcodingManager = transcode
logger.info("Registering peertube-plugin-hardware-encode"); logger.info("Registering peertube-plugin-nctv-nvenc-transcode");
const encoder = 'h264_nvenc' const encoder = 'h264_nvenc'
const profileName = 'nvenc' const profileName = 'nvenc'
@ -134,7 +134,7 @@ export async function register({settingsManager, peertubeHelpers, transcodingMan
} }
export async function unregister() { export async function unregister() {
logger.info("Unregistering peertube-plugin-hardware-encode") logger.info("Unregistering peertube-plugin-nctv-nvenc-transcode")
transcodingManager.removeAllProfilesAndEncoderPriorities() transcodingManager.removeAllProfilesAndEncoderPriorities()
return true return true
} }
@ -212,6 +212,7 @@ async function vodBuilder(params: EncoderOptionsBuilderParams) : Promise<Encoder
outputOptions: [ outputOptions: [
`-preset ${pluginSettings.vodQuality}`, `-preset ${pluginSettings.vodQuality}`,
`-b:v${streamSuffix} ${targetBitrate}`, `-b:v${streamSuffix} ${targetBitrate}`,
`-c:v${streamSuffix} h264_nvenc`,
`-bufsize ${targetBitrate * 2}`, `-bufsize ${targetBitrate * 2}`,
`-bf 4` `-bf 4`
] ]
@ -249,6 +250,7 @@ async function liveBuilder(params: EncoderOptionsBuilderParams) : Promise<Encode
`-r:v${streamSuffix} ${fps}`, `-r:v${streamSuffix} ${fps}`,
`-profile:v${streamSuffix} high`, `-profile:v${streamSuffix} high`,
`-g:v${streamSuffix} ${fps*2}`, `-g:v${streamSuffix} ${fps*2}`,
`-c:v${streamSuffix} h264_nvenc`,
`-b:v${streamSuffix} ${targetBitrate}`, `-b:v${streamSuffix} ${targetBitrate}`,
`-bufsize ${targetBitrate * 2}`, `-bufsize ${targetBitrate * 2}`,
`-bf 4` `-bf 4`