refactor: avoid errors caused by invalid small FLV files

This commit is contained in:
acgnhik 2023-01-02 12:09:40 +08:00
parent 60a8f23a14
commit 486e2ba552

View File

@ -148,6 +148,8 @@ class Postprocessor(
if video_path.endswith('.flv'):
if not await self._is_vaild_flv_file(video_path):
logger.warning(f'The flv file may be invalid: {video_path}')
if os.path.getsize(video_path) < 1024**2:
continue
if self.remux_to_mp4:
self._status = PostprocessorStatus.REMUXING
(