dsh-wsl-media: Local Media and Document Processing Pipeline in WSL

The DSH philosophy is “everything is a plugin”. When an agent needs to process local files in the WSL environment, it usually has to manually invoke separate tools such as ffmpeg, whisper, and tesseract. dsh-wsl-media integrates these tools into a unified DSH plugin and provides a one-stop pipeline ranging from media probing and audio/video processing to PDF text extraction and OCR recognition.

Plugin Positioning

This is a local media/document processing plugin maintained by user 173787247. It is version 0.2.1 and released under the MIT license.

The core problem it solves is: in the DSH environment, it enables agents to work directly with multimedia resources in the local file system without constantly switching toolchains between the host and WSL.

Core Features

The plugin integrates the following tools, which are invoked through CLI commands:

  1. CLI detection: Use media_status to get basic status.
  2. Media detection: Use media_probe to analyze file information with ffprobe.
  3. Audio track extraction: Use media_extract_audio to extract an audio track.
  4. Thumbnail: Use media_thumbnail to generate a media file thumbnail.
  5. PDF text: Use media_pdf_text to extract the text content from a PDF document.
  6. ASR recognition: Use media_asr to call whisper for speech-to-text.
  7. Format conversion: Use media_pandoc to convert document formats.
  8. OCR recognition: Use media_ocr to call tesseract for optical character recognition.
  9. Metadata extraction: Use media_exif to call exiftool to read image/file metadata.

Installation and Enablement

Install the plugin using the official command. After installation, the commands will appear in the plugin path configured in the current DSH setup.

dsh plugin --profile web add github:173787247/dsh-wsl-media

If you need to link plugins in bulk, you can run the script provided by the dsh-wsl-kit suite:

bash dsh-wsl-kit/scripts/link-linux-plugins.sh

Configuration and Notes

Path Restrictions

The plugin runs with the permissions of the current DSH process. Therefore, target file paths must be within the allowed scope of the allowRoots configuration. The default allowed paths include:

  • the user’s home directory
  • ~/.dsh
  • ~/.dsh/im-workspace
  • /tmp
  • /mnt/c or /mnt/d (Windows mounted drives)

Dependencies and Compatibility

  • Minimum version: DSH version >= 0.1.2 is required.
  • Optional suite: dsh-wsl-kit is optional. By default, install.sh does not include this suite. To use its bulk linking feature, install it manually.
  • Latest verification: Follow the compatibility documentation in dsh-wsl-kit.

Summary

dsh-wsl-media wraps complex command-line tools into standardized DSH interfaces. It is suitable for scenarios that require video editing assistance, document digitization, or speech data processing in WSL. Before using it, make sure to check whether the file path is included in the allowRoots list.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye