ripose-jp / Memento

An mpv-based video player for studying Japanese
https://ripose-jp.github.io/Memento/
GNU General Public License v2.0
488 stars 22 forks source link

Show subtitle parsing error message to user #71

Closed Calvin-Xu closed 2 years ago

Calvin-Xu commented 2 years ago

Malformed subs are quite common in the wild and mpv/ffmpeg's parser is very tolerant about loading them (end time earlier than start time, etc.) When Memento cannot parse a subtitle file, it might be nice if the user can get a message box showing the error message so that they can fix the sub manually.

I thought about doing a PR but don't want to mess with the threading code.

ripose-jp commented 2 years ago

Since v0.5.4-1 causes subtitles to fall back to mpv when parsing fails, I don't see the benefit. If the user really wants the subtitles to parse, they can just convert the subs to some other format like ass and all the parsing issues will be resolved. I don't think anyone will seriously want to dig around in subtitles and manually fix the possibly numerous mistakes except for the most power of power users. And that group of people almost certainly has the capacity to read error messages printed to console. Although, the error messages could possibly use line numbers to make then more helpful.

Calvin-Xu commented 2 years ago

I've had to fix a bunch of them recently, perhaps just because the timing of my subs are particularly poor as has been the case. The error message in console is pretty helpful. I think the ones that need line numbers already have them, or otherwise print out the problematic part that can then be located.

I'll close the issue since this won't be implemented.