8000 GitHub - tanrax/ready-player
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tanrax/ready-player

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 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.

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" :last-release)

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" :last-release))
  :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.

macOS SF Symbols

By default, ready-player-mode will try to use macOS SF Symbols (if available) for ready-player-play-icon ready-player-stop-icon and ready-player-open-externally-icon.

You’ll need to enable SF symbol rendering in Emacs (before loading =ready-player.el=).

(when (memq system-type '(darwin))
  (set-fontset-font t nil "SF Pro Display" nil 'append))

Commands

ready-player-add-to-auto-mode-alistAdd media recognized by `ready-player-mode’.
ready-player-stopStop media playback.
SPCready-player-toggle-play-stopToggle play/stop of media.
ready-player-playStart media playback.
ready-player-remove-from-auto-mode-alistRemove media recognized by `ready-player-mode’.
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.
gready-player-toggle-reload-bufferReload media from file.
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%
0