New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for external PGS/.sup subtitles #9559
Conversation
@ace20022 Is this the right way to support .sup? any advice? |
Nice!
Is this a new issue, or was it the same with your old approach? I have not started to migrate the rest (.sub) because I had no time to think about how the "add subs on the fly/manually" should work. |
old pr #8150 also have this issue on kodi 17. no problem on kodi 16. may be some diference with videoplayer and dvdplayer make this. think about open .sup manual, may be open any video as multi stream, and add new stream to the multi stream when need? |
I think so too. But it requires more work I guess, like adoption of the selection streams and auto selection stuff, because the source mask changes then. jenkins build this please |
@FernetMenta fyi
|
what is the issue? |
I briefly tested sintel, there the subs where completely wrong (some minutes). But I have no experience in sup extraction, maybe I've done it wrong. |
ffmpeg demuxer subtracts start_time from pts: https://github.com/xbmc/xbmc/blob/master/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp#L693 This is to make videos start at 0 secs. If you only have a single subtitle stream with first subtitle to be displayed at 4.0 and start_time is subtracted, you'll get pts 0 for fist sub. I would log pts and start_time for the external subs. |
test again, this issue also on kodi 16. may be some bug in ffmpeg? |
@ace20022 @FernetMenta find the reason of external .sup subtitle stream not sync issue.
subtitle sup info:
problem is video file start time is 0.0 and subtitle file start time is 4.2 not 0.0. try to set subtitle delay to 4.2 when play video let it sync. have tested several movie and sup file, this method works. how to fix this in our code? |
does this scenario use multiple demuxers? |
Yes, I had a really brief look today, but could not find a fix. |
@ace20022 any chance to fix this? |
@taxigps Could you please test if this is the right direction? ace20022#7 |
use multi-source stream to load external PGS/.sup subtitles.
issue: times of external .sup subtitle stream not sync with video/audio stream, need set the subtitle time delay 4 second.