yeehaw
This commit is contained in:
parent
dcddc6f60b
commit
606d1d6377
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "peertube-plugin-hardware-transcode-nvenc",
|
||||
"version": "0.0.1",
|
||||
"name": "peertube-plugin-nctv-nvenc-transcode",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"description": "Plugin that adds transcode profiles which use NVIDIA NVENC for hardware acceleration",
|
||||
"engine": {
|
||||
@ -10,9 +10,9 @@
|
||||
"peertube",
|
||||
"plugin"
|
||||
],
|
||||
"homepage": "https://github.com/ryanho/peertube-plugin-hardware-transcode-nvenc",
|
||||
"homepage": "https://gitea.nicecrew.digital/matty/peertube-plugin-nctv-nvenc-transcode",
|
||||
"author": "ryanho",
|
||||
"bugs": "https://github.com/ryanho/peertube-plugin-hardware-transcode-nvenc/issues",
|
||||
"bugs": "https://gitea.nicecrew.digital/matty/peertube-plugin-nctv-nvenc-transcode/issues",
|
||||
"library": "./dist/main.js",
|
||||
"files": [
|
||||
"/dist"
|
||||
|
15
src/main.ts
15
src/main.ts
@ -76,7 +76,8 @@ export async function register({settingsManager, peertubeHelpers, transcodingMan
|
||||
{ label: 'medium (default)', value: '15' },
|
||||
{ label: 'slow', value: '16' },
|
||||
{ label: 'slower', value: '17' },
|
||||
{ label: 'slowest', value: '18' }
|
||||
{ label: 'slowest', value: '18' },
|
||||
{ label: 'nctv', value: 'p7' }
|
||||
],
|
||||
|
||||
descriptionHTML: 'This parameter controls the speed / quality tradeoff. Slower speed mean better quality. Faster speed mean lower quality. This setting is hardware dependent, you may need to experiment to find the best value for your hardware.',
|
||||
@ -174,12 +175,11 @@ function printResolution(resolution : VideoResolution) : string {
|
||||
function buildInitOptions() {
|
||||
if (pluginSettings.hardwareDecode) {
|
||||
return [
|
||||
'-hwaccel cuda',
|
||||
'-hwaccel_output_format cuda'
|
||||
'-vcodec h264_nvenc'
|
||||
]
|
||||
} else {
|
||||
return [
|
||||
'-hwaccel cuda'
|
||||
'-vcodec h264_nvenc'
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -210,7 +210,8 @@ async function vodBuilder(params: EncoderOptionsBuilderParams) : Promise<Encoder
|
||||
outputOptions: [
|
||||
`-preset ${pluginSettings.vodQuality}`,
|
||||
`-b:v${streamSuffix} ${targetBitrate}`,
|
||||
`-bufsize ${targetBitrate * 2}`
|
||||
`-bufsize ${targetBitrate * 2}`,
|
||||
`-bf 4`
|
||||
]
|
||||
}
|
||||
logger.info(`EncoderOptions: ${JSON.stringify(options)}`)
|
||||
@ -245,10 +246,10 @@ async function liveBuilder(params: EncoderOptionsBuilderParams) : Promise<Encode
|
||||
`-preset ${pluginSettings.liveQuality}`,
|
||||
`-r:v${streamSuffix} ${fps}`,
|
||||
`-profile:v${streamSuffix} high`,
|
||||
`-level:v${streamSuffix} 3.1`,
|
||||
`-g:v${streamSuffix} ${fps*2}`,
|
||||
`-b:v${streamSuffix} ${targetBitrate}`,
|
||||
`-bufsize ${targetBitrate * 2}`
|
||||
`-bufsize ${targetBitrate * 2}`,
|
||||
`-bf 4`
|
||||
]
|
||||
}
|
||||
logger.info(`EncoderOptions: ${JSON.stringify(options)}`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user