Xpersona
M

mp4-to-mp3-extractor

CLAWHUB · Unverified

批量将指定目录下的 .mp4 视频文件提取音频转为 .mp3。 支持指定源目录和输出目录,未指定输出时默认创建 [源目录]_audio 文件夹。 自动管理 Python 虚拟环境,保持文件夹层级结构,兼容 python3 和 python。 高频触发词:mp4转mp3、视频转音频、批量提取音频、mp4 to mp3、extract audio from videos、听视频、提取网课音频、把视频里的声音抠出来、视频转mp3。 Skill: mp4-to-mp3-extractor Owner: wangminrui2022 Summary: 批量将指定目录下的 .mp4 视频文件提取音频转为 .mp3。 支持指定源目录和输出目录,未指定输出时默认创建 [源目录]_audio 文件夹。 自动管理 Python 虚拟环境,保持文件夹层级结构,兼容 python3 和 python。 高频触发词:mp4转mp3、视频转音频、批量提取音频、mp4 to mp3、extract audio from videos、听视频、提取网课音频、把视频里的声音抠出来、视频转mp3。 Tags: latest:1.1.8 Version history: v1.1.8 | 2026-07-03T14:04:07.307Z | user - Removed the skill-card.md file from the project. - No changes to co

62
Rank
84
Safety
1.2k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17de4avhxep6e2yxdr6snee9h83v08q:mp4-to-mp3-extractor
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-wangminrui2022-mp4-to-mp3-extractor/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

35,048 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: mp4-to-mp3-extractor
description: |-
  批量将指定目录下的 .mp4 视频文件提取音频转为 .mp3。
  支持指定源目录和输出目录,未指定输出时默认创建 [源目录]_audio 文件夹。
  自动管理 Python 虚拟环境,保持文件夹层级结构,兼容 python3 和 python。
  高频触发词:mp4转mp3、视频转音频、批量提取音频、mp4 to mp3、extract audio from videos、听视频、提取网课音频、把视频里的声音抠出来、视频转mp3。
metadata:
  openclaw:
    requires:
      bins:
        - python
    user-invocable: true
---

# MP4 to MP3 Extractor Skill

## 技能简介
本技能专门批量从 .mp4 视频文件中提取音频并保存为 .mp3 格式。  
脚本自动创建并管理 Python 虚拟环境,无需手动安装依赖,环境隔离且安全。

## 什么时候使用本技能
用户提到以下任意相关需求时,优先调用本技能:
- 把文件夹里的所有 mp4 转为 mp3 音频
- 批量提取视频音频 / 视频转音频
- mp4 转 mp3
- 提取网课音频、听视频、把视频里的声音抠出来
- 下载的视频转成音频文件
- 先下载视频再提取音频

## 执行步骤
1. **解析用户输入**:识别源目录路径(如 `F:\命理学`、`~/Videos` 等),或从提供的视频 URL 中先下载再处理。
2. **确定目标目录**:用户未指定时,默认使用 `[源目录]_audio`(例如 `F:\命理学_audio`)。
3. **执行转换**:使用以下兼容命令启动脚本:
   ```bash
   (python3 scripts/extract.py "<源目录>" "[目标目录]") || (python scripts/extract.py "<源目录>" "[目标目录]")

README.md

# **🎵 MP4 to MP3 Extractor (OpenClaw Skill)**

**高效、智能的本地音频提取工具** 这是一个为 [OpenClaw](https://github.com/openclaw/openclaw) 量身定制的自动化 Skill。它能递归扫描目录,利用 FFmpeg 将 .mp4 视频提取为高质量 .mp3 音频,同时**完美保留原始文件夹层级结构**。

## **✨ 核心特性**

* **📂 完美的结构保持**:自动映射源目录的多级子文件夹到目标目录,确保输出井然有序。  
* **🤖 自动化环境 (Self-bootstrapping)**:  
  * 首次运行自动创建 venv 虚拟环境。  
  * 智能兼容 Windows (Scripts/python.exe) 与 Linux/macOS 环境。  
  * 隔离运行,不污染全局 Python 环境。  
* **⚡ 工业级音频处理**:直接调用系统级 FFmpeg,默认输出 **192kbps** 高质量音频。  
* **📝 智能日志系统**:采用滚动日志技术,**仅保留最近 3 天记录**,平衡审计需求与磁盘空间。  
* **🧠 语义化调用**:深度集成 OpenClaw,Agent 可精准理解意图并自动推断路径。

## **🛠️ 环境依赖 (必读)**

在运行此 Skill 之前,请确保宿主机已安装:

1. **Python 3.8+**(建议安装 python3-venv 支持)。  
2. **FFmpeg**:必须添加到系统环境变量 PATH 中。  
   * *验证:终端输入 ffmpeg \-version 有输出即视为正常。*

**⚠️ 常见排错:若 Skill 状态显示为 blocked**

这通常是因为 OpenClaw 找不到 python 路径。

**修复步骤 (Linux示例):**

\# 1\. 安装 venv 支持  
sudo apt update && sudo apt install python3-venv  
\# 2\. 建立软链接 (路径请根据实际 Python 安装位置修改)  
sudo ln \-s /usr/bin/python3 /usr/bin/python  
\# 3\. 重启服务  
systemctl \--user restart openclaw-gateway

## **🚀 安装指南**

### **1\. 自动安装 (CLI)**

根据你的环境执行以下命令:

**Linux / macOS:**

\# 视实际安装路径而定  
npx skills add \[https://github.com/wangminrui2022/mp4-to-mp3-extractor\](https://github.com/wangminrui2022/mp4-to-mp3-extractor)

**Windows:**

npx skills add D:\\path\\to\\mp4-to-mp3-extractor

### **2\. 重启生效**

安装完成后,进入 OpenClaw 目录重启 Gateway 即可在技能列表中看到它。

## **💻 使用方法**

### **命令行手动测试**

\# 进入技能目录  
cd \~/.openclaw/skills/mp4-to-mp3-extractor/

\# 运行转换脚本 (Linux)  
python scripts/extract.py "/path/to/videos" "/path/to/audio"

\# 运行转换脚本 (Windows)  
python scripts\\extract.py "F:\\Videos" "F:\\Audio"

### **在 OpenClaw 聊天中**

你可以直接对你的 Agent 说:

“帮我把“F:\命理学”文件夹里的 mp4 都转成 mp3”

“批量把“F:\命理学”这些视频转音频到“F:\命理学-音频”

“把这个视频https://www.douyin.com/jingxuan?modal_id=7611124804929785115下载下来,然后再提取音频”

## **📁 存储说明**

* **代码目录**:\~/.openclaw/skills/mp4-to-mp3-extractor/  
* **日志查看**:执行过程中的详细日志可在技能目录下的 logs/ 文件夹中找到。

_meta.json

{
  "ownerId": "kn77473086ppakmtqf0e4myp8981mhjd",
  "slug": "mp4-to-mp3-extractor",
  "version": "1.1.8",
  "publishedAt": 1783087447307
}

skill-card.md

## Description:

Batch extracts audio from .mp4 files in a chosen directory into .mp3 files while preserving the source folder structure.

This skill is ready for commercial/non-commercial use.

## Publisher:

[wangminrui2022](https://clawhub.ai/user/wangminrui2022)

### License/Terms of Use:

MIT-0

## Use Case:

External users and developers use this skill to convert local folders of MP4 videos into MP3 audio files, optionally choosing an output folder or letting the skill create a default sibling folder.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill reads a user-selected video folder and writes MP3 outputs.

Mitigation: Run it only on intended local folders and review the output directory before processing large or sensitive collections.

Risk: The skill changes Python package state and uses a shared virtual environment.

Mitigation: Prefer a private, pinned virtual environment and review dependency changes before installation.

Risk: The skill may download and run FFmpeg automatically.

Mitigation: Prefer preinstalled FFmpeg from a trusted source and verify the executable path before running conversions.

Risk: The documented sudo symlink workaround can affect system-wide Python command resolution.

Mitigation: Avoid the workaround unless an administrator has reviewed the command and confirmed the host-level impact.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/wangminrui2022/skills/mp4-to-mp3-extractor)
- [OpenClaw project](https://github.com/openclaw/openclaw)

## Skill Output:

**Output Type(s):** [Shell commands, Files, Configuration, Guidance]

**Output Format:** [Markdown guidance with shell commands and generated MP3 files]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Preserves relative folder structure and writes conversion logs in the skill logs directory.]

## Skill Version(s):

1.1.8 (source: ClawHub release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to mp4-to-mp3-extractor and adjacent AI workflows.