mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-08-06 13:03:19 +08:00
extractFrameAt() and getVideoMetadata() piped the media into ffmpeg/ffprobe via pipe:0. A pipe is not seekable, so ffmpeg cannot decode non-faststart MP4s whose moov atom sits at the END of the file (very common for yt-dlp / HLS-merged downloads): the frame grab and probe silently fail, and the video is uploaded with no thumbnail (and, for non-mp4 containers, no dimensions). Hand ffmpeg/ffprobe a seekable file path instead. When the reader already is an *os.File we use it directly; otherwise we spool to a temp file and clean it up. Verified with an A/B upload of a 56 MB non-faststart clip: stock build produced no thumbnail, patched build produced a correct thumbnail. Co-authored-by: pennyucloud <valentino@pennyu.co.id> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>