Compare commits
	
		
			2 Commits
		
	
	
		
			7314c18ca4
			...
			e7ff13c14b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| e7ff13c14b | |||
| 805d3eb702 | 
							
								
								
									
										20
									
								
								dist/main.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								dist/main.js
									
									
									
									
										vendored
									
									
								
							@ -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;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -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": {
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user