diff --git a/lbry/extras/daemon/daemon.py b/lbry/extras/daemon/daemon.py index 6552f5eb0..b1717283d 100644 --- a/lbry/extras/daemon/daemon.py +++ b/lbry/extras/daemon/daemon.py @@ -3142,11 +3142,8 @@ class Daemon(metaclass=JSONRPCServerType): f"Use --allow-duplicate-name flag to override." ) - try: - file_path = await self._video_file_analyzer.verify_or_repair(validate_file, optimize_file, file_path) - except ValueError: - pass # it's not a video file - + file_path = await self._video_file_analyzer.verify_or_repair(validate_file, optimize_file, + file_path, ignore_non_video=True) claim = Claim() claim.stream.update(file_path=file_path, sd_hash='0' * 96, **kwargs) tx = await Transaction.claim_create( diff --git a/lbry/file_analysis.py b/lbry/file_analysis.py index 6e2964a66..b5714af86 100644 --- a/lbry/file_analysis.py +++ b/lbry/file_analysis.py @@ -47,7 +47,7 @@ class VideoFileAnalyzer: return await self._verify_executable("ffprobe") version = await self._verify_executable("ffmpeg") - self._which = shutil.which("ffmpeg") + self._which = shutil.which(os.path.join(self._conf.ffmpeg_folder, "ffmpeg")) self._ffmpeg_installed = True log.debug("Using %s at %s", version.splitlines()[0].split(" Copyright")[0], self._which) @@ -286,12 +286,17 @@ class VideoFileAnalyzer: return scan_data - async def verify_or_repair(self, validate, repair, file_path): + async def verify_or_repair(self, validate, repair, file_path, ignore_non_video=False): if not validate and not repair: return file_path await self._verify_ffmpeg_installed() - scan_data = await self._get_scan_data(validate, file_path) + try: + scan_data = await self._get_scan_data(validate, file_path) + except ValueError: + if ignore_non_video: + return file_path + raise fast_start_msg = await self._verify_fast_start(scan_data, file_path) log.debug("Analyzing %s:", file_path)