diff --git a/converter/converter.py b/converter/converter.py index 8fee5be..44c6862 100644 --- a/converter/converter.py +++ b/converter/converter.py @@ -90,6 +90,7 @@ class MediaDetector: ] result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=True) data = json.loads(result.stdout) + logging.debug("detect_media_type ffprobe output: %s", data) streams = data.get("streams", []) video_streams = [] @@ -104,7 +105,7 @@ class MediaDetector: # If there is exactly one video stream with codec 'mjpeg' and audio is present, treat as audio if len(video_streams) == 1 and audio_count > 0: codec_name = video_streams[0].get("codec_name", "") - if codec_name.lower() == "mjpeg": + if codec_name.lower() in ("mjpeg", "jpeg", "jpg", "png", "bmp", "gif", "tiff", "heif", "heic"): return "audio" # Otherwise, if any video stream is not an attached picture, treat as video