kelciour / mpv-scripts Goto Github PK
View Code? Open in Web Editor NEWExperimental scripts for mpv video player, mostly for foreign language learning
Experimental scripts for mpv video player, mostly for foreign language learning
Hi,
I often use Losslesscut for cutting video.
I like the fact that it is not reencoding the video.
Do you think would be possible to implement this ? I may miss something. I have tried but did not succeeded until now.
Losslesscut use this cmd:
ffmpeg -hide_banner -ss start_timestamp -i video_path -t t -avoid_negative_ts make_zero -c copy -map '0:0' -map '0:1' -map_metadata 0 -movflags use_metadata_tags -movflags '+faststart' -ignore_unknown -f mp4 -y output.mp4
I tried to change your code :
args = {
ffmpeg_path,
"-y",
"-ss", start_timestamp,
"-i", video_path,
"-t", t,
"-map", "0:v:0",
"-map", "0:a:" .. ff_aid,
"-af", "afade=t=in:st=0:d=" .. d .. ",afade=t=out:st=" .. (t - d) .. ":d=" .. d,
"-c:v", "libx264",
"-preset", video_encoding_preset,
"-c:a", "aac",
"-ac", "2",
filename .. ".mp4"
}
into
args = {
ffmpeg_path,
"-ss", start_timestamp,
"-i", video_path,
"-t", t,
"-c", "copy",
"-avoid_negative_ts", "make_zero",
"-map", "'0:0'",
"-map", "'0:1'",
"-map_metadata", "0",
"-movflags", "use_metadata_tags",
"-movflags", "'+faststart'",
"-ignore_unknown",
-- "-f", "mp4",
"-y",
filename .. ".mp4"
}
sub-playback.lua
'i - interactive mode on/off' does not work
Would it be possible to have the sub search open in one of the top corners or something instead? since the OSD covers it up
It would be nice if the script could work with .ass file seeing as how they are a very common subtitle format.
I apologize I can't read the code. so I don't what the intention of it! I was searching for a way to create subtitles using the audio & google got me here. the description says it needs translated subtitles then one must wonder what it is generating? translation has already been done. so what this script is actually doing can you please layman it for me?
I only have this doubt: Currently, the clip generated is saved in my ~/
directory.
Is it possible to define another directory so that it is saved? Thank you very much in advance.
The script is working very well! Congratulations!
Can we make it work also for automatic subtitles?
Hi, i haven't used this scripts for a long time. When I switched to linux, i decided to use it again and i encountered this problem. If i open the video in normal ways scripts doesn't work. but if i open it from terminal, scripts works fine.
Os: EndeavourOS KDE Plasma 5.24
Linux: 5.16.10-zen
Mpv: 0.34.0-198-gbc9805c71a
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.
First of all, thank you for your awesome work. I use sub-cut.lua and it works perfectly โ except when dealing with youtube links.
Right now, when I try to cut youtube videos, the sub-cut.lua plugin gives the following error:
/home/user/watch?v=WOfmnbU5S5o: No such file or directory
when opened with
mpv https://www.youtube.com/watch?v=WOfmnbU5S5o
and trying to cut the video.
It obviously points to a non-existing file, as it is a not known use case for the plugin.
It would be awesome if you were able to cut youtube videos on the fly. I have no idea how hard this is to implement, but it would be nice-to-have feature.
You would have to know where and how the cache is layed, and from there, try to figure out which parts to use.
Somewhat related links on this issue:
https://mpv.io/manual/master/#options-cache-file
antoniy/mpv-youtube-dl-binding#32
ytdl-org/youtube-dl#622
I really don't understand how to use this?
Kindly make some tutorials about it. thanks.
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.