jellyfin-mpv-shim
jellyfin-mpv-shim copied to clipboard
Support for Censor Script to censor a fragement of a video
What is Censor Script?
Censor is a lua script that is used to skip a fragment of a video with the help of timestamps that is manually listed inside the folder "names" with the respective filename of the video with the txt extension.
It is used to skip over parts of videos you don't want (others) to view.
##download and installation
download only "censor" folder and its contents. put the "censor" folder(along with files in it i.e "names" folder and "main.lua") in the "scripts" folder inside mpv configuration folder.
link to the script: https://github.com/zenyd/mpv-scripts/tree/master/censor
Usage: imagine you want to skip the intro which begins on timestamp 0:2:30 and lasts until timestamp 0:4:00 your anime is called Attack on Titan - 03.mkv. So you create a text file named Attack on Titan - 03.txt inside the names folder. Now open the just created file and paste 0:02:30 0:04:00 inside it. Save and exit. If you open the anime Attack on Titan - 03.mkv it should now skip to the timestamp 0:04:00 after the playtime reaches 0:02:30. If you now also wanted to skip the ending you would add one more line to the text file with contents like this 0:21:00 0:22:00 source of usage - zenyd (https://github.com/zenyd/mpv-scripts/issues/30#issuecomment-872418598)
Issue: As the file is named according to the video name, jellyfin mpv shim can't recognize it.
Try updating the script to read the media title instead of the file name: https://github.com/jellyfin/jellyfin-mpv-shim/issues/214
I am not familiar with Lua Scripting.
changing fromlocal filename = mp.get_property('filename/no-ext', nil)
to local filename = mp.get_property('media-title')
Doesn't work.
What about force-media-title
? That is the property that I actually set to cause MPV to show the right title.
But it also looks like it uses the file loaded event which may fire before that gets set. I know you can listen to properties being set to maybe it could wait until the forced title is set?
I don't quite get you.