Lower REMUX* threshold
This commit is contained in:
parent
fd2fe6c5db
commit
a9c6d13f37
|
@ -1,7 +1,7 @@
|
|||
// ==UserScript==
|
||||
// @name AnimeBytes Mediainfo Improvements
|
||||
// @author WeebDataHoarder
|
||||
// @version 1.23.0
|
||||
// @version 1.23.1
|
||||
// @downloadURL https://git.gammaspectra.live/WeebDataHoarder/userscripts/raw/branch/master/AnimeBytes/ab-mediainfo.user.js
|
||||
// @updateURL https://git.gammaspectra.live/WeebDataHoarder/userscripts/raw/branch/master/AnimeBytes/ab-mediainfo.user.js
|
||||
// @description AnimeBytes Mediainfo Improvements. Adds several listing and matching releases against mediainfo utilities. MIT license
|
||||
|
@ -72,7 +72,7 @@ function getEntryLine(tags, messages){
|
|||
codec.textContent = getLineTagEntry(tags.videoCodec, false);
|
||||
span.append(codec);
|
||||
if("videoEncoder" in tags && settings.getSetting("showEncodingDetails")){
|
||||
span.append(" (" + tags.videoEncoder + ("videoCRF" in tags ? " " + tags.videoCRF : "") + ("videoBitrate" in tags ? " " + tags.videoBitrate : "") + ")");
|
||||
span.append(" (" + tags.videoEncoder + ("videoEncodeMode" in tags ? " " + tags.videoEncodeMode : "") + ("videoEncodeRateControl" in tags ? " " + tags.videoEncodeRateControl : "") + ")");
|
||||
}
|
||||
entries.video.push(span);
|
||||
}
|
||||
|
@ -530,7 +530,7 @@ function extractFromMediainfo(tags, mediainfo, warnings, fileName, fileList, sou
|
|||
)
|
||||
&& width === 1920 && height === 1080 &&
|
||||
video.frame_rate_mode === "Constant" &&
|
||||
(!("bits_pixel_frame" in video) || parseFloat(video.bits_pixel_frame) > 0.5)
|
||||
(!("bits_pixel_frame" in video) || parseFloat(video.bits_pixel_frame) > 0.4)
|
||||
){
|
||||
tags.remux = "probably";
|
||||
}
|
||||
|
@ -561,23 +561,23 @@ function extractFromMediainfo(tags, mediainfo, warnings, fileName, fileList, sou
|
|||
|
||||
if("encoding_settings" in video){
|
||||
let match = null;
|
||||
if(video.encoding_settings.match(/rc=crf/) !== null){
|
||||
tags.videoCRF = "crf";
|
||||
if((match = video.encoding_settings.match(/ rc=(?<rc>[0-9a-z]+)/i)) !== null){
|
||||
tags.videoEncodeMode = match.groups.rc.toLowerCase();
|
||||
}
|
||||
if((match = video.encoding_settings.match(/crf=(?<crf>[0-9.]+)/)) !== null){
|
||||
tags.videoCRF = "crf";
|
||||
tags.videoBitrate = parseFloat(match.groups.crf).toFixed(1);
|
||||
tags.videoEncodeMode = "crf";
|
||||
tags.videoEncodeRateControl = parseFloat(match.groups.crf).toFixed(1);
|
||||
}else if(video.encoding_settings.match(/rc=cqp/) !== null && (match = video.encoding_settings.match(/ qp=(?<qp>[0-9.]+)/)) !== null){
|
||||
tags.videoCRF = "cqp";
|
||||
tags.videoBitrate = parseFloat(match.groups.qp).toFixed(1);
|
||||
tags.videoEncodeMode = "cqp";
|
||||
tags.videoEncodeRateControl = parseFloat(match.groups.qp).toFixed(1);
|
||||
if(settings.getSetting("warning_encodeSettings")){
|
||||
warnings.video.push(["info", "Found encode using rc=cqp (Constant QP) mode on encoding settings"]);
|
||||
}
|
||||
}else if((match = video.encoding_settings.match(/bitrate=(?<bitrate>[0-9.]+)/)) !== null){
|
||||
tags.videoBitrate = parseInt(match.groups.bitrate) + "k";
|
||||
tags.videoEncodeRateControl = parseInt(match.groups.bitrate) + "k";
|
||||
}
|
||||
if(video.encoding_settings.match(/rc=2pass/) !== null){
|
||||
tags.videoCRF = "2pass";
|
||||
tags.videoEncodeMode = "2pass";
|
||||
}
|
||||
|
||||
if(!("remux" in tags) && video.codec_id === "V_MPEG4/ISO/AVC" && (match = video.format_profile.match(/(?<profile>(baseline|main)[ 0-9]*)@/i)) !== null){
|
||||
|
|
Loading…
Reference in a new issue