Skip to content

zellerin/ready-player

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

👉 Support this work via GitHub Sponsors

Ready Player Mode

A lightweight major mode to open media (audio/video) files in an Emacs buffer.

screenshots/audio-player.png

screenshots/video-player.png

Install

This package isn’t on MELPA just yet. In the meantime, clone the repo or use the handy package-vc-install (as of Emacs 29):

(package-vc-install "https://github.com/xenodium/ready-player")

Setup

(require 'ready-player)
(ready-player-add-to-auto-mode-alist)

To customize supported media files, set ready-player-supported-media before invoking ready-player-add-to-auto-mode-alist.

use-package

You can combine the previous install/setup into something like the following:

(use-package ready-player
  :init
  (unless (package-installed-p (intern "ready-player"))
    (package-vc-install "https://github.com/xenodium/ready-player"))
  :config
  (ready-player-add-to-auto-mode-alist))

External dependencies

Playback

ready-player-mode relies on command line utilities to play media.

By default, ready-player-mode will try to use either mpv, vlc, ffplay, or mplayer (in that order). Customize ready-player-open-playback-commands to your preference.

Install either of these using your favorite method.

On macOS:

brew install mpv

Metadata

Metadata is extracted using ffprobe, which comes bundled with ffmpeg.

Install using your favorite method.

On macOS:

brew install ffmpeg

Thumbnails

ready-player-mode prefers ffmpegthumbnailer to generate thumbnails, but will fallback to ffmpeg otherwise.

Install using your favorite method.

On macOS:

brew install ffmpegthumbnailer

Customizations

Custom variableDescription
ready-player-supported-mediaSupported media types.
ready-player-play-iconPlay icon string, for example: “⏵”.
ready-player-stop-iconStop icon string, for example: “■”.
ready-player-open-externally-iconOpen externally icon string, for example: “➦”.
ready-player-show-thumbnailWhether or not to attempt to display a thumbnail.
ready-player-open-playback-commandsCommand line utilities to try for playback.

Commands

SPCready-player-toggle-play-stopToggle play/stop of media.
o or eready-player-open-externallyOpen visited file in default external program.
ready-player-modeMajor mode to preview and play media files.
pready-player-previous-fileVisit the preceding image in the same directory as the current file.
qready-player-quitQuit `ready-player-mode’ window and kill buffer.
nready-player-next-fileVisit the next media file in the same directory as current file.
TABready-player-next-buttonNavigate to next button.
<backtab>ready-player-previous-buttonNavigate to previous button.

👉 Support this work via GitHub Sponsors

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%