rgj1980298/obsidian_sync_public/ffmpeg-audio-extract

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

从视频文件中提取音频。支持批量处理,输出 16kHz 单声道 WAV(语音识别标准格式)。

Install

npx vskill@latest install rgj1980298/obsidian_sync_public/ffmpeg-audio-extract

SKILL.md

FFmpeg 提取音频

从视频文件中提取音频流,输出适合语音识别的 WAV 文件。

使用场景

  • 视频转音频(准备 ASR 输入)
  • 批量提取视频中的语音
  • 「把这个视频的音频提出来」「视频转 WAV」

前置条件

需要 ffmpeg。检查是否可用:

bash
ffmpeg -version

未安装则从 https://ffmpeg.org/download.html 下载。

输出位置

默认输出到输入文件所在目录。如需指定输出路径,问用户确认。

bash
# 默认:同目录
ffmpeg -i "video.mp4" -vn -acodec pcm_s16le -ar 16000 -ac 1 -y "video.wav"
# 指定路径
ffmpeg -i "video.mp4" -vn -acodec pcm_s16le -ar 16000 -ac 1 -y "output/音频/video.wav"

基本命令

bash
ffmpeg -i "{输入视频}" -vn -acodec pcm_s16le -ar 16000 -ac 1 -y "{输出}.wav"
参数说明
参数值说明
-i{视频路径}输入文件
-vn(无值)去掉视频流,只保留音频
-acodecpcm_s16le16-bit 小端序 PCM 编码
-ar16000采样率 16kHz(ASR 标准)
-ac1单声道
-y(无值)覆盖已有文件,不提示

批量处理

用 shell 循环处理目录下所有视频:

bash
# Windows PowerShell
Get-ChildItem -Filter *.mp4 | ForEach-Object {
$out = "output\音频\$($_.BaseName).wav"
ffmpeg -i $_.FullName -vn -acodec pcm_s16le -ar 16000 -ac 1 -y $out
Write-Output "Done: $($_.Name) -> $out"
}
bash
# Linux/macOS
for f in *.mp4; do
ffmpeg -i "$f" -vn -acodec pcm_s16le -ar 16000 -ac 1 -y "output/${f%.mp4}.wav"
done

常见视频格式

.mp4 .mkv .flv .avi .mov .wmv .webm .m4v

常用变体

提取为 MP3(压缩格式,非 ASR 标准)
bash
ffmpeg -i "{输入}" -vn -acodec libmp3lame -ar 16000 -ac 1 -y "{输出}.mp3"
提取并降噪(简单的高通滤波)
bash
ffmpeg -i "{输入}" -vn -af "highpass=f=200,lowpass=f=3000" -acodec pcm_s16le -ar 16000 -ac 1 -y "{输出}.wav"
指定时间范围提取
bash
ffmpeg -i "{输入}" -ss 00:05:00 -to 00:15:00 -vn -acodec pcm_s16le -ar 16000 -ac 1 -y "{输出}.wav"

常见问题

"Invalid argument" 或路径错误

Windows 路径用双反斜杠或正斜杠:C:/video/test.mp4 或 C:\\video\\test.mp4

输出无声

检查视频是否真的有音频流:ffmpeg -i {文件} 2>&1 | findstr "Audio"

文件太大

WAV 是无压缩格式,1 分钟约 1.9MB。如需压缩可用 MP3,但 ASR 建议用 WAV。

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/rgj1980298/obsidian_sync_public/ffmpeg-audio-extract/badge)](https://verified-skill.com/skills/rgj1980298/obsidian_sync_public/ffmpeg-audio-extract)

Something wrong with this skill or its page? Tell us.