All Projects → occivink → mpv-image-viewer

occivink / mpv-image-viewer

Licence: Unlicense License
Configuration, scripts and tips for using mpv as an image viewer

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to mpv-image-viewer

HPlayer2
Modular Media Player for Raspberry Pi and more...
Stars: ✭ 28 (-82.17%)
Mutual labels:  mpv
immersive
Language learning mpv script for looking up words within mpv and generating Anki cards
Stars: ✭ 43 (-72.61%)
Mutual labels:  mpv
jpegview
Fork of JPEGView by David Kleiner - fast and highly configurable viewer/editor for JPEG, BMP, PNG, WEBP, TGA, GIF and TIFF images with a minimal GUI. Basic on-the-fly image processing is provided - allowing adjusting typical parameters as sharpness, color balance, rotation, perspective, contrast and local under-/overexposure.
Stars: ✭ 250 (+59.24%)
Mutual labels:  image-viewer
MPV lazy
🔄 mpv player 播放器折腾记录 windows conf ; 中文注释配置 快速帮助萌新入门 ; mpv-lazy 懒人包 win10 x64
Stars: ✭ 615 (+291.72%)
Mutual labels:  mpv
gallery-server
Beautiful and powerful yet simple local image viewer on your PC or mobile.
Stars: ✭ 16 (-89.81%)
Mutual labels:  image-viewer
twitchpipe
Pipe your favorite Twitch streams to the media player of your choice, or a file to save them for later. Supports low-latency playback.
Stars: ✭ 28 (-82.17%)
Mutual labels:  mpv
dotfiles
My life's work 🔥🔥
Stars: ✭ 28 (-82.17%)
Mutual labels:  mpv
view
Image Viewer for BART
Stars: ✭ 13 (-91.72%)
Mutual labels:  image-viewer
webtorrent-mpv-hook
Adds a hook that allows mpv to stream torrents
Stars: ✭ 67 (-57.32%)
Mutual labels:  mpv
image-viewer
A simple image viewer with some editing functionality.
Stars: ✭ 31 (-80.25%)
Mutual labels:  image-viewer
ImagePicker
Android library to choose image from gallery or camera with option to compress result image
Stars: ✭ 73 (-53.5%)
Mutual labels:  image-viewer
mpv-discord
🎈 A cross-platform Discord Rich Presence integration for mpv with no external dependencies.
Stars: ✭ 83 (-47.13%)
Mutual labels:  mpv
vue-photoswipe
PhotoSwipe demo built with vue
Stars: ✭ 55 (-64.97%)
Mutual labels:  image-viewer
mpv-youtube-upnext
A userscript for MPV that allows you to play "up next"/recommended youtube videos ⏭️
Stars: ✭ 29 (-81.53%)
Mutual labels:  mpv
playercast
Cast to media player and control playback remotely.
Stars: ✭ 46 (-70.7%)
Mutual labels:  mpv
termv
A terminal iptv player written in bash
Stars: ✭ 119 (-24.2%)
Mutual labels:  mpv
animwall
Animated wallpapers for Linux
Stars: ✭ 28 (-82.17%)
Mutual labels:  mpv
dotfiles
Config files for i3, polybar, rofi, mpv, Xresources, kitty and some bash-things...
Stars: ✭ 52 (-66.88%)
Mutual labels:  mpv
ssh-mpv
List/play videos over ssh using mpv.
Stars: ✭ 20 (-87.26%)
Mutual labels:  mpv
zsh-image-extension
Image viewing capabilities for zsh
Stars: ✭ 14 (-91.08%)
Mutual labels:  image-viewer

This repository aggregates configurations, scripts and tips for using mpv as an image viewer. The affectionate nickname mvi is given to mpv in such case.

This README assumes basic familiarity with mpv and its configuration. The information here should be platform-agnostic for the most part.

demo

Why?

mpv is a competent video player and sufficiently lightweight to use comfortably to view images. It features advanced scaling algorithms and color management, which are key features in an image viewer.
It is also very extensible which allows us to compensate for some missing image viewer features easily.
It won't compete with feh or the likes when it comes to size or startup time, but it is still plenty fast.

Configuration

There are several options for making an mvi configuration.

  • Use the normal mpv config, and apply changes at runtime. You will need detect-image.lua and use input sections and profiles to make this work.
  • Or create an entirely separate ~/.config/mvi/ directory and use the alias alias mvi='mpv --config-dir=$HOME/.config/mvi'

The first option is more complex, the second results in essentially two separate programs.

The examples mpv.conf and input.conf in this repository are commented to highlight (un)desirable settings.

Scripts

image-positioning.lua

Adds several high-level commands to zoom and pan:

drag-to-pan: pan the image with the cursor, while keeping the same part of the image under the cursor
pan-follows-cursor: pan the image in the direction of the cursor
cursor-centric-zoom: (de)zoom the video while keeping the same part of the image under the cursor
align-border: align the border of the image with the border of the window
pan-image: pan the image in a direction, optionally ignoring the zoom or forcing the image to stay visible
rotate-video: rotate the image in 90 degrees increment
reset-pan-if-visible: reset the pan if the entire image is visible

There are no default bindings, see input.conf for how to bind them.

status-line.lua

Adds a status line that can show different properties in the corner of the window. By default it shows filename [positon/total] in the bottom left.

Can be activated with the commands status-line-enable, status-line-disable, status-line-toggle and configured through status_line.conf.

detect-image.lua

Allows you to run specific commands when images are being displayed. Does not do anything by default, needs to be configured through detect_image.conf.

For example, this makes it possible to setup bindings that are only in effect with images, like so:

command_on_first_image_loaded=enable-section image-viewer
command_on_non_image_loaded=disable-section image-viewer

Where the 'image-viewer' bindings are specified like so input.conf.

minimap.lua

Adds a minimap that displays the position of the image relative to the view.
Can be activated with minimap-enable, minimap-disable, minimap-toggle and configured through minimap.conf.

ruler.lua

Adds a ruler command that lets you measure positions, distances and angles in the image. Can be configured through ruler.conf.

freeze-window.lua

By default, mpv automatically resizes the window when the current file changes to fit its size. This script freezes the window so that this does not happen. There is no configuration.

Others

Some other mpv scripts work well with mvi, here are a few (feel free to send a PR for others):

playlist-view: show all images in a grid view
zones: send different commands depending on cursor position
autoload: automatically load all files in the same directory. Set videos=no and audio=no in script-opts/autoload.conf to only autoload images.
delete-file: delete the current file
mpv_crop_script: featureful screenshot tool
auto-profiles: apply profiles conditionally. Can be used to lower settings with huge images
crop: simple cropping script
playlist-manager: playlist management script
blacklist-extensions: remove files from the playlist based on their types

Credits

Thanks to haasn for coming up first with the image-viewer config, all the mpv devs and the /mpv/ funposters.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].