mirror of
https://github.com/glomatico/gamdl.git
synced 2026-06-13 12:15:18 +03:00
Add music video codec enums and FOURCC mapping
This commit is contained in:
@@ -15,3 +15,8 @@ class CoverFormat(Enum):
|
||||
JPG = "jpg"
|
||||
PNG = "png"
|
||||
RAW = "raw"
|
||||
|
||||
|
||||
class RemuxFormatMusicVideo(Enum):
|
||||
M4V = "m4v"
|
||||
MP4 = "mp4"
|
||||
|
||||
@@ -29,7 +29,7 @@ DRM_DEFAULT_KEY_MAPPING = {
|
||||
),
|
||||
"com.apple.streamingkeydelivery": "skd://itunes.apple.com/P000000000/s1/e1",
|
||||
}
|
||||
MP4_FORMAT_CODECS = ["ec-3"]
|
||||
MP4_FORMAT_CODECS = ["ec-3", "hvc1", "audio-atmos", "audio-ec3"]
|
||||
SONG_CODEC_REGEX_MAP = {
|
||||
"aac": r"audio-stereo-\d+",
|
||||
"aac-he": r"audio-HE-stereo-\d+",
|
||||
@@ -41,3 +41,8 @@ SONG_CODEC_REGEX_MAP = {
|
||||
"ac3": r"audio-ac3-.*",
|
||||
"alac": r"audio-alac-.*",
|
||||
}
|
||||
|
||||
FOURCC_MAP = {
|
||||
"h264": "avc1",
|
||||
"h265": "hvc1",
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
from enum import Enum
|
||||
|
||||
from .constants import MEDIA_RATING_STR_MAP, MEDIA_TYPE_STR_MAP, LEGACY_SONG_CODECS
|
||||
from .constants import (
|
||||
FOURCC_MAP,
|
||||
LEGACY_SONG_CODECS,
|
||||
MEDIA_RATING_STR_MAP,
|
||||
MEDIA_TYPE_STR_MAP,
|
||||
)
|
||||
|
||||
|
||||
class SyncedLyricsFormat(Enum):
|
||||
@@ -54,3 +59,12 @@ class SongCodec(Enum):
|
||||
|
||||
def is_legacy(self) -> bool:
|
||||
return self.value in LEGACY_SONG_CODECS
|
||||
|
||||
|
||||
class MusicVideoCodec(Enum):
|
||||
H264 = "h264"
|
||||
H265 = "h265"
|
||||
ASK = "ask"
|
||||
|
||||
def fourcc(self) -> str:
|
||||
return FOURCC_MAP[self.value]
|
||||
|
||||
Reference in New Issue
Block a user