Repository navigation
Getting Started
TrailerClipper needs three things: the library or the tool from nuget.org, a .NET runtime that can run it, and ffmpeg with ffprobe on the same machine.
| Runtime | How it was checked |
|---|---|
| .NET 10 (the package's net10.0 build) | every C# example and command on this wiki, on Windows 11 and on Ubuntu 26.04 in WSL (in .NET's invariant globalization mode, as that system had no ICU library) |
| .NET 8 (the netstandard2.0 build) | every C# example, on Windows |
| .NET Framework 4.8 (the netstandard2.0 build) | every C# example, on Windows |
tclipper (needs the .NET 10 runtime or later) |
on Windows and on Linux |
| macOS | not tested |
| .NET Framework 4.6.2 to 4.7.2, .NET Core 2.x and 3.x, Mono, Unity | not tested (netstandard2.0 says they can load it) |
On .NET 8 and .NET Framework 4.8 every example printed the same as on .NET 10, except that argument exceptions word their parameter differently: see Errors and edge cases.
dotnet add package TrailerClipperThe package depends on FFMpegCore 5.5.0, which starts the ffmpeg processes; the netstandard2.0 build also depends on System.Text.Json 10.0.12. Neither brings ffmpeg itself.
TrailerClipper runs ffmpeg and ffprobe; it never downloads them. Install them with your system's package manager (winget install --id Gyan.FFmpeg -e on Windows, brew install ffmpeg on macOS, sudo apt install ffmpeg or sudo dnf install ffmpeg on Linux), or let the tool do it with tclipper --install-ffmpeg (Commands). To see which folder TrailerClipper will use:
Console.WriteLine(FFmpegLocator.Find() ?? "ffmpeg not found");On the Windows machine these pages were made on, ffmpeg came from winget (<home> is the user's profile folder):
<home>\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-9.0.1-full_build\bin
The search order and the ways to override it are on Configuration.
var clipper = new TrailerClipper();
clipper.RemoveTrailers("Episodes", 2000m);On .NET 10 it prints:
Starting on file: Episodes\ep1.mp4
Finished on trimming file, output: <cwd>\Episodes\clipped\ep1.mp4
Starting on file: Episodes\ep2.mp3
Finished on trimming file, output: <cwd>\Episodes\clipped\ep2.mp3
Starting on file: Episodes\ep3.wav
Finished on trimming file, output: <cwd>\Episodes\clipped\ep3.wav
Starting on file: Episodes\ep4.m4b
Finished on trimming file, output: <cwd>\Episodes\clipped\ep4.m4b
and leaves:
Episodes/clipped/ep1.mp4: 8.000 s; video h264, audio aac
Episodes/clipped/ep2.mp3: 8.000 s; audio mp3
Episodes/clipped/ep3.wav: 8.000 s; audio pcm_s16le
Episodes/clipped/ep4.m4b: 8.011 s; audio aac
Episodes/ep1.mp4: 10.000 s; video h264, audio aac
Episodes/ep2.mp3: 10.000 s; audio mp3
Episodes/ep3.wav: 10.000 s; audio pcm_s16le
Episodes/ep4.m4b: 10.000 s; audio aac
Episodes/extra.mkv: 10.003 s; video h264, audio vorbis
Episodes/notes.txt: 10 bytes, not media
The .NET 8 and .NET Framework 4.8 runs printed the same lines and left the same files. <cwd> stands for the full path of the current folder: the library prints the full output path even when you pass a relative input path. On Linux the separators are /.
The namespace is TrailerClipperLib (the package name is TrailerClipper), so a file needs using TrailerClipperLib;.
#r "nuget: TrailerClipper, 2.0.0"
open TrailerClipperLib
let clipper = TrailerClipper()
clipper.RemoveTrailers("Episodes", 2000m)dotnet fsi --quiet on that script printed the same eight lines and left the same files as the C# call.
tclipper is a .NET tool, so it needs the .NET SDK to install and the .NET 10 runtime (or later: the tool rolls forward to newer majors) to run. Most people install it for the user:
dotnet tool install -g TrailerClipper.ToolThat form was not run for these pages. They used a tool path, which installs the same package into a folder you name; you then run tclipper from that folder:
$ dotnet tool install TrailerClipper.Tool --version 2.0.0 --tool-path tools
You can invoke the tool using the following command: tclipper
Tool 'trailerclipper.tool' (version '2.0.0') was successfully installed.
$ echo $?
0
$ dotnet tool list --tool-path tools
Package Id Version Commands
----------------------------------------------
trailerclipper.tool 2.0.0 tclipper
$ echo $?
0The package holds only the tool, under tools/; it carries its own copy of the library and FFMpegCore:
tools/net10.0/any/DotnetToolSettings.xml
tools/net10.0/any/FFMpegCore.dll
tools/net10.0/any/Instances.dll
tools/net10.0/any/TrailerClipperLib.dll
tools/net10.0/any/TrailerClipperLib.pdb
tools/net10.0/any/TrailerClipperLib.xml
tools/net10.0/any/tclipper.deps.json
tools/net10.0/any/tclipper.dll
tools/net10.0/any/tclipper.pdb
tools/net10.0/any/tclipper.runtimeconfig.json
tclipper has no --version option (Commands); dotnet tool list shows the installed version.
$ dotnet tool uninstall TrailerClipper.Tool --tool-path tools-u
Tool 'trailerclipper.tool' (version '2.0.0') was successfully uninstalled.
$ echo $?
0For a global install the command is dotnet tool uninstall -g TrailerClipper.Tool (not run here). Uninstalling the tool leaves ffmpeg installed: --install-ffmpeg installs it through your package manager, and the package manager removes it.
Next: Commands for the tool, How files are clipped for what a call does.
This wiki describes TrailerClipper and TrailerClipper.Tool 2.0.0 and was last updated on 2026-09-30. Both packages are MIT licensed. Report problems in the issues. On NuGet: TrailerClipper and TrailerClipper.Tool.
Using it
- Getting started
- Commands
- Configuration
- How files are clipped
- Errors and edge cases
- API reference
- Recipes
- FAQ
The releases
Contributing
Elsewhere