Skip to content

Add recorder plugin - #23

Open
gooboy1018 wants to merge 2 commits into
xfangfang:mainfrom
gooboy1018:main
Open

Add recorder plugin#23
gooboy1018 wants to merge 2 commits into
xfangfang:mainfrom
gooboy1018:main

Conversation

@gooboy1018

Copy link
Copy Markdown

Macast Recording Plugin

A DLNA stream recording plugin for Macast that uses FFmpeg to record media streams to MP4 files while simultaneously playing them.

Features

  • Automatic Recording: Automatically starts recording when media is cast to Macast
  • Manual Control: Start or stop recording manually from the system tray menu
  • High Quality Output: H.264 video (6000 kbps) + AAC audio (192 kbps)
  • Real-time Status: Displays recording duration and file size in the menu
  • Custom Save Path: Choose where to save recorded files via native file dialogs
  • Custom FFmpeg Path: Configure a custom FFmpeg executable location or use auto-detection
  • Smart File Naming: Files named with media title and timestamp (e.g., VideoTitle_20260515_143025.mp4)
  • Graceful Stop: Sends q command to FFmpeg for clean finalization, with SIGINT/terminate fallback
  • FFmpeg Verification: Validates FFmpeg availability and version before each recording
  • Startup Validation: Detects FFmpeg immediate exit after launch and reports errors
  • Invalid Output Detection: Automatically removes output files smaller than 1 KB
  • FFmpeg Log Capture: Captures FFmpeg stderr to log files for troubleshooting
  • Cross-Platform: Works on macOS, Windows, and Linux

Requirements

  • Macast 0.7 or later
  • FFmpeg (bundled with the project, custom path, or system PATH)

# Macast 录制插件

一款用于Macast的DLNA流媒体录制插件,使用FFmpeg在播放媒体的同时将流录制为MP4文件。

## 功能特性

- **自动录制**:当媒体投屏到Macast时自动开始录制
- **手动控制**:通过系统托盘菜单手动开始或停止录制
- **高质量输出**:H.264视频(6000 kbps)+ AAC音频(192 kbps)
- **实时状态**:在菜单中显示录制时长和文件大小
- **自定义保存路径**:通过原生文件对话框选择录制文件的保存位置
- **自定义FFmpeg路径**:配置自定义FFmpeg可执行文件位置或使用自动检测
- **智能文件命名**:文件以媒体标题和时间戳命名(如 `视频标题_20260515_143025.mp4`)
- **优雅停止**:向FFmpeg发送 `q` 命令进行干净收尾,备选SIGINT/terminate信号
- **FFmpeg验证**:每次录制前验证FFmpeg可用性和版本信息
- **启动验证**:检测FFmpeg启动后是否立即退出并报告错误
- **无效输出检测**:自动删除小于1 KB的输出文件
- **FFmpeg日志捕获**:将FFmpeg的stderr输出捕获到日志文件中,便于故障排查
- **跨平台**:支持macOS、Windows和Linux

## 系统要求

- Macast 0.7或更高版本
- FFmpeg(项目内置、自定义路径或系统PATH)
# Macast Recording Plugin

A DLNA stream recording plugin for Macast that uses FFmpeg to record media streams to MP4 files while simultaneously playing them.

## Features

- **Automatic Recording**: Automatically starts recording when media is cast to Macast
- **Manual Control**: Start or stop recording manually from the system tray menu
- **High Quality Output**: H.264 video (6000 kbps) + AAC audio (192 kbps)
- **Real-time Status**: Displays recording duration and file size in the menu
- **Custom Save Path**: Choose where to save recorded files via native file dialogs
- **Custom FFmpeg Path**: Configure a custom FFmpeg executable location or use auto-detection
- **Smart File Naming**: Files named with media title and timestamp (e.g., `VideoTitle_20260515_143025.mp4`)
- **Graceful Stop**: Sends `q` command to FFmpeg for clean finalization, with SIGINT/terminate fallback
- **FFmpeg Verification**: Validates FFmpeg availability and version before each recording
- **Startup Validation**: Detects FFmpeg immediate exit after launch and reports errors
- **Invalid Output Detection**: Automatically removes output files smaller than 1 KB
- **FFmpeg Log Capture**: Captures FFmpeg stderr to log files for troubleshooting
- **Cross-Platform**: Works on macOS, Windows, and Linux

## Requirements

- Macast 0.7 or later
- FFmpeg (bundled with the project, custom path, or system PATH)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant