Initial commit

This commit is contained in:
2026-03-19 12:13:02 -04:00
commit b9e7e1bfca
23 changed files with 1021 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import regex as re
from parsers.generic import GenericParser
from parsers.generic.parsers import CheckParser
from parsers.generic.watfag import VideoCodec
checks = {
re.compile(r"avc|[hx][\. -]?264", re.IGNORECASE): VideoCodec.AVC,
re.compile(r"hevc|[hx][\. -]?265", re.IGNORECASE): VideoCodec.HEVC,
re.compile(r"vp9", re.IGNORECASE): VideoCodec.VP9,
re.compile(r"av1", re.IGNORECASE): VideoCodec.AV1,
re.compile(r"mpeg-4|mpeg4|mp4v|xvid", re.IGNORECASE): VideoCodec.XVID
}
class VideoCodecParser(CheckParser, GenericParser):
def __init__(self, release):
super().__init__(release)
self.checks = checks
self.remove_checks = [] # No remove checks for video codec
self.attribute_name = "video_codec"