File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -143,9 +143,7 @@ def get_raw_video_file_info(filename: str) -> Dict[str, Any]:
143143 framerate_pattern = r"(?P<framerate>[\d\.]+)(?:Hz|fps)"
144144 bitdepth_pattern = r"(?P<bitdepth>\d+)bit"
145145 formats = "|" .join (video_formats .keys ())
146- format_pattern = (
147- rf"(?P<format>{ formats } )(?:[p_]?(?P<bitdepth2>\d+)(?P<endianness>LE|BE))?"
148- )
146+ format_pattern = rf"(?P<format>{ formats } )(?:[p_]?(?:(?P<bitdepth2>\d+)|(?P<chroma_sub>\d{ 3 } [p]))?(?P<endianness>LE|BE))?"
149147 extension_pattern = rf"(?P<extension>{ '|' .join (file_extensions )} )"
150148 cut_pattern = "([0-9]+)-([0-9]+)"
151149
@@ -166,6 +164,9 @@ def get_raw_video_file_info(filename: str) -> Dict[str, Any]:
166164 if not info :
167165 return {}
168166
167+ if "bitdepth" not in info :
168+ info ["bitdepth" ] = "8"
169+
169170 if info ["bitdepth" ] and info ["bitdepth2" ] and info ["bitdepth" ] != info ["bitdepth2" ]:
170171 raise ValueError (f'Filename "{ filename } " specifies bit-depth twice.' )
171172
You can’t perform that action at this time.
0 commit comments