-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed regex search for loudnorm stats (#38)
- Loading branch information
Showing
14 changed files
with
203 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
import enum | ||
from enum import Enum | ||
|
||
|
||
# The Bitrate Mode Enumerated List | ||
# Bitrate Mode determines the rate control argument values for our commands | ||
# Further Reading: https://developers.google.com/media/vp9/bitrate-modes | ||
class BitrateMode(enum.Enum): | ||
def __new__(cls, value, first_pass_rate_control, second_pass_rate_control): | ||
obj = object.__new__(cls) | ||
obj._value_ = value | ||
obj.first_pass_rate_control = first_pass_rate_control | ||
obj.second_pass_rate_control = second_pass_rate_control | ||
return obj | ||
class BitrateMode(Enum): | ||
def __new__(cls, value, first_pass_rate_control, second_pass_rate_control): | ||
obj = object.__new__(cls) | ||
obj._value_ = value | ||
obj.first_pass_rate_control = first_pass_rate_control | ||
obj.second_pass_rate_control = second_pass_rate_control | ||
return obj | ||
|
||
# Constant Bitrate Mode | ||
CBR = (0, lambda cbr_bitrate, cbr_max_bitrate, crf: f'-b:v {cbr_bitrate} -maxrate {cbr_max_bitrate} -qcomp 0.3', | ||
lambda cbr_bitrate, cbr_max_bitrate, | ||
crf: f'-b:v {cbr_bitrate} -maxrate {cbr_max_bitrate} -bufsize 6000k -qcomp 0.3') | ||
# Variable Bitrate Mode / Constant Quality Mode | ||
VBR = (1, lambda cbr_bitrate, cbr_max_bitrate, crf: f'-crf {crf} -b:v 0 -qcomp 0.7', | ||
lambda cbr_bitrate, cbr_max_bitrate, crf: f'-crf {crf} -b:v 0 -qcomp 0.7') | ||
# Constrained Quality Mode | ||
CQ = (2, lambda cbr_bitrate, cbr_max_bitrate, crf: f'-crf {crf} -b:v {cbr_bitrate} -qcomp 0.7', | ||
lambda cbr_bitrate, cbr_max_bitrate, crf: f'-crf {crf} -b:v {cbr_bitrate} -qcomp 0.7') | ||
# Constant Bitrate Mode | ||
CBR = ( | ||
0, | ||
lambda cbr_bitrate, cbr_max_bitrate, crf: f'-b:v {cbr_bitrate} -maxrate {cbr_max_bitrate} -qcomp 0.3', | ||
lambda cbr_bitrate, cbr_max_bitrate, crf: f'-b:v {cbr_bitrate} -maxrate {cbr_max_bitrate} -bufsize 6000k -qcomp 0.3' | ||
) | ||
# Variable Bitrate Mode / Constant Quality Mode | ||
VBR = ( | ||
1, | ||
lambda cbr_bitrate, cbr_max_bitrate, crf: f'-crf {crf} -b:v 0 -qcomp 0.7', | ||
lambda cbr_bitrate, cbr_max_bitrate, crf: f'-crf {crf} -b:v 0 -qcomp 0.7' | ||
) | ||
# Constrained Quality Mode | ||
CQ = ( | ||
2, | ||
lambda cbr_bitrate, cbr_max_bitrate, crf: f'-crf {crf} -b:v {cbr_bitrate} -qcomp 0.7', | ||
lambda cbr_bitrate, cbr_max_bitrate, crf: f'-crf {crf} -b:v {cbr_bitrate} -qcomp 0.7' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.