ihmily/streamcap

By ihmily

Updated 28 days ago

Live Stream Automatic Recording Tool | 40+平台直播录制客户端 · 支持监控/定时/转码

Image
Networking
Web servers
1

10K+

ihmily/streamcap repository overview

What is StreamCap?

StreamCap is a versatile, FFmpeg and StreamGet-based client for recording live streams across 40+ domestic and international platforms, including Douyin, Twitch, Bilibili, YouTube, and more. It supports batch recording, loop monitoring, scheduled tasks, and automatic transcoding, making it ideal for archiving live broadcasts or creating content effortlessly.

Key Features:

  • Supports 40+ platforms (e.g., Douyin, Twitch, Bilibili, YouTube).
  • Loop monitoring: Automatically records when a stream goes live.
  • Scheduled tasks: Monitors streams within a specified time range.
  • Multiple output formats: ts, flv, mkv, mov, mp4, mp3, m4a.
  • Automatic transcoding to mp4 after recording.
  • Notification support for live stream status updates.

 

How to Run StreamCap with Docker:

Note: The project depends on the config, locales, and assets directories. Please either run the project from the root directory or manually copy these folders into the Docker image; otherwise, the application may fail to start.

1.Clone the Project:
First, clone the latest code from GitHub or download the main branch manually:

git clone https://github.com/ihmily/StreamCap.git

2.Pull the Docker Image:
Pull the latest streamcap image from Docker Hub:

docker pull ihmily/streamcap

3.Run the Container:

(1) Navigate into the project directory and set up the environment file:

cp .env.example .env

(2) Start the Container

  • Option A: Run with Docker Command

    docker run -d \
      --name streamcap \
      -p 6006:6006 \
      -e PORT=6006 \
      -e TZ=Asia/Shanghai \
      -v ./logs:/app/logs \
      -v ./config:/app/config \
      -v ./downloads:/app/downloads \
      -v ./.env:/app/.env \
      --tty \
      ihmily/streamcap
    
  • Option B: Use Docker Compose (Recommended)

    docker compose up -d
    

(3) After starting the container, open your browser and go to http://localhost:6006 view Web page。

4.Build the Image Locally (Optional):
If you want to use the latest code changes not yet published on Docker Hub, build the image locally:

docker build -t streamcap .

Then, update the image field in your docker-compose.yml to:

image: streamcap

And start the service:

docker compose up -d

5.Stop the Container:

To stop the container:

docker compose stop

To completely remove it:

docker compose down

Additional Notes:

  • Ensure Docker and Docker Compose are installed.
  • The container uses the Asia/Shanghai timezone by default; adjust in the .env file if needed.
  • FFmpeg is required and bundled in the image, but if you encounter issues, ensure FFmpeg is available on your system (Download FFmpeg).
  • For detailed configuration, supported platforms, and advanced usage, check the GitHub repository.

 

StreamCap 是什么?

StreamCap 是一个基于 FFmpeg 和 StreamGet 的多平台直播流录制客户端,支持 40+ 国内外主流直播平台(如抖音、Twitch、哔哩哔哩、YouTube 等)。它支持批量录制、循环监控、定时任务和自动转码,适合用于归档直播内容或轻松创建视频内容。

核心功能:

  • 支持 40+ 平台(例如抖音、Twitch、哔哩哔哩、YouTube)。
  • 循环监控:直播间开播时自动开始录制。
  • 定时任务:按指定时间范围检查直播间状态。
  • 多种输出格式:支持 ts、flv、mkv、mov、mp4、mp3、m4a。
  • 自动转码:录制完成后自动转为 mp4 格式。
  • 消息推送:支持直播状态通知,及时获取开播信息。

 

如何使用 Docker 运行 StreamCap:

注意,项目运行依赖于config、locales、assets文件夹,因此请在项目根目录下运行或者手动复制文件夹到镜像内,否则会导致项目无法启动。以下是操作步骤:

1.拉取项目代码:
从 Github 拉取最新的代码或者手动下载主分支代码:

git clone https://github.com/ihmily/StreamCap.git

2.拉取镜像:
从 Docker Hub 拉取最新的 streamcap 镜像:

docker pull ihmily/streamcap

3.运行镜像:

(1) 首先进入到项目文件夹下,复制 .env.example.env 并根据需要配置:

cp .env.example .env

(2) 启动容器

  • 直接使用Docker命令运行

    docker run -d \
      --name streamcap \
      -p 6006:6006 \
      -e PORT=6006 \
      -e TZ=Asia/Shanghai \
      -v ./logs:/app/logs \
      -v ./config:/app/config \
      -v ./downloads:/app/downloads \
      -v ./.env:/app/.env \
      --tty \
      ihmily/streamcap
    
  • 直接使用Docker Compose 命令运行 (推荐)

    docker compose up -d
    

(3) 运行后通过 http://localhost:6006 访问 Web 界面。

4.本地构建并运行(可选):
如果需要最新代码,可以自行构建镜像:

docker build -t streamcap .

然后在 docker-compose.yml 中将 image 字段更新为 streamcap,再运行:

docker compose up -d

5.停止容器:

docker compose stop

额外说明:

  • 请确保已安装 DockerDocker Compose
  • 容器默认使用 Asia/Shanghai 时区,可在 .env 文件中调整。
  • 镜像中已包含 FFmpeg,但如果遇到问题,请确保系统中已安装 FFmpeg(下载 FFmpeg)。
  • 有关详细配置、支持的平台和高级用法,请查看 GitHub 仓库

Tag summary

Content type

Image

Digest

sha256:29b7bcaf6

Size

326.1 MB

Last updated

28 days ago

docker pull ihmily/streamcap:edge