mpv-autosub icon indicating copy to clipboard operation
mpv-autosub copied to clipboard

Dealing with streams

Open whtv opened this issue 4 years ago • 10 comments

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.

whtv avatar Mar 22 '20 11:03 whtv

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.

davidde avatar Apr 13 '20 08:04 davidde

Closing this now. Feel free to comment if you have any further questions/suggestions.

davidde avatar Apr 16 '20 12:04 davidde

Can this be added as an optional feature? Any tips would be appreciated. :+1:

fockboi-lgtm avatar Oct 29 '20 12:10 fockboi-lgtm

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.

davidde avatar Oct 29 '20 14:10 davidde

  1. I actually, use to play files stored on my Pi locally. I have a key binding as configured by default.
  2. Yes, I have lot of files locally, that require subtitles for them.
  3. Agreed, I referenced a commit that does that The idea is to have a option for using a /tmp directory that is served using a http link, and enable it to be used in as a subtitle. This can be added in an if-else condition, not affecting normal users.

fockboi-lgtm avatar Oct 29 '20 15:10 fockboi-lgtm

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?

davidde avatar Oct 29 '20 16:10 davidde

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 meant local 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)

fockboi-lgtm avatar Oct 30 '20 03:10 fockboi-lgtm

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.

davidde avatar Oct 30 '20 09:10 davidde

any update on this?

laplasa avatar Aug 24 '21 14:08 laplasa

Can you update the autosub available for Vietnamese language? Thanks a lot!

vnbubba avatar Aug 26 '21 09:08 vnbubba