MPC-HC-Video-Editor

MPC-HC Video Editor (C# / WPF)

Modern rewrite of the original AutoHotkey MPC-HC Video Editor v2.1.

Bookmark ranges in a video playing in MPC-HC, then cut, join, convert or extract audio from them with ffmpeg.

The main window on the Parchment theme, showing four bookmarked clips with their times, durations and speed sliders, the timeline with a bracket at each end of every cut, and the first and last frame of the selected clip

Fully portable. Everything the app reads and writes — settings.json, stalls.log — lives beside the executable. There is no installer. Copy the folder anywhere and it runs.

Upgrading is safe. A spare copy of settings.json is kept in %APPDATA%\MPC-HC Video Editor\, and is used for one thing: if the app starts and finds no settings beside the executable but does find that copy, it restores from it. So the common upgrade — delete the old folder, unpack the new one — keeps your shortcuts, naming tags, suffixes and hotkeys instead of silently resetting them. Settings beside the executable always win, so a deliberately fresh copy of the folder stays fresh, and the same step carries over the configuration of an earlier non-portable install, which kept its settings in that same place.


Screenshots

The window above is where the editing happens: the cut list with its per-cut controls, the action toolbar, the timeline, and the current video, bookmarks and player state down the right-hand side.

While a video is playing you work in the compact overlay instead — it appears over the player, never takes focus, and lists every bookmark without scrolling. The full window comes back the moment MPC-HC stops being the active window.

Settings, in five tabs:

General — theme, run mode, instances Output — format, quality, encoder
The Settings window on the General tab, showing the color theme picker, the run mode and the single-instance options The Output tab, showing the default output format, the encoding quality and the H.264 encoder choice with unavailable GPU encoders grayed out
Cleanup — what is deleted, and where it goes Player — web interface port, polling, ffmpeg
The Cleanup tab, showing what happens to the original video and the bookmarks file after an operation, and the Recycle Bin option The Player tab, showing the detected MPC-HC web interface port, the polling speed and the ffmpeg folder
Overlay — corner, background opacity and click-to-seek
The Overlay tab, showing the corner the compact overlay parks in and its background opacity

Bookmarks

A bookmark is a timestamp pair: press the hotkey once to open it, again to close it. An open bookmark shows as incomplete until it has an end time.

The CSV format matches the original AutoHotkey version. It is saved next to the video, and an empty one is never created.


Actions

The toolbar can be rearranged. Drag a button onto another and the row reorders under the pointer; let go and the order is saved. A press that does not move is still a click, so the buttons work as they always did, and a drag never fires the command it lands on.

Right-click the toolbar ▸ Customize toolbar (also under Options) opens the editor: a preview of your toolbar above, every available action below, drag between the two. Double-clicking adds or removes instead, for anyone who would rather not drag. Three special blocks sit with the actions — a fixed spacer, an expander that takes up whatever width is left so anything after it is pushed right, and new row, which starts another line of the same toolbar. The preview is as wide as the window is allowed to get narrow, so a row that fits there fits at any size; a longer one wraps by itself, exactly as it will in the program. Options ▸ Reset toolbar order puts everything back.

A button added in a later release does not appear on a toolbar you have customized — it waits in the Customize dialog, so your layout is never rearranged by an update.

Output filenames use the active naming tag (see Options), e.g. vacation.mp4 → vacation[done].mp4. Choosing None under Options writes vacation.mp4 unchanged instead.

Filename collisions

When an output name is taken you are asked to Overwrite, Increment or Rename. Increment bumps the number in the bracket — [done] → [done2], [cs3] → [cs4] — and Rename changes only the base name, keeping the suffix. The question repeats until the name is actually free, since a rename or an increment can collide too.

Filename rules

Names the app writes allow letters, numbers, dash, underscore, square brackets and parentheses. No spaces, and no doubled punctuation. A name that breaks the rules prompts for a replacement, pre-filled with a suggested correction (spaces become dashes, disallowed characters are dropped, runs collapse). The field rejects bad characters as you type and explains why. Source files are never renamed — only what the app is about to write has to comply.


Views

Picking the view by hand — View ▸ Minimal and View ▸ Full — has been removed. They were a mode with nothing on screen naming which one was in force, and following focus is what they were mostly being used to approximate.

The overlay comes down if the bookmark list empties (opening another video in the player clears it), and returns with the next bookmark.

Settings ▸ Overlay ▸ Clicking makes the overlay’s timestamps seek MPC-HC, the way they do in the full window. On by default. The cost is that the panel catches those clicks, so that corner of the screen no longer pauses the video — turn it off to make the overlay click-through instead, and clicks over it reach the video underneath as if it were not there. The transparent area around the panel is unaffected either way. The overlay never takes focus, so seeking from it does not bring the full window back.

Timeline

The bar under the toolbar shows playback position plus a range mark per bookmark — amber normally, teal when checked, orange when marked for inversion, and a thin red tick for an open bookmark.

Progress

Running an action shows a panel above the status bar with the operation, file n of m, the current file and step, percentage, elapsed and remaining time. The bar’s color is interpolated from the percentage: black → red → orange → yellow → green.

Routine messages go to the status bar, not popups. Dialogs are reserved for confirming destructive actions, reporting real failures, and asking for input.


Files and folders

Two separate output destinations:

Quick save shortcuts (File menu) are folders with a Set / Remove submenu; Set points Quick save at that folder. Removing one never changes the current Quick save destination.

Shortcuts (own menu) is a separate list that simply opens folders in Explorer. It has nothing to do with quick save.

History (own menu) lists recently played videos; click one to launch it in MPC-HC. Dead entries are pruned when clicked. Only real video files are ever recorded.

Drag and drop a video, a .csv or a .pls onto the window to load it.


Playlists


Options

Deleting

Delete files to the Recycle Bin (Settings ▸ Cleanup) is on by default, so anything the app removes can be undone. It covers every deletion, including the post-operation cleanup that runs without asking — which is what makes those settings safe to turn on.

Turn it off and deletions are permanent. On a volume that has no Recycle Bin — a network share, most removable media — files are removed outright either way, because leaving one behind would be worse than the deletion you asked for.

Hotkey

Set timestamp hotkey… opens a dialog that captures from the moment it appears: press any key, key combination, or the middle / side mouse buttons, and the field updates live. Click OK to set it. Disable hotkey turns it off. The binding persists in settings.json.

The hotkey is global — it has to be, to work while MPC-HC has focus — but it only ever fires when MPC-HC is the active window and has a video open. Everywhere else the press is ignored and passed along untouched, so the default middle-mouse binding still opens links in a browser rather than quietly bookmarking whatever the player last had loaded.


Menu items are enabled only when they can do something. The rules read from four pieces of state: whether a video is active in MPC-HC, whether a bookmark file is loaded, how many complete pairs exist, and how many are checked.

Worth knowing because they are not uniform: both Play commands need 2+ pairs, Split needs only 1, and Merge is always available. Undo, Edit bookmarks, Delete bookmarks and Remove-selected key off the bookmark file being loaded, not off a video being active. Convert, Strip audio and the playlist folder / load / new items are always enabled.


Requirements

Binaries are validated by running them, not merely found: a copy that exists but fails to load is skipped in favor of the next working candidate.

Building

See BUILD.md for the portable publish command and its caveats.

dotnet restore
dotnet build -c Release

Project layout

Dialogs/     CaptureHotkey, Conflict, Input, ManageShortcuts,
             ManageSuffixes, RenameFile
Helpers/     Converters, FileNameRules, PortablePaths, ProgressBrush,
             TimelineRanges
Models/      Bookmark, EditSession, HotkeyBinding, ShortcutEntry, SuffixEntry
Services/    Bookmark, FFmpeg, Hotkey, JobProgress, MpcHc, Playlist,
             Settings, StallMonitor, Toast
ViewModels/  MainViewModel — all commands and menu enablement
Views/       MainWindow, MinimalWindow, ToastWindow