Fix normalization crash on files with complex subtitle sets. Also increases normalization speed by 20-30 %.
This commit is contained in:
parent
aff7ec290d
commit
e1beb8312d
2 changed files with 3 additions and 3 deletions
|
@ -53,7 +53,7 @@ class CodecPar:
|
|||
else:
|
||||
return []
|
||||
|
||||
if not self.is_valid(value):
|
||||
if self.is_valid and not self.is_valid(value):
|
||||
raise ValueError("%s is not a valid %s" %(value, self.name))
|
||||
|
||||
return [self.prefix, value]
|
||||
|
@ -484,7 +484,7 @@ subtitle_codec_router.add_codec(codec_sdrop)
|
|||
# see doc/command_assembler.png
|
||||
command = over.types.ndict()
|
||||
command.identify = Command("ffprobe", "-v", "quiet", "-print_format", "json", "-show_format", "-show_streams", "INFILE")
|
||||
command.normalize_prepass = Command("ffmpeg", "CUT_FROM", "-i", "INFILE", "-threads", str(multiprocessing.cpu_count()), "CUT_TO", "MAP", "-filter:a", "loudnorm=i=-23.0:tp=-2.0:lra=7.0:print_format=json", "-f", "null", "/dev/null")
|
||||
command.normalize_prepass = Command("ffmpeg", "CUT_FROM", "-i", "INFILE", "-threads", str(multiprocessing.cpu_count()), "CUT_TO", "MAP", "-filter:a", "loudnorm=i=-23.0:tp=-2.0:lra=7.0:print_format=json", "-vn", "-sn", "-f", "null", "/dev/null")
|
||||
command.encode_generic = Command("ffmpeg", "FPS", "CUT_FROM", "-i", "INFILE", "-threads", str(multiprocessing.cpu_count()), "CUT_TO", "MAP", "VIDEO", "AUDIO", "SUBTITLE", "OUTFILE")
|
||||
command.sub_vfilter = Command("-filter:v", "ARGS")
|
||||
command.sub_afilter = Command("-filter:a", "ARGS", "-ar", "48k")
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
major = 2 # VERSION_MAJOR_IDENTIFIER
|
||||
minor = 1 # VERSION_MINOR_IDENTIFIER
|
||||
# VERSION_LAST_MM 2.1
|
||||
patch = 2 # VERSION_PATCH_IDENTIFIER
|
||||
patch = 3 # VERSION_PATCH_IDENTIFIER
|
||||
str = ".".join(str(v) for v in (major, minor, patch))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue