dsh-ffmpeg: Seven ffmpeg Video Processing Tools for DSH

dsh-ffmpeg is a video processing tool plugin designed for DSH, providing seven categories of functionality based on the local ffmpeg/ffprobe: probing, clipping, concatenation, transcoding, subtitle burning, audio extraction, and GIF generation. The plugin is licensed under MIT, has zero runtime dependencies, and requires Node.js >= 22 as well as a locally installed ffmpeg. Its core advantage lies in encapsulating common video operations into standardized tools, solving complex issues in ad-hoc scripts such as command assembly, parameter boundaries, process timeouts, and output overwriting. The plugin enforces strict security constraints: parameters are passed via separate arrays to prevent shell injection, processes are managed by the official service, the timeout mechanism supports tree-level termination, and overwriting files with the same name or where output matches input is prohibited by default. The timeout for a single operation is limited to 10 seconds to 2 hours, with probing operations subject to an additional restriction.

Read More