在 Media Player Classic 中的特定时间打开视频

Lil*_*hal 4 media-player media-player-classic

如何在文件中的特定时间在Media Player Classic打开视频文件?

Lil*_*hal 8

有两种方法可以做到这一点:收藏夹或/startpos hh:mm:ss命令行开关。

收藏夹

GUI 对从菜单创建收藏夹的支持有限。这些收藏夹支持相对路径,并且可以设置为记住文件位置。主要缺点是创建的所有收藏夹都显示在一个下拉列表中,无法对其进行组织或分类。

命令行

比较方便,如果比较麻烦,就是使用Media Player Classic的命令行开关,特别是/startpos hh:mm:ss命令。只需使用文件名和特定时间调用可执行文件:

"C:\Tools\mpc-hc.exe" "filePath" /startpos hh:mm:ss
Run Code Online (Sandbox Code Playgroud)

在 Windows 中调用它的最简单方法是使用快捷方式。上面的命令可以用作Target快捷方式。Start in快捷方式的选项决定了 MPC 的路径或文件的路径是相对的还是绝对的。如果从可执行文件夹创建快捷方式(例如使用 ALT+拖动),则必须完全限定视频文件的路径。

或者,您也可以创建一个批处理文件作为快捷方式,如下所示:

:: 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%
Run Code Online (Sandbox Code Playgroud)

由于该START命令,CMD 窗口将在启动(或重新启动)媒体播放器后立即关闭,通常甚至不可见。

其他开关可以与此命令结合使用。您可以通过使用/?switch调用可执行文件来获取最新列表,但这些是与 一起使用的一些最有趣的列表startpos

  • /close: 播放后关闭播放器(可能仅在与 一起使用时才有效/play
  • /playnext 播放后打开文件夹中的下一个文件
  • /fullscreen: 以全屏模式启动
  • /minimized: 以最小化模式启动
  • /nofocus: 在后台打开 MPC-HC
  • /new:使用播放器的新实例
  • /monitor #: 在监视器 N 上启动播放器,其中 N 从 1 开始
  • start #: 替代startpos使用毫秒代替