Comments (6)
Thanks for the response
I don't know if this is helpful but I found this
https://github.com/SenneH/mpv2anki/blob/master/mpv2anki.lua
its a mpv script with the ability to export the secondary subs to Anki I tried going through it to see how it was done but I dont know enough about scripts to know what to look for maybe it could be helpful?
from memento.
seems like you can access secondary sub-text now in mpv
from memento.
This is something I've wanted to have for awhile, but it's a really difficult issue to tackle.
The way Memento handles grabbing subtitle text is it observes the sub-text property from mpv. The problem is that mpv doesn't provide any property to grab text from the second subtitle.
The easiest solution would be to make a pull request that adds a property like sub-text-secondary to mpv and then when that finally makes it downstream to a release, add the feature to Memento.
The other option is to go outside of mpv which is a whole can of worms I'd like to avoid after my experience trying to implement the subtitle transcript feature. In short, the reason it populates as subtitles show up rather than all at once is due to limitations with what information mpv gives about subtitles.
from memento.
I looked through the code and tested the plugin. There is no magic to how they do it.
To add the second subtitle, rather than using the second subtitle track, they have the user manually switch the primary subtitle track to the secondary subtitle track and then add it to the card.
I had dreamed up a similar solution yesterday that I likely won't implement that involves switching the primary subtitle track to the secondary subtitle track for a split second when generating the card and then setting it back. The only issue is that it creates graphical jank that you can't hide from the user since mpv flashes the secondary subtitle on screen for a split second. This is already a problem with the {screenshot} marker, but I consider the benefits to outweigh the negatives in that case since it won't interfere with anything else.
I'm not against contributing to mpv to solve this issue though. It's more a matter of are they willing to accept a pull request for something like this.
from memento.
Looks good.
When it finally makes it into mpv releases, I'll be sure to add this feature.
from memento.
It's been added on the dev branch. The catch is that unless the mpv version supports the secondary-sub-text
property, none of the features that rely on it will be visible.
I'll probably create two Windows downloads for the next release, one bundled with an unstable build of mpv (assuming I can get it to build on Windows) and one with version 0.33.1-r1.
from memento.
Related Issues (20)
- Subtitle search only works when media is paused HOT 3
- [Feature request] Export only lowest frequency value HOT 1
- Memento fills empty fields with html HOT 1
- Play audio doesn't work HOT 1
- Can't open on MAC M3 Arm HOT 6
- what settings are needed for YouTube links to work? HOT 4
- 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 2
- 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
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.