Kodi android video lag/stutter only from library (QNAP TAS-268)

Ok, so here is my set up:
I have a Sony Bravia 40″ KDL40W705C which has 1080p resolution. I have a NAS – Qnap TAS-268, which is plugged to my TV through HDMI. It runs an Android 4.4.4 and this is the platform form my Kodi v15.

Here is the problem:
1) When I go to video->files -> I pick the video file -> it runs smoothly. Every time.
2) When I choose a video from movies/tv-shows library – it does not run smoothly. There is about 10-15fps or so.

Observations:

  • My tests only included .mkv files that is the most common file in my library.
  • Not all the videos has the problem. I tried a few movies (2GB ones and 10GB ones) and most of them (but not all) play well. TV series are the worst (my case was 3GB – 5GB episodes of Westworld and Walking Dead, Mr Robot).
  • I think video image has more contrast and is generally a bit different from the one I am getting when choosing the video file directly.
  • The player interface itself is different. The first one is plain and simple, has some basic options, and the one from library is a bit more advanced – it has more video image options, I can download subtitles from there (while in the first one I cant).
  • “Adjust display refresh rate to match video” and “Sync playback to display” options has no effect whatsoever
  • forcing android to 1080p24hz/1080p50hz/1080p60hz instead of default “auto” has no effect on the issue

Do you have any ideas on how to fix it?