From ee678cf4f39ec16492dd48942f0848fa4cb06130 Mon Sep 17 00:00:00 2001 From: Moe Date: Tue, 2 Apr 2019 23:21:19 -0700 Subject: [PATCH] proper fix for recording dimensions - this fix is not backward compatible, you will need to reset your dimensions manually. default is Auto (blank). --- definitions/en_CA.js | 22 ++++++++++++++++++++-- libs/ffmpeg.js | 4 ++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/definitions/en_CA.js b/definitions/en_CA.js index dbe8bf53..7a55f954 100644 --- a/definitions/en_CA.js +++ b/definitions/en_CA.js @@ -472,6 +472,24 @@ module.exports = function(s,config,lang){ "example": "25", "possible": "" }, + { + hidden: true, + "name": "height", + "field": lang["Height"], + "description": "Height of the stream image.", + "default": "480", + "example": "720, 0 for Auto", + "possible": "" + }, + { + hidden: true, + "name": "width", + "field": lang["Width"], + "description": "Width of the stream image.", + "default": "640", + "example": "1280, 0 for Auto", + "possible": "" + }, { "name": "detail=accelerator", "field": lang.Accelerator, @@ -1478,7 +1496,7 @@ module.exports = function(s,config,lang){ "possible": "" }, { - "name": "height", + "name": "detail=record_scale_y", "field": lang["Record Height"], "description": "Height of the stream image.", "default": "", @@ -1487,7 +1505,7 @@ module.exports = function(s,config,lang){ "possible": "" }, { - "name": "width", + "name": "detail=record_scale_x", "field": lang["Record Width"], "description": "Width of the stream image.", "default": "", diff --git a/libs/ffmpeg.js b/libs/ffmpeg.js index 624dc4d0..46d3b4d4 100644 --- a/libs/ffmpeg.js +++ b/libs/ffmpeg.js @@ -659,8 +659,8 @@ module.exports = function(s,config,lang,onFinish){ x.record_video_filters = [] x.record_string = '' //record - resolution - if(e.width!==''&&e.height!==''&&e.width!=='0'&&e.height!=='0'&&!isNaN(e.width)&&!isNaN(e.height)){ - x.record_dimensions=' -s '+e.width+'x'+e.height + if(e.record_scale_x!==''&&e.record_scale_y!==''&&e.record_scale_x!=='0'&&e.record_scale_y!=='0'&&!isNaN(e.record_scale_x)&&!isNaN(e.record_scale_y)){ + x.record_dimensions=' -s '+e.record_scale_x+'x'+e.record_scale_y }else{ x.record_dimensions='' }