Kodi Community Forum

Full Version: [Release] Language Preference Manager
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
(2023-12-31, 11:46)rockrider69 Wrote: [ -> ]
(2023-12-30, 23:00)rafikW Wrote: [ -> ]....

I checked that when trying to resume a movie on x minute then the freeze is lasting x minute.
I just disabled LPM v1.0.2 and movie resume works as it should: no freeze, it is starting immediately.
Now I'm back on LPM v1.0.1 and the same: no issue with resuming movie.
Thanks a lot for the time testing more!

Between 1.0.1 et 1.0.2 the changes are very limited... So clearly, it can only come from the Seek(-1) I added to fix the lost subtitles.

I would have to try to reproduce this. So far I have not experienced any such major freeze at all in those past few months: not at start, resume nor when switching audio.
But I did spot some buffering/delay messages in the logs when multiplying rapid audio track switches in stress tests. With only a couple of times a video restart from the beginning. So there is something to deal with...

Just to confirm, you got that freezes with different videos right ? If you can provide a full log libk, that might help of course!

On question already : are you using another addon which LPM could interfere with : thinking for example about "Unpause Jumpback" that I use myself and it has options to jumpack (seek(-x)) at unpause, but also at resume if I remember well.
Yeah, this issue looks extremely weird... I've been using LPM 1.0.2 since you have released it without issues except when I reported first time a freeze but in that situation it had been fixed by Odroid-N2 reboot.
I tell you even more weird facts: I have two Odroid N2 devices. This issue I just reported happened suddenly on both devices (!) Reboot was not a fix on both of them. On one of them it disappeared without downgrade - it is just back to normal, on the second device many reboots performed did not fixed the issue so I downgraded to 1.0.1.
I'm not sure if 1.0.2 is a minor change to the version 1.0.1... Wasn't in 1.0.2 implemented a new handling for subtitles switching so subs are switching much faster than in 1.0.1?
Answering your questions:
- yes, issue was happening on every type of video: x264, x265, sdr, hdr, with different audio formats.
- no other addon like "unpause jumpback" - I know what this addon suppose to do but I prefer to revert back 10 seconds pressing TV remote button in order to get video and audio in sync after pausing movie.
- I will enable verbose logging for "Audi component", "Video component", "audio/video timing infomation" and will try reproduce issue hoping it will happen when I will do the update to 1.0.2.

All the best in 2024

[EDIT] Issue is reproduced... freeze when pressed the option to resume movie on 11 minute... screen is frozen, in kodi.log I see a hundreds of line being added... I will keep it running for around 11 minutes until movie will be resumed, then I will stop logging. Let me know where I can paste the log. It would be like around 6-10 MB.

[EDIT2] Movie resume button pressed at 12:13:02.502;
and then for 11 minutes lines like this:

2023-12-31 12:13:05.009 T:5724    debug <general>: PrepareNextRender: frameOnScreen: 0.037 renderPts: 0.225 nextFramePts: 679.304 -> diff: -679.079  render: 0 forceNext: 0
2023-12-31 12:13:05.049 T:5724    debug <general>: PrepareNextRender: frameOnScreen: 0.077 renderPts: 0.264 nextFramePts: 679.304 -> diff: -679.040  render: 0 forceNext: 0
2023-12-31 12:13:05.090 T:5724    debug <general>: PrepareNextRender: frameOnScreen: 0.118 renderPts: 0.306 nextFramePts: 679.304 -> diff: -678.998  render: 0 forceNext: 0
[...]
2023-12-31 12:22:43.111 T:5724    debug <general>: PrepareNextRender: frameOnScreen: 578.239 renderPts: 578.433 nextFramePts: 679.304 -> diff: -100.871  render: 0 forceNext: 0
2023-12-31 12:22:43.152 T:5724    debug <general>: PrepareNextRender: frameOnScreen: 578.279 renderPts: 578.474 nextFramePts: 679.304 -> diff: -100.830  render: 0 forceNext: 0
2023-12-31 12:22:43.194 T:5724    debug <general>: PrepareNextRender: frameOnScreen: 578.322 renderPts: 578.517 nextFramePts: 679.304 -> diff: -100.787  render: 0 forceNext: 0
[...]
2023-12-31 12:24:33.466 T:5724    debug <general>: PrepareNextRender: frameOnScreen: 688.598 renderPts: 688.793 nextFramePts: 689.690 -> diff: -0.897  render: 0 forceNext: 0
2023-12-31 12:24:33.508 T:5724    debug <general>: PrepareNextRender: frameOnScreen: 688.640 renderPts: 688.835 nextFramePts: 689.690 -> diff: -0.855  render: 0 forceNext: 0
2023-12-31 12:24:33.549 T:5724    debug <general>: PrepareNextRender: frameOnScreen: 688.681 renderPts: 688.876 nextFramePts: 689.690 -> diff: -0.814  render: 0 forceNext: 0

and other information.
Let me know where I can copy full Kodi.log.
Hello and all the best for 2024 !

@rafikW :
you can upload your logs via https://pastebin.com/ and send a link here.

In the meantime yesterday I have been able to reproduce the bug, image and audio completely frozen as well as Kodi GUI (not at 1st or 2nd resume in my case, but at 3rd stop/resume).
Kodi system remains accessible via ssh etc... and the video counters in the background are progressing, but "walking to the resume point, instead of jumping" Confused  , and of course nothing is visible.

The culprit is for sure the 1.0.2 fix to avoid lost subtitles at start or resume or audio switch. I'll have to figure the root cause now.

(if of interest :  code added is as simple as seekTime(getTime()-1) to create the necessary short rewind, but maybe it requires some delay before to allow the resume to properly happen first...)
(2024-01-01, 19:15)rockrider69 Wrote: [ -> ]Hello and all the best for 2024 !

@rafikW :
you can upload your logs via https://pastebin.com/ and send a link here.

In the meantime yesterday I have been able to reproduce the bug, image and audio completely frozen as well as Kodi GUI (not at 1st or 2nd resume in my case, but at 3rd stop/resume).
Kodi system remains accessible via ssh etc... and the video counters in the background are progressing, but "walking to the resume point, instead of jumping" Confused  , and of course nothing is visible.

The culprit is for sure the 1.0.2 fix to avoid lost subtitles at start or resume or audio switch. I'll have to figure the root cause now.

(if of interest :  code added is as simple as seekTime(getTime()-1) to create the necessary short rewind, but maybe it requires some delay before to allow the resume to properly happen first...)

Can't paste the log. "You have exceeded the maximum size of 512 kilobytes per Paste"
I see you are able to reproduce the issue so maybe my log is not needed, but if you would like still to review it let me know so I will edit the log by removing those lines which are many times repeated and then paste it here.
(2024-01-02, 09:36)rafikW Wrote: [ -> ]
(2024-01-01, 19:15)rockrider69 Wrote: [ -> ]...

Can't paste the log. "You have exceeded the maximum size of 512 kilobytes per Paste"
I see you are able to reproduce the issue so maybe my log is not needed, but if you would like still to review it let me know so I will edit the log by removing those lines which are many times repeated and then paste it here.
No need for more log from you, thanks a lot!

It is really random but I finally managed to reproduce the freeze a couple of times and to get a log...
Looks like the extra seek(-1) I added is from time to time colliding with the resume process, in a way or another.
Nothing obvious in the log so far, except some kind of background video/audio resyncing which takes exactly the time of the resume delay, as if running at speed 1. Just like you described it.

I'll work from there, see if I can find any solution or need to limit the fix to initial start ...
(2024-01-02, 22:53)rockrider69 Wrote: [ -> ]
(2024-01-02, 09:36)rafikW Wrote: [ -> ]
(2024-01-01, 19:15)rockrider69 Wrote: [ -> ]...

Can't paste the log. "You have exceeded the maximum size of 512 kilobytes per Paste"
I see you are able to reproduce the issue so maybe my log is not needed, but if you would like still to review it let me know so I will edit the log by removing those lines which are many times repeated and then paste it here.
No need for more log from you, thanks a lot!

It is really random but I finally managed to reproduce the freeze a couple of times and to get a log...
Looks like the extra seek(-1) I added is from time to time colliding with the resume process, in a way or another.
Nothing obvious in the log so far, except some kind of background video/audio resyncing which takes exactly the time of the resume delay, as if running at speed 1. Just like you described it.

I'll work from there, see if I can find any solution or need to limit the fix to initial start ...
Yes, this is really strange... As I reported at the beginning: I was using 1.0.2 since you have released it (beginning of November 2023 as I recall) without issue with freezing video on resume and suddenly it start happening.
Good luck with fixing, and as always: you need me to test - let me know.
@rafikW

Could you please try this new version v1.0.3BETA4.

After many tries and reading plenty of detailed logs Rolleyes , the conclusion is that too short seekback to force the subs to display while resuming is creating desynch, sometimes major.
Most of the time the player is catching up, but depending where we are in the buffers, we randomly get too bad desynch, and a restart from 0, even possibly while freezing video.

Changes are :
- now a 10sec seekback at resume instead of 1sec, so we do flush "old" buffers, display the subs immediately and so videoplayer secure proper audio/video resynch no matter what.
- still forcing seek(0) when we are starting a movie from beginning. No desynch issue there except the seekback is slightly noticeable.
- about audio track switch, although I never managed to reproduce a complete freeze like on resume, I do see also in the logs some large resynching errors and sometimes video restart from 0. So at this stage I decided to just skip the seekback in that case and "accept" the delay in subs display. 10sec seekback here would be too invasive in my opinion. Let me know if you think otherwise.

Maybe in the final 1.0.3 I'll add a setting to enable all this or not, for users who would find those jumpbacks more annoying than usefull. Not my case, but OK.

Anyway those random video freeze at resume should hopefully be gone, while keeping immediate display of subs !
Tested your beta version.
Unfortunately I was able to face the issue again on resuming a movie.
This time it did not happened on first movie I tried but on the 5th which I stopped few times and tried to resume in few seconds later and I was able to face this issue on one of the following attempts, not the first one.
This give me a feeling that it is happening when processing video, audio and subtitles streams is not possible to do in efficient way causing some kind of out of sync issues involving buffering finally leading to the situation with freeze.
Maybe it is only me who is able to reproduce this issue, I don't know.
I have no technical background for this matter but I can imagine it could be probably not possible to find the root cause and find solution or a fix.
I think it would be the best option to have version that is giving the both functionalities with simple switch option: first with "fast subtitle switching" and the second one with "normal subtitle switching" (or with some other naming)
Of course it's up to you if you are willing to dig deeper into this issue or not but for now I will stick with 1.0.1 version accepting that when I'm switching audio then subtitles are appearing with few seconds delay - in such case I'm just rewinding the movie back few seconds and can see subtitles for this part of movie. And to be honest - this is not often needed - usually I decide at the beginning if I want to watch a movie in original language with my language subtitles or with lector / dubbing audio. Decision is made based on quality of lector (or dubbing) and other factors but typically it is very rare when I'm changing decision later when already watching a movie so it is not very annoying to wait until subtitles are appearing around 5 seconds later (as with 1.0.1 version) or quicker (as in version 1.0.2 but with the risk that resume movie would cause a very long freeze depending on which timestamp of the movie resume is being activated) so 1.0.1 is good enough for my needs.

So once again: really appreciate your commitment in developing this add on, your very positive responses for all people's requests or wishes. As you can see in this thread your add on is very useful for so many people, so THANKS a lot. You are one of the best developers in Kodi!
Hi,
can you please fix language code for serbian language, I changed it myself for me but it'll nice that updates dont chanage it back.
Serbian sr srp srp srp the ISO 639-2/T code srp deprecated the ISO 639-2/B code scc[4] 
ty
(2024-01-07, 19:20)adi2 Wrote: [ -> ]Hi,
can you please fix language code for serbian language, I changed it myself for me but it'll nice that updates dont chanage it back.
Serbian sr srp srp srp the ISO 639-2/T code srp deprecated the ISO 639-2/B code scc[4] 
ty
Sure I'll integrate that into next 1.0.3 release.
(2024-01-07, 17:53)rafikW Wrote: [ -> ]Tested your beta version.
......
I can imagine it could be probably not possible to find the root cause and find solution or a fix.
I think it would be the best option to have version that is giving the both functionalities with simple switch option: first with "fast subtitle switching" and the second one with "normal subtitle switching" (or with some other naming)
......
Hello again and thanks for trying and all the support !

Afraid there's not much more I can do via the addon...
We'll have to wait for KODI team to handle some deeper and cleaner work needed on the videoplayer buffering management. As you know there is an old KODI bug still open for that, so hopefully someone tackle it in the future  Wink

For LPM I will keep the logic as in BETA4, and create a new setting in final 1.0.3 as discussed here, so people can activate the fast display or not.
Hi @rafikW @adi2 and all !

You can find here what should be the last BETA version before final 1.0.3 : LPM 1.0.3BETA6

Compared to BETA4, this one includes :
- Fix Serbian language codes
- Full support for multiple 3-letters language ISO codes in Conditional Preferences (ex. ger,deu or srp,scc or ell,gre ....)
- New option to control Fast Subtitles Display -aka workaround 10sec subs latency-
          3 choices : Disabled, Start Only, Start+Resume. Default is Disabled.

And of course it also includes all what has been discussed and tested from previous BETA1 to BETA4.

Please come back here with any comments / feedback before I push 1.0.3 version to the official KODI repository!
is there a version for Andriod devices for this add-on?
@nordicguy
Hello and welcome ! as far as I know any version should work on Android just like on other platforms.
Kodi is a multi-platorm media player and all addons should work fine on any supported OS.
Please use the Kodi addon menu to search for this addon in the official Kodi repository, and install the last available version to start with.

(to install a BETA version I guess you should be able to download a zip file from my github, transfer it somewhere where you Andoid device can access it, and install from zip. But I have not done that on Android myself)
Report here if you find any specific issue when using LPM on Android  Smile
Hello !

Glad to announce that LPM version 1.0.3 is now in production and available from Kodi main addons Repository   Smile

Reminder of the changes :
- Improve 10sec subs latency workaround: new option to disable it (default), or enable it at 'start only' or 'start+resume'.
        (fast multiple resumes could sometimes generate video restart or long freeze due to large audio/video desynch)
- Option to prioritize 'SignsSongs' tracks via custom conditional sub preferences. Syntax is ...>Eng:Eng-ss>...
       (Overrides general 'Ignore Signs and Songs toggle' or 'Blacklisting Signs via keyword', if ever used)
- New Keywords Blacklist for Audio tracks. Same principle as for Subtitles, based on track name, to skip some (ex. Commentary, ...)
- Fix Greek and Serbian language codes according to Iso639-2/T. Fix some typos.
- Fix support of multiple 3 digit codes per language (ex. German ger,deu). Now OK also for Conditional Subtitles preferences.


If needed it is also available here : LPM 1.0.3 . You can use also this same Github LPM site to report issues, bugs or propose improvements ideas.

Thanks for your support !
Hi, Everything has been working great for me since you helped me out a while ago except for subtitles that are not embedded in the video file (so separate but with same name as video file)

Is there a setting/rule to make separate subtitles always show?
At the moment I've got english forced to always show but you can't set forced tag on a separate subtitle (or can you?).

I have it set like this at the moment:
Turn on subs if preference matched (ticked)
Sub pref: Disabled
Conditional Enabled
rule 1: English, None, (forced ticked)
rule 2: Any, English, (forced unticked)
rule 3: English, None, (forced unticked)

Thanks.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27