Package for Emacs to display media progress in dired
and dirvish
.
For now only mpv player is supported.
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.
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))
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))
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!
- I reused https://github.com/amno1/dired-git-log code for my dired minor mode, thank you for your work!