Jump to content

Recommended Posts

Posted (edited)

for about a year now, probably since i updated to Kodi Matrix (and started using Add-on mode),  i have been experiencing playback issues when first starting a movie/video file (mkv)....for the first 20-30 seconds of most files i would have brief 1-2 second  periods of jerky playback/ stuttering, but then eventually the rest of the video would play fine

it was annoying but i got somewhat used to it, but after updating to Emby 6.2.10, the jerkiness/stuttering seemed to get a little worse

i had assumed it might be a hardware issue with my HTPC system, but now noticed the same mkvs played smoothly with players like VLC and MPC-HC

i had been using Emby in Add-On mode, so then experimented with using Native mode, and was surprised to find that now the video files play smoothly from the very beginning, no more stuttering/jerkiness

what could be the reason for this?

Edited by phunzie
quickmic
Posted
2 hours ago, phunzie said:

i had assumed it might be a hardware issue with my HTPC system, but now noticed the same mkvs played smoothly with players like VLC and MPC-HC

Did you play the same network stream via VLC?

Posted

i pointed VLC directly to the file on my hdd, did not use an http address 

quickmic
Posted
23 minutes ago, phunzie said:

i pointed VLC directly to the file on my hdd, did not use an http address 

Well you should to perform a proper test.

Also you should use plugin's webservice as proxy.

When you start a Kodi playback via addon mode, you will find in kodi.log the query address. Something like 127.0.0.1 bla.

When Kodi is running, you can use this url in VLC as network stream address and you perform a complete test of the stream functionality from next-gen plugin.

If this is fine, and that's what I'm expecting, then it's a Kodi issue.

  • Like 1
Posted
51 minutes ago, quickmic said:

Also you should use plugin's webservice as proxy.

how do i do this?

quickmic
Posted (edited)
37 minutes ago, phunzie said:

how do i do this?

Play a movie in Kodi via addon mode. (no debug mode required)

Stop the movie.

Close Kodi

open the kodi.log

Search for the URL which init's the stream (or upload the log file, an I tell you).

When URL identified:

Start Kodi

Open VLC

Drop the URL in VLC (open network stream)

VLC should play the stream

Edited by quickmic
Posted

thanks, but i know how to find/play the stream, but i was asking how to “use plugin's webservice as proxy.”

quickmic
Posted (edited)

You play regular content via Kodi in addon mode. This always uses the plugins webservice (proxy) cause the plugin in addon mode acts as proxy.

Kodi always calls 127.0.0.1 bla url which is the plugin proxy. The Proxy redirects to the actual Emby server url.

Here an example from kodi.log

2022-02-28 18:46:07.537 T:32455    INFO <general>: Loading skin file: DialogContextMenu.xml, load type: KEEP_IN_MEMORY
2022-02-28 18:46:08.761 T:32455    INFO <general>: VideoPlayer::OpenFile: http://127.0.0.1:57342/movies/f137a2dd21bbc1b99aa5c0f6bf02a805/embyvideo-2a38697ffc1b428b943aa1b6014e2263-9113-a114f27adeb425418fd202b4f3d9e0bb-a114f27adeb425418fd202b4f3d9e0bb-8900-5260-5260-movie-6471341-False-1-1-2-hevc-Lay_Bare__2012_.mkv
2022-02-28 18:46:08.761 T:35830    INFO <general>: Creating InputStream

 

You can see, Kodi calls "http://127.0.0.1:57342/movies/f137a2dd21bbc1b99aa5c0f6bf02a805/embyvideo-2a38697ffc1b428b943aa1b6014e2263-9113-a114f27adeb425418fd202b4f3d9e0bb-a114f27adeb425418fd202b4f3d9e0bb-8900-5260-5260-movie-6471341-False-1-1-2-hevc-Lay_Bare__2012_.mkv"

When the plugin is running, you can drop that same URL in VLC and it's piped through plugins webservice/proxy.

If you test it like that, you can simulate what Kodi is actually doing. It calls a Network stream, the plugin redirects to actual Emby server url. In debug mode you can actually see the redirection URL as well, but DON'T drop a debug log here.

The redirection URL will include your Emby server keys!

 

Edited by quickmic
  • Like 1
quickmic
Posted (edited)
33 minutes ago, quickmic said:

You play regular content via Kodi in addon mode. This always uses the plugins webservice (proxy) cause the plugin in addon mode acts as proxy.

Kodi always calls 127.0.0.1 bla url which is the plugin proxy. The Proxy redirects to the actual Emby server url.

Here an example from kodi.log

2022-02-28 18:46:07.537 T:32455    INFO <general>: Loading skin file: DialogContextMenu.xml, load type: KEEP_IN_MEMORY
2022-02-28 18:46:08.761 T:32455    INFO <general>: VideoPlayer::OpenFile: http://127.0.0.1:57342/movies/f137a2dd21bbc1b99aa5c0f6bf02a805/embyvideo-2a38697ffc1b428b943aa1b6014e2263-9113-a114f27adeb425418fd202b4f3d9e0bb-a114f27adeb425418fd202b4f3d9e0bb-8900-5260-5260-movie-6471341-False-1-1-2-hevc-Lay_Bare__2012_.mkv
2022-02-28 18:46:08.761 T:35830    INFO <general>: Creating InputStream

 

You can see, Kodi calls "http://127.0.0.1:57342/movies/f137a2dd21bbc1b99aa5c0f6bf02a805/embyvideo-2a38697ffc1b428b943aa1b6014e2263-9113-a114f27adeb425418fd202b4f3d9e0bb-a114f27adeb425418fd202b4f3d9e0bb-8900-5260-5260-movie-6471341-False-1-1-2-hevc-Lay_Bare__2012_.mkv"

When the plugin is running, you can drop that same URL in VLC and it's piped through plugins webservice/proxy.

If you test it like that, you can simulate what Kodi is actually doing. It calls a Network stream, the plugin redirects to actual Emby server url. In debug mode you can actually see the redirection URL as well, but DON'T drop a debug log here.

The redirection URL will include your Emby server keys!

 

btw, this works ONLY from the same device! 127.0.0.1 is only valid when VLC is running on the same device where Kodi/addon is running (localhost address). But you mentioned, you have a HTPC so shouldn't be a problem.

Edited by quickmic
Posted

ok, thanks for the explanation

so i played the stream with VLC, and as you expected, it plays smoothly...so i guess it must be a Kodi issue as you suspected

 

  • Like 1
quickmic
Posted
1 minute ago, phunzie said:

ok, thanks for the explanation

so i played the stream with VLC, and as you expected, it plays smoothly...so i guess it must be a Kodi issue as you suspected

 

This proves that Kodi has an issue.  What you can try to fix it:

Adjust Kodi network cache settings -> https://kodi.wiki/view/HOW-TO:Modify_the_video_cache

Also try disable or enable http2 support (possible in plugin settings)

  • Like 1
quickmic
Posted
23 minutes ago, quickmic said:

This proves that Kodi has an issue.  What you can try to fix it:

Adjust Kodi network cache settings -> https://kodi.wiki/view/HOW-TO:Modify_the_video_cache

Also try disable or enable http2 support (possible in plugin settings)

Try this:

<advancedsettings>
  <cache>
    <buffermode>1</buffermode>
    <memorysize>0</memorysize>
    <readfactor>60</readfactor>
  </cache>
</advancedsettings>

That's the sledgehammer.

Posted

i played around with adjusting the cache settings as described in your link to the  Kodi Wiki and disabling HTPP2, but no improvement

i did not try putting memorysize to 0, as i don't want to use my drives so much...i do have 8GB of RAM

could be a coincidence, but another thing i've noticed since using Add-on mode for most of the past year, is that often times Kodi locks up when i try to exit, so i have to use Windows to force it closed

i'm going to use Native mode for a while to see if these behaviors improve  

 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...