Kodi Community Forum
Req Store srt subtitle position in the library database - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: Req Store srt subtitle position in the library database (/showthread.php?tid=379233)



Store srt subtitle position in the library database - alex928gt - 2024-10-22

Hi all,

Thanks all for this great tool.

I believe it would be very useful - and hopefully not that complex - to store the subtitle position in the library database - typically in the "settings" table - for each movie, and that each time we start playing a movie it positions automatically the subtitles based on this stored position, or at the default position if no information is stored.

Currently it's possible to adjust the subtitle position each time one launches a movie, thanks to the SubtitleShiftUp and SubtitleShitDown Action IDs, and while doing so Kodi displays the position in pixels on the screen, but as soon as we stop the movie it's just too bad that this position information is lost, whereas it could be stored for a next time to avoid having to adjust it again.

Moreover, if such field was available in the database, it would also be possible quite easily thanks to a simple SQL query - after populating the actual aspect ratio and resolution of each movie - to populate this field automatically for each movie.

For instance, I know that for 4K 2.35 movies my subtitles should be at c. 1850 pixels and I could easily populate this automatically for all such 4K 2.35 movies rather than having to re-adjust their position each time.

Thanks
Best
Alex


RE: Store srt subtitle position in the library database - izprtxqkft - 2024-10-22

https://kodi.wiki/view/Settings/Player/Subtitles#Position_on_screen

Quote:The position, if changed, is permanently saved (persists over all videos or kodi reboot).

are you saying this wiki entry is incorrect or is there a bug in kodi?


RE: Store srt subtitle position in the library database - alex928gt - 2024-10-22

Thanks for your reply.

1/ It indeed does not work, i.e. if I set the mode to manual and set the subtitles in the middle of the screenwhen playing a movie, stop playing the movie and restart it they are back at their original default position
2/ I undersrtand that this feature was anyway made to retain the same position for all movies, not per movie, which is not what I'm looking for. I'd like a position being saved per movie or at least per set of movies with same resolution/aspect ratio characteristics, which means that it's probably simpler to manage per movie.

Alex


RE: Store srt subtitle position in the library database - alex928gt - 2024-10-22

Forgot to mention that I'm on Kodi 21.0 under LibreElec on a NUC PC.


RE: Store srt subtitle position in the library database - alex928gt - 2024-10-22

(2024-10-22, 23:20)alex928gt Wrote: Forgot to mention that I'm on Kodi 21.0 under LibreElec on a NUC PC.

And same result on Kodi 21.0 on MacOs.


RE: Store srt subtitle position in the library database - alex928gt - 2024-10-22

And I precise as well that the "Bottom of video" setting is not very precise. With standard calibration settings:
-  the subtitles are fully at the bottom of the picture area for 1.85 or 1.78 aspect ratios, as expected, but
-  for 2.20 aspect ratio the first line is in the picture area and the second line is split between the picture area and the bottom black bar 
- for 2.35 aspect ratio the first line is split between the picture area and the bottom black bar and the second line is fully in the bottom black bar

So the actual aspect ratio of the video is not actually properly detected.
Hence my request to be able to actually precisely set and save the subtitle position for each movie, either by retaining the manual setting or by injecting in the database the position based on simple rules.