FredTungsten / ScriptPlayer

ScriptPlayer is a video player that controls the Handy and lots of other toys in sync with videos.
GNU General Public License v3.0
156 stars 70 forks source link

Feature Request - Support subtitles from .mkv containers #196

Open Theletha opened 2 years ago

Theletha commented 2 years ago

Would be great to support subbs (.ass, .ssa) so i dont have to hardsub them into mp4's

FredTungsten commented 2 years ago

Hmm ... I don't think I know how to get those from the video file. I might be able to get SRTs working, but extracting those from an MKV container might be a future "FFMPEG only" feature.

FredTungsten commented 2 years ago

Sooo apparently you just have to extract an SRT file from the mkv and it automatically works. The DirectVobSub Filter (don't know if this is installed by default or if you need a codec pack) takes care of everything automatically ...

You can do this with ffmpeg like this:

ffmpeg -i videoname.mkv videoname.srt

Alternatively Subtitles can be activated with LAV Splitter (again - if it's installed) without any additional work.

I'll still try to add this as a feature, but I think there are plenty of workarounds for advanced users that don't require hardcoding the subs.

Theletha commented 2 years ago

hm haven't seen a .srt file in a long time. its mostly .ass & .ssa files now.

Thanks so far!

woojh3690 commented 1 year ago

@FredTungsten is There any progress?

FredTungsten commented 1 year ago

@FredTungsten is There any progress?

A tiny bit - might pick it up again sometime

woojh3690 commented 1 year ago

There is no other way play funscript with subtitles. So thanks to not give up.

Theletha commented 1 year ago

Indeed thanks for still having it in mind!

FredTungsten commented 1 year ago

I just implemented very very basic subtitle support in the latest beta build

rbwabd commented 1 year ago

Hello, could you give a bit more color on how to get the subtitles to work? I downloaded latest beta (1.2.0.421), made sure subtitles are enabled in options and tried on a video with a .srt file of same name in the folder but can't see any subtitles. Also when files are loaded I can see video and funscript being loaded but no message about srt being loaded, not sure whether there should be one. Thanks!

FredTungsten commented 1 year ago

That's all you should need to do (enabling subtitles and making sure they have the same name). If it works, there will be an on-screen message - either "Subtitles extracted from video XY" or "Subtitles loaded from file"

Latest version is 1.2.0.405

Was that a typo or did you download a 1.2.0.421 somewhere else?

rbwabd commented 1 year ago

it was a typo! somehow i remembered the number wrong. thanks for super fast reply! i'll mess around bit more with the file see if I can get it to work.

smreo3839 commented 1 year ago

I checked that the ASS subtitle file looks normal, but the srt subtitle file does not work. Please check. my version is 1.2.0.405 and 1.2.0.406 thanks~