Skip to content

jumper047/media-progress

Repository files navigation

media-progress

./screenshot.png

Package for Emacs to display media progress in dired and dirvish. For now only mpv player is supported.

Installation

system packages

Install mpv media player. Add to your mpv config:

save-position-on-quit=yes
keep-open=yes

You can find your mpv config in ~/.config/mpv/mpv.conf on Linux and in ~/mpv/mpv.conf on Windows (~/ resolves to AppData/Roaming).

First line enables save position on quit (this package reads it later from mpv config directory) Second line disables closing on media’s end. This line is necessary because mpv will not save position when player will be closed on video’s end, and information about watched video will be lost.

Optionally (but highly recommended) - install mediainfo to display more useful information.

dired minor mode

https://melpa.org/packages/media-progress-dired-badge.svg

Install package media-progress-dired from MELPA, then add to your config: src_emacs-lisp{(add-hook ‘dired-mode-hook #’media-progress-dired-mode)}

If you are use-package user:

(use-package media-progress-dired
  :hook (dired-mode . media-progress-dired-mode))

dirvish segment

https://melpa.org/packages/media-progress-dirvish-badge.svg

Install package media-progress-dirvish from MELPA, then add to your config:

(require 'media-progress-dirvish)
(eval-after-load 'dirvish media-progress-dirvish-setup)

If you are use-package user:

(use-package media-progress-dirvish
  :after dirvish
  :config
  (media-progress-dirvish-setup))

Usage

Open any media file with mpv (no matter if it’s launched from Emacs of any other file manager), watch it to some point, press “q” if you added lines, described in installation section, into your config, and “Shift-q” (save and exit shortcut) otherwise. Now progress percent will be displayed in your dirvish/dired buffer!

Acknowledgments

About

Display position where you stopped playing media in mpv

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published