{"id":13752900,"url":"https://github.com/occivink/mpv-gallery-view","last_synced_at":"2025-05-09T20:34:34.392Z","repository":{"id":28008899,"uuid":"115854753","full_name":"occivink/mpv-gallery-view","owner":"occivink","description":"Gallery-view scripts for mpv","archived":false,"fork":false,"pushed_at":"2024-09-27T13:14:27.000Z","size":208,"stargazers_count":223,"open_issues_count":23,"forks_count":21,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-04T04:14:12.854Z","etag":null,"topics":["gallery","lua","mpv","script"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/occivink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-12-31T09:38:07.000Z","updated_at":"2025-04-28T20:38:35.000Z","dependencies_parsed_at":"2023-01-14T07:55:51.099Z","dependency_job_id":"8e9ad6c3-f3e5-4070-b1e7-2984468eb5dc","html_url":"https://github.com/occivink/mpv-gallery-view","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/occivink%2Fmpv-gallery-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/occivink%2Fmpv-gallery-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/occivink%2Fmpv-gallery-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/occivink%2Fmpv-gallery-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/occivink","download_url":"https://codeload.github.com/occivink/mpv-gallery-view/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253321796,"owners_count":21890466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gallery","lua","mpv","script"],"created_at":"2024-08-03T09:01:12.354Z","updated_at":"2025-05-09T20:34:31.129Z","avatar_url":"https://github.com/occivink.png","language":"Lua","funding_links":[],"categories":["Lua","Image","lua"],"sub_categories":[],"readme":"Playlist view and [contact sheet](https://en.wikipedia.org/wiki/Contact_print) scripts for [mpv](https://github.com/mpv-player/mpv).\n\n[![demo](https://i.vimeocdn.com/video/811681643.jpg)](https://vimeo.com/358137972)\n\n# Important\n\n* **Make sure that the thumbnail directory exists for thumbnail generation to work.**\n* The default directories are: `~/.cache/thumbnails/mpv-gallery` on Unix, `%APPDATA%\\mpv\\gallery-thumbs-dir` on Windows. See Configuration for instructions on how to change it.\n\n# Installation\n\nCopy the .lua files in `scripts/` to your mpv scripts directory (See [mpv's manual](https://mpv.io/manual/master/#files)). Copy `script-modules/gallery.lua` to a directory called script-modules. This directory should be alongside the scripts directory in mpv's config path. Create the directories, if not already present. \n\n\nIf you are not interested in the playlist view or contact sheet, respectively remove the [`playlist-view.lua`](scripts/playlist-view.lua) or [`contact-sheet.lua`](scripts/contact-sheet.lua) files.\n\nYou can make multiple copies (or symlinks) of [`gallery-thumbgen.lua`](scripts/gallery-thumbgen.lua) to speed up thumbnail generation, they will register themselves automatically.\n\n# Usage\n\nBy default, the playlist-view can be opened with `g` and the contact-sheet with `c`.\n\nIn both you can navigate around using arrow keys or the mouse.\n\nWhen you activate an item in the playlist-view, it will switch to that file. In the contact sheet, it will seek to that timestamp.\n\n# Configuration\n\nBoth scripts can be configured through the usual `script-opts` mechanism of mpv (see its [manual](https://mpv.io/manual/master/#files)). The files [`contact_sheet.conf`](script-opts/contact_sheet.conf) and [`playlist_view.conf`](script-opts/playlist_view.conf) in this repository contain a detailed list of options.\n\nNote that both scripts cannot be used at the same time, as they compete for the same resources. If you want to use both, I recommend using the following input.conf bindings:\n```\ng script-message contact-sheet-close; script-message playlist-view-toggle\nc script-message playlist-view-close; script-message contact-sheet-toggle\n```\nTo ensure that only one of the scripts is active at a time.\n\n# Playlist-view flagging\n\nWhen the playlist-view is open, you can flag playlist entries (using `SPACE` by default). Flagged entries are indicated with a small frame. Then, when exiting mpv a text file will be created (default `./mpv_gallery_flagged`) containing the filenames of the flagged entries, one per line.\n\n# Limitations\n\nYet another ad-hoc thumbnail library, which is not shared with any other program.\n\nManagement of the thumbnails is left to the user. In particular, stale thumbnails (whose file has been (re)moved) are not deleted by the script. This can be fixed by deleting thumbnails which have not been accessed since N days with such a snippet:\n```\ndays=7\nmin=$((days * 60 * 24))\n# run first without -delete to be sure\nfind ~/.cache/thumbnails/mpv-gallery/ -maxdepth 1 -type f -amin +$min -delete\n```\n\nThumbnails are raw bgra, which is somewhat wasteful. With the default settings, a thumbnail uses 81KB (around 13k thumbnails in a GB).\n\nDue to an [mpv bug](https://github.com/mpv-player/mpv/issues/8350), the playlist-view or contact-sheet might not appear right away when toggled. Using the mpv config `video-sync=display-resample` or the script config `pause_on_start=no` indirectly solves the problem.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foccivink%2Fmpv-gallery-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foccivink%2Fmpv-gallery-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foccivink%2Fmpv-gallery-view/lists"}