dsh-audio-extract
Manifest validAdds 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
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
Comments
Loading…
Similar plugins
by 439436269-ctrl
Video and audio preview for DeepSeek Harness: play mp4/mov/mkv/webm and mp3/flac/wav in the right-Sidebar document preview, streamed over an authenticated HTTP Range route.
★ 0
MIT
JavaScript
Oct 23, 2026
dsh plugin --profile web add dsh-media-previewby wilsonchengassistant
Plays video and audio files in the right Sidebar preview pane, streamed over an authenticated HTTP Range route so a remote browser can play and seek a large file without launching a native player on t
★ 0
MIT
JavaScript
Oct 21, 2026
dsh plugin --profile web add dsh-media-web-previewby Wisdoverse
Renders image, video, and audio paths and URLs from DSH conversations inline, with workspace-confined local reads and an optional ComfyUI proxy.
★ 4
↓ 483/wk
MIT
JavaScript
Nov 17, 2026
dsh plugin --profile web add @wisdoverse/dsh-inline-media-viewerRead a video with a text-only model: with ffmpeg installed, sample frames at a 0.1-10 second interval into contact sheets where every frame carries its real timecode, extract the audio track and send
★ 0
dsh plugin --profile web add dsh-video-eyesby OrderG-X
Inline video and audio playback inside DeepSeek Harness: a play_video tool plus a native player at the turn tail, served by a signed Range-capable streaming route.
★ 3
↓ 490/wk
MIT
JavaScript
Nov 12, 2026
dsh plugin --profile web add dsh-video-previewby xiaokaizhou
Renders local audio/video paths as inline, playable previews in DSH chat: replaces paths with <audio>/<video> players backed by same-origin /api/media-preview/* route, with explicit error statuses.
★ 0
MIT
JavaScript
Sep 21, 2026
dsh plugin --profile web add media-preview