Giter Site home page Giter Site logo

mpv-thumbnailer's Introduction

mpv-thumbnailer

A simple video thumbnailer that uses mpv, primarily intended to be used by a file browser. If you use mpv as your video player and are happy with its playback, you'll likely be happy with mpv-thumbnailer's thumbnails. File format support should be good and aspect ratio errors rare.

mpv-thumbnailer generates multiple thumbnails per file and selects the largest of those files, thus hopefully avoiding the common problem of thumbnailing boring all-black frames. As a downside, this means that mpv-thumbnailer is somewhat slow.

mpv-thumbnailer includes and installs a thumbnailer definition file that works with GNOME's Nautilus. Support for other platforms or file browsers should be easy to add.

Usage: mpv-thumbnailer VIDEO THUMBNAIL SIZE

VIDEO is the input video file to generate a thumbnail from.
THUMBNAIL is the output image file to write.
SIZE is the pixel width/height of the thumbnail image.

Installation

To install, run

make
make PREFIX=/usr/local install

For the make step you need the Rust compiler rustc.

Development Notes

Since version 3.26 GNOME runs thumbnailers sandboxed via Bubblewrap. Any changes should be tested to adhere to those sandbox rules, which currently seem to only be documented in the below bug report.

https://bugzilla.gnome.org/show_bug.cgi?id=774497

mpv-thumbnailer's People

Contributors

otsaloma avatar teohhanhui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

teohhanhui

mpv-thumbnailer's Issues

Portability to Ubuntu

I found two issues to making mpv-thumbnailer work on Ubuntu 18.04 (bionic).

Mpv on bionic does not support the --vf=scale=128:128/dar option syntax. I had to remove "/dar" from the option to make it work. As I could not locate any documentation about /dar I cannot provide a clean fix. I presume /dar refers to the display aspect ratio, and in fact thumbnails look compressed as a result. I could not find an equivalent setting for bionic's mpv (--vf=scale=128:-2 comes close but produces oversized icons for portrait mode videos).

On Debian and Ubuntu, the Gnome install path is /usr/bin, so the install script and the .thumbnailer file need tweaking to remove '/local' from all paths. With the bubblewrap security, symlinks are not sufficient.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.