detuur / mpv-scripts Goto Github PK
View Code? Open in Web Editor NEWThis is a collection of my own mpv scripts.
License: MIT License
This is a collection of my own mpv scripts.
License: MIT License
Weird bug maybe. But only persists when boss-key.lua
is in scripts directory.
logs:
6y0dbg.log
There's a noticeable startup delay when using boss-key.lua. If I remove it, player starts instantly. Please do fix it. Other than than that, fantastic.
Not sure if you would be interested in creating something like that, but I love the idea of a script that would fast forward (let's say, a configurable 200% increase of the current speed) while there are no subtitles, and would immediately slow down to the previous speed once there are subtitles again.
Hi! The boss key functionality can be implemented with three consecutive commands in input.conf:
b set pause yes; set fullscreen no; set window-minimized yes
OS: ubuntu 18.04
MPV: mpv git-2019-04-25-71ad1e2
"b" will pause but won't minimise the player; fullscreen and normalscreen.
if you need any more information.
From time to time when I use skiptosilence (f3), it will continue to speed through the video, and mess up the video (make the screen black). I assume this is because it doesn't find an area without sound for some reason so it continues to go without stopping, doing something to the video while its at it. After video is reloaded the video persists to be invisible due to some kind of settting applied by skiptofade script.
Opening a file affected by this issue will spread to other files you open in the same window and make them unwatchable too, and it is really messed up if the user doesn't know what to do, and it has honestly troubled me alot today. (I eventually found a work around by renaming my files to something else)
I currently have a few videos I can't watch anymore because the screen is black (subtitles show, and audio is working) each time I open them they continue to use whatever settings the script did to the video...
Could you resolve this problem? Or help me get my videos working again? I think I need to delete the cache containing details per-video about what settings to use.. and I have no idea where to find that.
Everything is good as it is. But I need to not pause but only do the minimizing action when a file has finished playing. I think there could be an easy tweak in the script to accomplish this but I don't have any coding knowledge whatsoever to make it happen.
Admin edit: This issue thread is not an issue/bug/question per se, but also not something I want to close and put out of sight of new users. A wiki is overkill for this project, so I figured a single pinned thread is a nice, low-barrier-of-entry, and visible approach for simple tricks, tips, and questions. Feel free to share ideas and converse about the project here.
--@detuur
original post:
This is not an issue thread. I Just thought I'd share something.
I'm using your Boss-Key.lua script with an Autohotkey software combination.
Just in case if you didn't know, AutoHotkey is a free program aimed at providing easy keyboard shortcuts, hotkeys and fast macro-creation.
https://en.wikipedia.org/wiki/AutoHotkey
So the way I'm using your script in conjunction with AutoHotKey is like this:
Whenever the escape button is pressed on my keyboard First the AutoHotKey script that I've set up intercepts that input, modifies it and then sends it in whatever combination you wish/prefer.
So the way I've set it up is that when the escape button is pressed it sends in the Escape Button Command which pauses and minimizes MPV and after that it sends in another command which initiates a second script that removes the window from the windows taskbar effectively hiding whatever you were watching from prying eyes.
Source for the hide window script:
https://www.computoredge.com/AutoHotkey/Downloads/HideWindow.ahk
My AutoHotkey Escape Button Script:
Esc::
sleep 1
Send {Esc}
sleep 3
Send #h
return
Mplug is like a package manager but for mpv scripts.
Please add your script there (if already not there) and also installation instructions in manifest - https://github.com/Nudin/mpv-script-directory/blob/master/HOWTO_ADD_INSTALL_INSTRUCTIONS.md
Like the "skip silence" browser extension or Just player, it would be awesome if the script have the ability to skip the silence part of video. In many online class videos, the silent parts are totally waste of time.
The silent skip function of newpie and justpalyer is very powerful, but unfortunately they only available on Android. After a lot of searching it seems that only your script can provide this feature to mpv. Please consider upgrade the script with this feature, it would be very useful !!
Pressing h does nothing and pressing Shift+h or Ctrl+h gives the corresponding OSD messages, but no histogram is displayed.
MPV is loaded with no config or other scripts:
mpv --no-config --load-scripts=no -player-operation-mode=pseudo-gui --log-file=log.txt --script=histogram.lua test.mp4
I am running Ubuntu 20.04 and tried it with multiple video files.
[ 0.003][v][cplayer] mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
[ 0.003][v][cplayer] built on UNKNOWN
[ 0.003][v][cplayer] ffmpeg library versions:
[ 0.003][v][cplayer] libavutil 56.31.100
[ 0.003][v][cplayer] libavcodec 58.54.100
[ 0.003][v][cplayer] libavformat 58.29.100
[ 0.003][v][cplayer] libswscale 5.5.100
[ 0.003][v][cplayer] libavfilter 7.57.100
[ 0.003][v][cplayer] libswresample 3.5.100
[ 0.003][v][cplayer] ffmpeg version: 4.2.4-1ubuntu0.1
I added some debug messages:
function toggleFilter()
local vf_table = mp.get_property_native("vf")
msg.debug("histdebug 1")
if #vf_table > 0 then
msg.debug("2")
for i = #vf_table, 1, -1 do
msg.debug("3")
if vf_table[i].label == "histogram" then
msg.debug("4")
for j = i, #vf_table-1 do
msg.debug("5")
vf_table[j] = vf_table[j+1]
end
vf_table[#vf_table] = nil
else
msg.debug("6")
vf_table[#vf_table + 1] = {
label="histogram",
name="lavfi",
params= {
graph = buildGraph()
}
}
end
mp.set_property_native("vf", vf_table)
msg.debug("7")
return
end
msg.debug("8")
end
msg.debug("9")
end
The log output:
[ 3.435][d][cplayer] Run command: script-binding, flags=73, args=["histogram/toggle-histogram"]
[ 3.435][d][histogram] histdebug 1
[ 3.436][d][histogram] 9
#vf_table > 0
returns false apparently and the problem seems to be with the vf_table.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.