mpv-autosub
mpv-autosub copied to clipboard
Dealing with streams
In reference to https://github.com/davidde/mpv-autosub/issues/8#issuecomment-602181111, for http streams (e. g. from webtorrent-cli), subliminal’s output directory should be a directory on the user’s filesystem. Maybe the script should default to an actual path (like .config/mpv/autosubs
) instead of the variable directory
and pass it on to the mpv option sub-file-paths
.
I'm sorry, but I don't think it's useful for the average user to have their subtitles in an entirely different path than their movies. This also makes moving movies to other devices or backup a lot less convenient.
Closing this now. Feel free to comment if you have any further questions/suggestions.
Can this be added as an optional feature? Any tips would be appreciated. :+1:
I'll reopen this for now, so I remember looking into this when I next update the script.
Can you elaborate a bit on how you'd expect this to work?
- I believe the autosubbing is turned off entirely for webstreams, since most streams probably do not require/have subtitles. Do you manually download with the hotkeys for webstreams, or do you expect it auto-enabled by default? Does it currently work for you (other than the wrong path)?
- What exactly is the use case here? Am I correct in understanding it is about watching videos in MPV from streaming platforms without ever downloading them to disk, but with subtitles that are downloaded to disk temporarily?
- Considering the above, I think it's probably feasible to use a custom directory that defaults to
/tmp
for manually downloaded webstream subtitles.
- I actually, use to play files stored on my Pi locally. I have a key binding as configured by default.
- Yes, I have lot of files locally, that require subtitles for them.
- Agreed, I referenced a commit that does that
The idea is to have a option for using a
/tmp
directory that is served using ahttp
link, and enable it to be used in as a subtitle. This can be added in anif-else
condition, not affecting normal users.
Still wondering a few things:
- If you have the files locally, why is it necessary to store the subtitles elsewhere, and not next to the video files?
- It would probably still be required to distinguish between users that do actual streaming (as in watching in MPV without a local download) and those who watch from a local download.
If you do not have a video locally, it would be required to store the subtitles in a central path. Otherwise I don't really see the point of putting them elsewhere? Is it even desirable for most users to do so? Am I misunderstanding something here?
If you have the files locally, why is it necessary to store the subtitles elsewhere, and not next to the video files?
- Well, the idea is that if someone has a NAS attached storage serving files. It might not be necessary to store subtitles to the NAS, rather a temporary storage while viewing the file. (I guess the
locally
might have given a wrong impression. I meantlocal network
)
It would probably still be required to distinguish between users that do actual streaming (as in watching in MPV without a local download) and those who watch from a local download.
- Yeah that's where the if-else to get a
http/... etc
would be more helpful.
The more I think of it, it comes as a very niche border case, which most people wouldn't use. Or won't require. I guess if someone requires this in future, they can always refer to the fork I made. (Not exactly great at Lua, just modified some parts of your code)
Thanks for explaining, I'll look into your code when I next update.
Note it's probably still a good idea to save the subtitles; otherwise you'll have to re-download them every time and they don't stay up forever.
any update on this?
Can you update the autosub available for Vietnamese language? Thanks a lot!