Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
noelsimbolon committed Jun 17, 2023
1 parent 027ba0d commit 8a6572f
Showing 1 changed file with 40 additions and 83 deletions.
123 changes: 40 additions & 83 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ This repo contains my personal mpv configurations and scripts that I use and are

## Preview

[![preview.png](https://i.postimg.cc/4yXJCQr2/preview.png)](https://postimg.cc/ZBDkppY6)
[![preview-2.png](https://i.postimg.cc/Kvy92sp8/preview-2.png)](https://postimg.cc/K4J77Qy6)
[![preview.png](https://i.postimg.cc/0QYzwWPn/preview.png)](https://postimg.cc/DJzfVcW4)

## Installation (on Windows)
## Installation

### Windows

Here are the steps to install mpv and to use my configuration files on Windows:
* Download the latest 64bit mpv Windows build by shinchiro from [mpv.io/installation](https://mpv.io/installation/) or directly from [here](https://sourceforge.net/projects/mpv-player-windows/files/) and extract it wherever you please. This is now your mpv folder
Expand All @@ -26,125 +27,81 @@ Here are the steps to install mpv and to use my configuration files on Windows:
* In order for the `mpv-gif.lua` script to work, it requires [FFmpeg](https://ffmpeg.org/) with libass enabled and accessible via terminal. See the [installation instructions](https://github.com/Scheliux/mpv-gif-generator#installation) from the script's source repository for further info.
* **(Optional)** By default, the `mpv-gif.lua` script saves GIFs to `C:/Program Files/mpv/gifs`. To modify this, open `gif.conf`, which is located in `portable_config/script-opts` folder, with a text editor and specify the `dir`, which is output directory for GIFs, as you please. For example `dir="C:/Users/USERNAME/Pictures/mpv-gifs"`.
* **(Optional)** Make your own mpv configuration. You can do that by modifying my configuration files and/or making your own from scratch or modifying others' configurations. Check out the [useful links](#useful-links) section for mpv configuration guides.
* You're done. Go watch some videos!

After following the steps above (without any optional steps), your mpv folder should have this structure (on Windows):

```
β”œβ”€β”€ doc
β”‚ β”œβ”€β”€ manual.pdf
β”‚ └── mpbindings.png
β”‚
β”œβ”€β”€ installer
β”‚ β”œβ”€β”€ configure-opengl-hq.bat
β”‚ β”œβ”€β”€ mpv-icon.ico
β”‚ β”œβ”€β”€ mpv-install.bat # Run this with administrator priviledges to install mpv
β”‚ β”œβ”€β”€ mpv-uninstall.bat # Run this with administrator priviledges to uninstall mpv
β”‚ └── updater.ps1
β”‚
β”œβ”€β”€ mpv
β”‚ └── fonts.conf
β”‚
β”œβ”€β”€ portable_config # This is where this repository goes
β”‚ β”œβ”€β”€ bin
β”‚ β”‚ └── mpv-discord.exe # mpv-discord binary
β”‚ β”‚
β”‚ β”œβ”€β”€ fonts
β”‚ β”‚ └── Material-Design-Iconic-Font.ttf
β”‚ β”‚
β”‚ β”œβ”€β”€ script-opts # Contains configuration files for scripts
β”‚ β”‚ β”œβ”€β”€ discord.conf
β”‚ β”‚ β”œβ”€β”€ gif.conf
β”‚ β”‚ └── osc.conf
β”‚ β”‚
β”‚ β”œβ”€β”€ scripts
β”‚ β”‚ β”œβ”€β”€ audio_visualizer.lua # Script to visualize audio playback when playing audio files
β”‚ β”‚ β”œβ”€β”€ autoload.lua
β”‚ β”‚ β”œβ”€β”€ copy-time.lua
β”‚ β”‚ β”œβ”€β”€ cycle-commands.lua
β”‚ β”‚ β”œβ”€β”€ cycle-profile.lua
β”‚ β”‚ β”œβ”€β”€ discord.lua # Script for Discord rich presence
β”‚ β”‚ β”œβ”€β”€ mordenx.lua # Script for modern OSC UI
β”‚ β”‚ β”œβ”€β”€ mpv-gif.lua # Script to create GIFs
β”‚ β”‚ β”œβ”€β”€ playlistmanager.lua
β”‚ β”‚ └── seek-to.lua
β”‚ β”‚
β”‚ β”œβ”€β”€ shaders # Contains external shaders
β”‚ β”‚ β”œβ”€β”€ cache # Cause of gpu-shader-cache-dir='~~/shaders/cache' in mpv.conf (might not show at first)
β”‚ β”‚ β”‚ └── ...
β”‚ β”‚ β”œβ”€β”€ FSRCNNX_x2_16-0-4-1.glsl
β”‚ β”‚ β”œβ”€β”€ KrigBilateral.glsl
β”‚ β”‚ β”œβ”€β”€ nnedi3-nns256-win8x4.hook
β”‚ β”‚ └── SSimDownscaler.glsl
β”‚ β”‚
β”‚ β”œβ”€β”€ input.conf
β”‚ └── mpv.conf
β”‚
β”œβ”€β”€ d3dcompiler_43.dll
β”œβ”€β”€ mpv.com
β”œβ”€β”€ mpv.exe # The mpv executable file
└── updater.bat # Run this with administrator priviledges to update your mpv to the latest version
```

## Installation (on Arch Linux)

Here are the steps to install mpv and to use my configuration files on Arch Linux:
* To install mpv, use the package manager that comes with your Linux distribution. The package name for mpv might also vary depending on your Linux distribution. Here, I will make Arch Linux, which comes with `pacman` as its package manager, as an example
* Install mpv using `pacman`
* You're all set up. Go watch some videos!

### Linux

Here are the steps to install mpv and to use my configuration files on Linux:

* Install mpv and xclip (clipboard CLI interface) using the package manager that comes with your Linux distribution. xclip is needed for [copy-time.lua](https://github.com/noelsimbolon/mpv-config/blob/linux/scripts/copy-time.lua) and [seek-to.lua](https://github.com/noelsimbolon/mpv-config/blob/linux/scripts/seek-to.lua) scripts to work properly. The package name for mpv and xclip might also vary depending on your Linux distribution. Here, I will make Arch Linux, that comes with `pacman` as its package manager, as an example

```
sudo pacman -S mpv
sudo pacman -S mpv xclip
```

If you, for example, use Fedora Linux, that comes with `dnf` as its package manager, you can install mpv and xclip with the following command instead.
```
sudo dnf install mpv xclip
```

If you use other Linux distributions, please refer to the documentation of your Linux distribution's package manager on how to install packages.

* Download the `linux.zip` file from this repo's [latest release](https://github.com/noelsimbolon/mpv-config/releases/latest) and extract it to your standard mpv configuration directory which is `~/.config/mpv`
* To make some scripts work, you need to modify them from the release a little bit:
* For `discord.lua` to work, open `discord.conf`, which is located in `portable_config/script-opts` folder, with a text editor and specify the `binary_path` which is the full path (not a relative path) to `mpv-discord` executable binary. For example `binary_path=/home/USER/.config/mpv/bin/mpv-discord`. Make sure you're not using any quotation marks before and after the path.
* In order for the `mpv-gif.lua` script to work, it requires [FFmpeg](https://ffmpeg.org/) with libass enabled and accessible via terminal. See the [installation instructions](https://github.com/Scheliux/mpv-gif-generator#installation) from the script's source repository for further info.
* **(Optional)** By default, the `mpv-gif.lua` script saves GIFs to `~/Videos/mpv-gifs`. To modify this, open `gif.conf`, which is located in `portable_config/script-opts` folder, with a text editor and specify the `dir`, which is output directory for GIFs, as you please. For example `dir="~/Videos"`.
* **(Optional)** Make your own mpv configuration. You can do that by modifying my configuration files and/or making your own from scratch or modifying others' configurations. Check out the [useful links](#useful-links) section for mpv configuration guides.
* You're done. Go watch some videos!
* You're all set up. Go watch some videos!

## Scripts

Scripts used:
* [audio-visualizer.lua](https://github.com/noelsimbolon/mpv-config/blob/main/scripts/audio_visualizer.lua) β€”
* [audio-visualizer.lua](https://github.com/noelsimbolon/mpv-config/blob/linux/scripts/audio_visualizer.lua) β€”
[source](https://github.com/mfcc64/mpv-scripts#visualizerlua)\
Various audio visualization. The default keybind to cycle visualizer is <kbd>c</kbd>. It only works if you open audio files.
Various audio visualization. It only works if you open audio files.

* [autoload.lua](https://github.com/noelsimbolon/mpv-config/blob/main/scripts/autoload.lua) β€”
* [autoload.lua](https://github.com/noelsimbolon/mpv-config/blob/linux/scripts/autoload.lua) β€”
[source](https://github.com/mpv-player/mpv/blob/master/TOOLS/lua/autoload.lua)\
Automatically load playlist entries before and after the currently playing file, by scanning the directory.

* [copy-time.lua](https://github.com/noelsimbolon/mpv-config/blob/main/scripts/copy-time.lua) β€” [source](https://github.com/linguisticmind/mpv-scripts/tree/master/copy-time)\
* [copy-time.lua](https://github.com/noelsimbolon/mpv-config/blob/linux/scripts/copy-time.lua) β€” [source](https://github.com/linguisticmind/mpv-scripts/tree/master/copy-time)\
Copies current timecode in HH:MM:SS.MS format to clipboard. Cross-platform (Mac, Windows, Linux).

* [cycle-commands.lua](https://github.com/noelsimbolon/mpv-config/blob/main/scripts/cycle-commands.lua) β€”
* [cycle-commands.lua](https://github.com/noelsimbolon/mpv-config/blob/linux/scripts/cycle-commands.lua) β€”
[source](https://github.com/CogentRedTester/mpv-scripts#cycle-commands)\
Cycles through a series of commands on a keypress. Each iteration of the cycle can contain as many commands as one wants. Syntax details are at the top of the file.

* [cycle-profile.lua](https://github.com/noelsimbolon/mpv-config/blob/main/scripts/cycle-profile.lua) β€”
* [cycle-profile.lua](https://github.com/noelsimbolon/mpv-config/blob/linux/scripts/cycle-profile.lua) β€”
[source](https://github.com/CogentRedTester/mpv-scripts#cycle-profile)\
Cycles through a list of profiles sent via a script message and prints the profile-desc to the OSD. More details at the top of the file.

* [mpv-discord.lua](https://github.com/noelsimbolon/mpv-config/blob/main/scripts/discord.lua) β€”
* [mpv-discord.lua](https://github.com/noelsimbolon/mpv-config/blob/linux/scripts/discord.lua) β€”
[source](https://github.com/tnychn/mpv-discord)\
A cross-platform Discord Rich Presence integration for mpv with no external dependencies. Consists of a Go binary for updating the presence and a Lua script for launching it.

* [mordenx.lua](https://github.com/noelsimbolon/mpv-config/blob/main/scripts/mordenx.lua) β€”
* [mordenx.lua](https://github.com/noelsimbolon/mpv-config/blob/linux/scripts/mordenx.lua) β€”
[source](https://github.com/cyl0/mpv-osc-morden-x)\
A modern OSC UI replacement for MPV that retains the functionality of the default OSC.

* [mpv-gif.lua](https://github.com/noelsimbolon/mpv-config/blob/main/scripts/mpv-gif.lua) β€”
* [mpv-gif.lua](https://github.com/noelsimbolon/mpv-config/blob/linux/scripts/mpv-gif.lua) β€”
[source](https://github.com/Scheliux/mpv-gif-generator)\
Script to generate GIFs from video playback. Requires FFmpeg with libass enabled. The exporting GIFs with subtitled currently doesn't work properly.

* [playlistmanager.lua](https://github.com/noelsimbolon/mpv-config/blob/main/scripts/playlistmanager.lua) β€”
* [playlistmanager.lua](https://github.com/noelsimbolon/mpv-config/blob/linux/scripts/playlistmanager.lua) β€”
[source](https://github.com/jonniek/mpv-playlistmanager)\
Allows you to see and interact with your paylist in an intuitive way.

* [seek-to.lua](https://github.com/noelsimbolon/mpv-config/blob/main/scripts/seek-to.lua) β€”
* [seek-to.lua](https://github.com/noelsimbolon/mpv-config/blob/linux/scripts/seek-to.lua) β€”
[source](https://github.com/dexeonify/mpv-config/blob/main/scripts/seek-to.lua)\
Seek to an absolute timestamp specified via keyboard input or pasted from clipboard.

* [sponsorblock-minimal.lua](https://github.com/noelsimbolon/mpv-config/blob/linux/scripts/sponsorblock-minimal.lua) β€” [source](https://codeberg.org/jouni/mpv_sponsorblock_minimal)\
Skip sponsor segments in YouTube videos.

* [thumbfast.lua](https://github.com/noelsimbolon/mpv-config/blob/linux/scripts/thumbfast.lua) β€” [source](https://github.com/po5/thumbfast)\
High-performance on-the-fly thumbnailer for mpv. **The script does not display thumbnails on its own**, it is meant to be used alongside a UI script that calls thumbfast.

Configuration files for these scripts can be found in the `script-opts` folder. I also modified some of these scripts' default keybindings. To see my modifications, look for script keybindings in `input.conf`.

## Shaders
Expand Down Expand Up @@ -186,8 +143,8 @@ Use shaders based on your preference and system capabilities. For more info abou
* [mpv homepage](https://mpv.io/)
* [mpv wiki](https://github.com/mpv-player/mpv/wiki)
* [mpv FAQ](https://github.com/mpv-player/mpv/wiki/FAQ)
* [mpv manual](https://mpv.io/manual/master/)
* [mpv manual](https://mpv.io/manual/stable/)

## To Do

- [x] Create a branch for configurations to be used in linux-based machines
- [x] Create a branch for configurations to be used in linux-based machines

0 comments on commit 8a6572f

Please sign in to comment.