Add film grain parameter to video encoding with configurable amount
This commit is contained in:
@@ -28,6 +28,7 @@ class VideoStream(BaseModel):
|
||||
preset: int = Field(2)
|
||||
crf: int = Field(30)
|
||||
original_media_type: str = Field(None)
|
||||
film_grain: int = Field(20)
|
||||
|
||||
@cached_property
|
||||
def fps(self) -> float:
|
||||
@@ -45,7 +46,7 @@ class VideoStream(BaseModel):
|
||||
"-preset",
|
||||
str(self.preset),
|
||||
"-svtav1-params",
|
||||
"tune=0:film-grain=20:scd=1",
|
||||
f"tune=0:film-grain={self.film_grain}:scd=1",
|
||||
"-vf",
|
||||
"'scale=iw*sar:ih,setsar=1,scale=-2:ih:lanczos'",
|
||||
"-g",
|
||||
|
||||
Reference in New Issue
Block a user