How can I open a video file in Media Player Classic at a specific time in the file?
There are two ways to do this: favorites or the
/startpos hh:mm:ss commandline switch.
The GUI has limited support for creating Favorites from the menu. These favorites support relative paths and can be set to remember the file position. The main downside is that all favorites created are shown in a single drop-down with no way to organize or categorize them.
More convenient, if more cumbersome, is to use Media Player Classic's command line switches, specifically the
/startpos hh:mm:ss command. Simply call the executable with a filename and a specific time:
"C:\Tools\mpc-hc.exe" "filePath" /startpos hh:mm:ss
The simplest way to call this in Windows is with a shortcut. The above command can be used as the
Target in a shortcut. The
Start in option of the shortcut determines whether the path to MPC or the path to the file can be relative or if it should be absolute. If you create the shortcut from the executable folder (such as with an ALT+drag), you'll have to fully qualify the path to the video file.
Alternatively, you can also create a batch file to serve as a shortcut like so:
:: Variables :: A title is required if you use quotes around the executable path SET windowTitle="MPCSeek" SET mpcExecutable="C:\Tools\mpc-hc.exe" :: Use an absolute path unless this bat file is in the same folder as the video file SET fileLocation="pathToFile" SET position=01:09:00 START %windowTitle% %mpcExecutable% %fileLocation% /startpos %position%
The CMD window will instantly close after starting (or restarting) the media player thanks to the
START command and usually won't even be visible.
Other switches can be combined with this command. You can get an up to date list by calling the executable with the
/? switch, but these are some of the most interesting to use alongside
/close: close the player after playback (may only work if used with
/playnextOpen next file in the folder after playback
/fullscreen: Start in full-screen mode
/minimized: Start in minimized mode
/nofocus: Open MPC-HC in background
/new: Use a new instance of the player
/monitor #: Start player on monitor N, where N starts from 1
start #: alternative to
startposthat uses milliseconds instead
I have created a tool that will start one or multiple MPC videos at once at a specific time that is given and customizable. Will work with any integer amount of seconds as long as the video is long enough.
Feel free to experiment.