Skip to content

Lua scripts to enhance the behaviour of the excellent open source MPV video player

License

Notifications You must be signed in to change notification settings

HariSekhon/MPV-Scripts

Repository files navigation

Hari Sekhon - MPV-Scripts

GitHub stars GitHub forks LineCount Cocomo License My LinkedIn GitHub Last Commit

Codacy CodeFactor Quality Gate Status Maintainability Rating Reliability Rating Security Rating

CI Builds Overview Linux Mac

Mac Homebrew Alpine CentOS Debian Fedora Redhat Rocky Ubuntu

Repo on GitHub Repo on GitLab Repo on Azure DevOps Repo on BitBucket

Markdown Validation Kics Grype Semgrep Semgrep Cloud SonarCloud Trivy

Summary

Lua code to control the behaviour of the excellent open source mpv video player.

See the scripts/ directory for the Lua code to control MPV.

MPV

https://mpv.io/

:octocat: mpv-player/mpv

MPV Config

  • mpv.conf - MPV settings such as saving position on quit

MPV Scripts

Under the scripts/ directory:

  • resume-conditions.lua - only resume videos that:
    • are at least 10 minutes long
    • have been playing for at least 5 minutes
    • have a certain file extension
    • are under a specific directory tree
  • speed.lua - sets playback speed if environment variable MPV_SPEED is set
  • delete_on_eof.lua - delete a video after completed playback if environment variable MPV_DELETE_ON_EOF is set to any value
    • for those videos you downloaded to only watch once
    • this automatic cleanup helps to save space and reduces you needing to manually delete the video

The environment variables above are useful when used with direnv for specific video directories (eg. I always watch all YouTube videos at double speed and delete them after one complete play).

Migrated from :octocat: DevOps-Bash-tools repo.

Related Docs:

:octocat: HariSekhon/Knowledge-Base - Lua page

:octocat: HariSekhon/Knowledge-Base - MPV page

More Core Repos

Knowledge

Knowledge-Base Diagrams-as-Code

DevOps Code

DevOps-Bash-tools DevOps-Python-tools DevOps-Perl-tools DevOps-Golang-tools

Containerization

Kubernetes-configs Dockerfiles

CI/CD

GitHub-Actions Jenkins

Databases - DBA - SQL

SQL-scripts

DevOps Reloaded

HAProxy-configs Terraform Packer Ansible Environments

Monitoring

Nagios-Plugins Nagios-Plugin-Kafka Prometheus

Templates

Templates Template-repo

Desktop

TamperMonkey Hammerspoon MPV-Scripts

Spotify

Spotify-tools Spotify-playlists

The rest of my original source repos are here.

Pre-built Docker images are available on my DockerHub and can be re-generated using the my Dockerfiles repo.

About

Lua scripts to enhance the behaviour of the excellent open source MPV video player

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published