ADD Cli options to change defaults
now support changing crf, preset and original media type
This commit is contained in:
@@ -24,7 +24,9 @@ class VideoStream(BaseModel):
|
||||
avg_frame_rate: str = Field(None, alias="avg_frame_rate")
|
||||
codec_name: str = Field(None)
|
||||
disposition: Disposition
|
||||
tags: Tags
|
||||
tags: Tags | None = Field(None)
|
||||
preset: int = Field(2)
|
||||
crf: int = Field(30)
|
||||
|
||||
@cached_property
|
||||
def fps(self) -> float:
|
||||
@@ -38,9 +40,9 @@ class VideoStream(BaseModel):
|
||||
"-c:v",
|
||||
"libsvtav1",
|
||||
"-crf",
|
||||
"30",
|
||||
str(self.crf),
|
||||
"-preset",
|
||||
"6",
|
||||
str(self.preset),
|
||||
"-svtav1-params",
|
||||
"tune=0:film-grain=20:scd=1",
|
||||
"-vf",
|
||||
@@ -56,7 +58,7 @@ class AudioStream(BaseModel):
|
||||
sample_fmt: str
|
||||
channel_layout: str
|
||||
disposition: Disposition
|
||||
tags: Tags
|
||||
tags: Tags | None = Field(None)
|
||||
|
||||
def cmd_flags(self, index: int) -> list[str]:
|
||||
side_loaded = []
|
||||
@@ -81,7 +83,7 @@ class SubtitleStream(BaseModel):
|
||||
index: int
|
||||
codec_name: str
|
||||
disposition: Disposition
|
||||
tags: Tags
|
||||
tags: Tags | None = Field(None)
|
||||
|
||||
def cmd_flags(self, index: int) -> list[str]:
|
||||
return ["-map", f"0:s:{index}", f"-c:s:{index}", "copy"] + [
|
||||
|
||||
Reference in New Issue
Block a user