Compare commits

...

2 Commits

Author SHA1 Message Date
e7ff13c14b bump version 2024-04-14 16:32:30 -04:00
805d3eb702 remove hevc profile enablement - no longer needed 2024-04-14 16:32:11 -04:00
2 changed files with 5 additions and 17 deletions

20
dist/main.js vendored
View File

@ -7,7 +7,6 @@ const DEFAULT_HARDWARE_DECODE = false;
const DEFAULT_VOD_QUALITY = "p7"; const DEFAULT_VOD_QUALITY = "p7";
const DEFAULT_HEVC_PROFILE = "main10"; const DEFAULT_HEVC_PROFILE = "main10";
const DEFAULT_LIVE_QUALITY = "hq"; const DEFAULT_LIVE_QUALITY = "hq";
const DEFAULT_HEVC_ENABLED = false;
const DEFAULT_CQ_H264 = 26; const DEFAULT_CQ_H264 = 26;
const DEFAULT_CQ_HEVC = 28; const DEFAULT_CQ_HEVC = 28;
const DEFAULT_BITRATES = new Map([ const DEFAULT_BITRATES = new Map([
@ -24,7 +23,6 @@ let pluginSettings = {
hardwareDecode: DEFAULT_HARDWARE_DECODE, hardwareDecode: DEFAULT_HARDWARE_DECODE,
vodQuality: DEFAULT_VOD_QUALITY, vodQuality: DEFAULT_VOD_QUALITY,
liveQuality: DEFAULT_LIVE_QUALITY, liveQuality: DEFAULT_LIVE_QUALITY,
hevcEnabled: DEFAULT_HEVC_ENABLED,
hevcProfile: DEFAULT_HEVC_PROFILE, hevcProfile: DEFAULT_HEVC_PROFILE,
cqH264: DEFAULT_CQ_H264, cqH264: DEFAULT_CQ_H264,
cqHEVC: DEFAULT_CQ_HEVC, cqHEVC: DEFAULT_CQ_HEVC,
@ -59,14 +57,6 @@ async function register({ settingsManager, peertubeHelpers, transcodingManager:
default: DEFAULT_HARDWARE_DECODE, default: DEFAULT_HARDWARE_DECODE,
private: false private: false
}); });
registerSetting({
name: 'hevc-enabled',
label: 'Enable H265 NVENC',
type: 'input-checkbox',
descriptionHTML: 'Enables H265 NVENC (experimental)',
default: DEFAULT_HEVC_ENABLED,
private: false
});
registerSetting({ registerSetting({
name: 'cq-h264', name: 'cq-h264',
label: 'CQ Value for H264_nvenc', label: 'CQ Value for H264_nvenc',
@ -161,7 +151,6 @@ async function loadSettings(settingsManager) {
pluginSettings.vodQuality = parseInt(await settingsManager.getSetting('vod-quality')) || DEFAULT_VOD_QUALITY; pluginSettings.vodQuality = parseInt(await settingsManager.getSetting('vod-quality')) || DEFAULT_VOD_QUALITY;
pluginSettings.liveQuality = parseInt(await settingsManager.getSetting('live-quality')) || DEFAULT_LIVE_QUALITY; pluginSettings.liveQuality = parseInt(await settingsManager.getSetting('live-quality')) || DEFAULT_LIVE_QUALITY;
pluginSettings.hevcProfile = parseInt(await settingsManager.getSetting('hevc-profile')) || DEFAULT_HEVC_PROFILE; pluginSettings.hevcProfile = parseInt(await settingsManager.getSetting('hevc-profile')) || DEFAULT_HEVC_PROFILE;
pluginSettings.hevcEnabled = await settingsManager.getSetting('hevc-enabled') || DEFAULT_HEVC_ENABLED;
pluginSettings.cqH264 = parseInt(await settingsManager.getSetting('cq-h264')) || DEFAULT_CQ_H264; pluginSettings.cqH264 = parseInt(await settingsManager.getSetting('cq-h264')) || DEFAULT_CQ_H264;
pluginSettings.cqHEVC = parseInt(await settingsManager.getSetting('cq-hevc')) || DEFAULT_CQ_HEVC; pluginSettings.cqHEVC = parseInt(await settingsManager.getSetting('cq-hevc')) || DEFAULT_CQ_HEVC;
@ -174,7 +163,6 @@ async function loadSettings(settingsManager) {
logger.info(`Hardware decode: ${pluginSettings.hardwareDecode}`); logger.info(`Hardware decode: ${pluginSettings.hardwareDecode}`);
logger.info(`VOD Quality: ${pluginSettings.vodQuality}`); logger.info(`VOD Quality: ${pluginSettings.vodQuality}`);
logger.info(`Live Quality: ${pluginSettings.liveQuality}`); logger.info(`Live Quality: ${pluginSettings.liveQuality}`);
logger.info(`HEVC enabled: ${pluginSettings.hevcEnabled}`);
logger.info(`HEVC profile: ${pluginSettings.hevcProfile}`); logger.info(`HEVC profile: ${pluginSettings.hevcProfile}`);
} }
function printResolution(resolution) { function printResolution(resolution) {
@ -216,7 +204,7 @@ async function vodBuilder(params) {
if (targetBitrate > inputBitrate) { if (targetBitrate > inputBitrate) {
targetBitrate = inputBitrate; targetBitrate = inputBitrate;
} }
logger.info(`Building encoder options, received ${JSON.stringify(params)}, HEVC: ${pluginSettings.hevcEnabled}`); logger.info(`Building encoder options, received ${JSON.stringify(params)}`);
if (shouldInitVaapi && streamNum != undefined) { if (shouldInitVaapi && streamNum != undefined) {
latestStreamNum = streamNum; latestStreamNum = streamNum;
} }
@ -249,7 +237,7 @@ async function hevcVODBuilder(params) {
if (targetBitrate > inputBitrate) { if (targetBitrate > inputBitrate) {
targetBitrate = inputBitrate; targetBitrate = inputBitrate;
} }
logger.info(`Building encoder options, received ${JSON.stringify(params)}, HEVC: ${pluginSettings.hevcEnabled}`); logger.info(`Building encoder options, received ${JSON.stringify(params)}`);
if (shouldInitVaapi && streamNum != undefined) { if (shouldInitVaapi && streamNum != undefined) {
latestStreamNum = streamNum; latestStreamNum = streamNum;
} }
@ -283,7 +271,7 @@ async function hevcLiveBuilder(params) {
if (targetBitrate > inputBitrate) { if (targetBitrate > inputBitrate) {
targetBitrate = inputBitrate; targetBitrate = inputBitrate;
} }
logger.info(`Building encoder options, received ${JSON.stringify(params)}, HEVC: ${pluginSettings.hevcEnabled}`); logger.info(`Building encoder options, received ${JSON.stringify(params)}`);
if (shouldInitVaapi && streamNum != undefined) { if (shouldInitVaapi && streamNum != undefined) {
latestStreamNum = streamNum; latestStreamNum = streamNum;
} }
@ -319,7 +307,7 @@ async function liveBuilder(params) {
if (targetBitrate > inputBitrate) { if (targetBitrate > inputBitrate) {
targetBitrate = inputBitrate; targetBitrate = inputBitrate;
} }
logger.info(`Building encoder options, received ${JSON.stringify(params)}, HEVC: ${pluginSettings.hevcEnabled}`); logger.info(`Building encoder options, received ${JSON.stringify(params)}`);
if (shouldInitVaapi && streamNum != undefined) { if (shouldInitVaapi && streamNum != undefined) {
latestStreamNum = streamNum; latestStreamNum = streamNum;
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "peertube-plugin-nctv-nvenc-transcode", "name": "peertube-plugin-nctv-nvenc-transcode",
"version": "1.1.1", "version": "1.2.0",
"license": "MIT", "license": "MIT",
"description": "Plugin that adds transcode profiles which use NVIDIA NVENC for hardware acceleration", "description": "Plugin that adds transcode profiles which use NVIDIA NVENC for hardware acceleration",
"engine": { "engine": {