Added H.262 remux detection

This commit is contained in:
DataHoarder 2022-06-17 09:34:07 +02:00
parent 49b78820a9
commit 01d7ddd1be
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk

View file

@ -1,7 +1,7 @@
// ==UserScript==
// @name AnimeBytes Mediainfo Improvements
// @author WeebDataHoarder
// @version 1.29.2
// @version 1.29.3
// @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
@ -637,6 +637,22 @@ function extractFromMediainfo(tags, mediainfo, warnings, fileName, fileList, sou
}
}
//Detect probably H262 remuxes
try{
if(
!("remux" in tags)
&& !("encoding_settings" in video) && !("writing_library" in video)
&& video.codec_id === "V_MPEG2" && video.format_profile === "Main@Main"
&& ((video.width === "720 pixels" && video.height === "480 pixels") || (video.width === "720 pixels" && video.height === "576 pixels"))
&& (!("original_source_medium" in video) || video.original_source_medium === "DVD-Video")
&& (!("bits_pixel_frame" in video) || parseFloat(video.bits_pixel_frame) > 0.5)
){
tags.remux = "probably";
}
}catch (e){
}
//Detect probably H264 remuxes
try{
if(