irudisca 52f880f0f2 fix(telegram): use seekable file path for thumbnail & metadata extraction (#225)
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>
2026-07-23 18:28:03 +08:00
2026-01-16 22:27:40 +08:00
2025-12-27 16:01:41 +08:00
2026-01-16 22:27:17 +08:00
2026-06-25 16:30:21 +08:00
2026-06-25 16:30:21 +08:00
2024-11-09 09:39:18 +08:00

Save Any Bot

English | 简体中文

Save Any Telegram File to Anywhere 📂. Support restrict saving content and beyond telegram.

Release Date tag Build Status Stars Downloads Issues Pull Requests License

🎯 Features

  • Support documents / videos / photos / stickers… and even Telegraph
  • Bypass "restrict saving content" media
  • Batch download
  • Streaming transfer
  • Multi-user support
  • Auto organize files based on storage rules
  • Watch specified chats and auto-save messages, with filters
  • Transfer files between different storage backends
  • Integrate with yt-dlp to download and save media from 1000+ websites
  • Aria2 integration to download files from URLs/magnets and save to storages
  • Write JS parser plugins to save files from almost any website
  • Storage backends:
    • Alist
    • S3
    • WebDAV
    • Local filesystem
    • Rclone (via command line)
    • Telegram (re-upload to specified chats)

📦 Quick Start

Create a config.toml file with the following content:

lang = "en" # Language setting, "en" for English
[telegram]
token = "" # Your bot token, obtained from @BotFather
[telegram.proxy]
# Enable proxy for Telegram
enable = false
url = "socks5://127.0.0.1:7890"

[[storages]]
name = "Local Disk"
type = "local"
enable = true
base_path = "./downloads"

[[users]]
id = 114514 # Your Telegram account id
storages = []
blacklist = true

Run Save Any Bot with Docker:

docker run -d --name saveany-bot \
    -v ./config.toml:/app/config.toml \
    -v ./downloads:/app/downloads \
    ghcr.io/krau/saveany-bot:latest

Please read the docs for more configuration options and usage.

Sponsors

This project is supported by YxVM and NodeSupport.

If this project is helpful to you, consider sponsoring me via:

Thanks To

Contact

  • Group
  • Discussion
  • PersonalChannel
Description
Save Any Telegram File to Anywhere 📂 (Alist, Disk, Webdav, S3, Rclone...) . Support restrict saving content and files beyond telegram.
Readme AGPL-3.0 92 MiB
Languages
Go 98.9%
JavaScript 0.9%
Dockerfile 0.1%