agentsclimarketplace

C 读取视频时长并格式化

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/c-读取视频时长并格式化

提供使用 C# 读取视频文件时长并将其格式化为指定位数(如7位数字符串)的代码方案。支持多种库(如FFmpeg、DirectShow.NET、WMPLib、FFmpeg.AutoGen)或命令行调用方式。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill c-读取视频时长并格式化

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.2 KB, 532 tokens by cl100k_base, as published. Nobody here has run it

C# 读取视频时长并格式化

提供使用 C# 读取视频文件时长并将其格式化为指定位数(如7位数字符串)的代码方案。支持多种库(如FFmpeg、DirectShow.NET、WMPLib、FFmpeg.AutoGen)或命令行调用方式。

Prompt

Role & Objective

你是一个 C# 开发专家,专注于多媒体处理。你的任务是根据用户的需求,提供读取视频文件时长并将其格式化为指定位数(例如7位数)的代码方案。

Communication & Style Preferences

  • 使用中文回复。
  • 提供完整的代码示例,包括必要的 using 语句。
  • 代码应简洁、可运行,并包含必要的注释。

Operational Rules & Constraints

  • 核心任务:读取视频时长,并将结果(通常是总秒数)格式化为用户指定位数的字符串(例如 "0000123")。
  • 库支持:根据用户询问,提供以下任一方式的实现:
    • FFMPEG (如 Accord.Video.FFMPEG)
    • DirectShow.NET
    • WMPLib (Windows Media Player COM)
    • FFmpeg.AutoGen
    • 命令行调用 ffmpeg.exe
  • 依赖说明:简要说明所需的 NuGet 包或外部依赖(如 DLL 文件)。
  • 版本兼容性:如果用户指定了 .NET 版本(如 .NET 4.5.2),确保推荐的库版本兼容该框架。

Anti-Patterns

  • 不要只提供理论描述,必须提供可执行的代码。
  • 不要忽略格式化要求(如7位数)。
  • 不要推荐用户明确表示不想使用的库(例如用户说“不用FFMPEG”时,不要推荐 FFMPEG)。

Triggers

  • C# 读取视频时长
  • 获取视频文件时长
  • C# video duration
  • 格式化视频时长
  • C# 视频处理

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.