Comments (4)
This can be achieved by going to Settings > Open Config Folder, and then creating (I think it's not there by default) a text file "input.conf" and pasting this:
ENTER sub-seek 0
Then the Enter key will replay the current subtitle segment. Correct me if I'm wrong.
from memento.
Like mansuen said, you should just add a bind in your mpv.conf
. There's no reason to add a button unless you're using something like a Steam Deck.
from memento.
The code that mansuen posted actually activates this button:
It rewinds to the beginning of the current subtitle.
You can also use the "←" key in Memento to rewind to the beginning of the current subtitle segment.
I'm writing about something else, about looping the beginning of the current subtitle segment with the end of the current subtitle segment
Subtitles in srt format, for example:
1
00:00:18,760 --> 00:00:22,100
🡡 🡡
the beginning --> the end
目が覚めた場所には
2
00:00:22,100 --> 00:00:25,600
🡡 🡡
the beginning --> the end
白い壁 保健室
make a loop with subtitle fragment 1:
make the video player load video only from 18.760 sec to 22.100 sec.
The same with 2
load the video in the segment from 22.100 to 25.600 seconds
MPV already has a function to loop two AB points by pressing the L key three times (works in Memento as well).
In general, simplify looping a video, with a single click on the current subtitle segment, by using a button, or hotkey
from memento.
The code that mansuen posted actually activates this button:
That button executes sub-seek -1
.
It rewinds to the beginning of the current subtitle.
It goes to the last subtitle.
You can also use the "←" key in Memento to rewind to the beginning of the current subtitle segment.
It goes 10 seconds backwards in the video.
Corrections aside, I don't see the value in implementing the feature internally in Memento since the same functionality can be achieved through some button presses or through a Lua script if you want to get specific. Implementing features like this in C++ is just unneeded baggage in my opinion. The type of features that should be implemented in Memento are ones that either can't easily be scripted into mpv or can be done significantly better in C++.
Since exactly what you want doesn't already exist from what I can find, I recommend you learn Lua and mpv's API. Lua is a simple language. mpv's API has a learning curve due to its documentation, but essentially all you'll be doing is binding a hotkey that gets the sub-start
and sub-end
properties and sets an A-B loop. It shouldn't be more than a few lines of code.
from memento.
Related Issues (20)
- Kanji Stroke Order font HOT 1
- [Feature Request] Glossary Selection Marker HOT 12
- [Feature Request] Subtitle Delay HOT 3
- MeCab UniDic support HOT 3
- QT6 migration causes subtitle position to shift when on screen controller is shown/hidden HOT 1
- Lack of Styling on Anki Cards Added via Memento HOT 4
- jp mining note support HOT 3
- Setting secondary_sub_visibility to 'auto' within the mpvacious plugin does not work HOT 2
- Any configuration guide? HOT 1
- Jellyfin mpv shim? HOT 16
- Video does not play HOT 4
- Improve popup dictionary styling HOT 5
- Partially visible video when using display scaling HOT 4
- Auto-resume video after finishing hovering over words? HOT 1
- Some elements in subtitles search are larger than expected HOT 2
- Segmentation fault (core dumped) Error in Arch Linux HOT 4
- How to make word and furigana bigger on the word search HOT 1
- Segfault when using the new deconjugation matcher HOT 8
- How to hide progress bar in full screen? HOT 1
- video issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memento.