- Home
- Plugin
- Utilizzo e fatturazione
- dsh-audio-extract
dsh-audio-extract
chanchanxue/dsh-audio-extract
Adds an "Audio extraction" view to the session view switcher that stream-copies a video's audio track into m4a without re-encoding, optionally trims the start and end, and writes title, artist, cover art and lyrics tags. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
Installazione
dsh plugin --profile web add github:chanchanxue/dsh-audio-extractREADME
dsh-audio-extract
Lossless audio extraction from video, as a DeepSeek Harness plugin.
It adds an 音频提取 / Audio extraction view to the session's view switcher, next to the built-in Chat and Trajectory views. Pick a folder, choose the videos,
optionally trim the beginning and the end, fill in title/artist, pick a cover image and a lyrics file — the plugin stream-copies the audio track out of each video into an .m4a without re-encoding, then writes the metadata.
What it does
- Lossless by construction — the audio is remuxed with
-c:a copy; ffmpeg never decodes it, so the AAC frames stay byte-identical to the source. - Trims both ends —
trimStart/trimEndin seconds; the cut lands on AAC frame boundaries. - Metadata —
title,artist, optionalalbumandlyrics(©lyr), written into the MP4 container. - Cover art — a chosen image is embedded as an
attached_picstream (covr), so players and the iPhone Music app show it. - Folder picker + direct cover/lyrics selection — the folder comes from the native directory dialog; covers are uploaded through a local route and lyrics are read from a
.lrc/.txtfile.
Requirements
- DeepSeek Harness with the Web UI (the plugin registers a conversation view and one session command).
- ffmpeg available either on
PATH, atC:\ffmpeg\bin\ffmpeg.exe, or pointed to by theDSH_AUDIO_EXTRACT_FFMPEGenvironment variable. - Source videos with AAC audio (
mp4/mov/m4v/mkv/…); other codecs (AC-3, DTS) are rejected with a reason rather than silently re-encoded.
Install
From the plugin manager (Settings → Plugins), or:
dsh plugin --profile <profile> add github:chanchanxue/dsh-audio-extract
Use
- Open a session and pick 音频提取 from the view switcher at the top of the conversation.
- Choose the video folder — the videos are listed automatically.
- Set the start/end trim if needed, fill title/artist, optionally pick a cover and a lyrics file.
- Click 开始提取. The command result lists every produced file with size, duration and which metadata was written.
How it works
| Piece | Detail |
|---|---|
| View | conversation.view, id audio-extract, order 31 |
| Command | /audio-extract <base64 JSON> — the page builds the payload and calls it through the session command API |
Route GET /audio-extract/list?path=… | Lists video files in a folder (the composed directory picker serves native and cannot browse) |
Route POST /audio-extract/upload?name=… | Stores an uploaded cover in the OS temp dir and returns its absolute path |
Everything runs locally: no network calls, no uploads outside your machine, no telemetry.
Limitations
- Output container is
.m4a; it is only chosen for AAC sources. Non-AAC tracks need a different container and currently fail with a message. - Trimming is frame-accurate to the AAC frame (~23 ms), not sample-accurate — that is the trade-off for not re-encoding.
- The cover/lyrics pickers use the browser's file input; the cover is copied into the OS temp folder.
License
MIT
Plugin correlati
DeepSeek-Balance-Whale-Widget
meteornox/deepseek-balance-whale-widget
dsh-context
bowenliang123/dsh-context
dsh-cost-meter
han-1413141/dsh-cost-meter
dsh-damage-pulse
wssfk12138/dsh-damage-pulse