Skip to content
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

Recordings video/audio stutter #186

Closed
Xstasy opened this issue Jan 31, 2016 · 32 comments
Closed

Recordings video/audio stutter #186

Xstasy opened this issue Jan 31, 2016 · 32 comments

Comments

@Xstasy
Copy link

Xstasy commented Jan 31, 2016

Using tvheadend Tvheadend 4.1-1451~gf074688 and Kodi Jarvis RC2 with plugin version 2.2.12

Playing recordings (HD) gives stutter in video/audio. Same TS file is fine when played through network share in Kodi or with VLC.

Kodi Log:
https://xstasy.gbps.io/paste/VoMMvN

@Jalle19
Copy link
Contributor

Jalle19 commented Jan 31, 2016

You need to enable debug logging and post a new (preferably complete) log. Did this start happening recently? Can you try an older version?

@mhlund
Copy link

mhlund commented Feb 19, 2016

I also have this exact problem! http://forum.kodi.tv/showthread.php?tid=259646

I'll try to provide some more information this weekend. What kind of logging do you need? From kodi or from the tvheadend server? Or is it possible to enable debug logging in the kodi extension?

@Jalle19
Copy link
Contributor

Jalle19 commented Feb 19, 2016

Please provide both a debug log from Kodi and a debug log from tvheadend for the same timeframe.

@mhlund
Copy link

mhlund commented Feb 20, 2016

Here's some logging from my system: http://pastebin.com/zbMcXFUz

My tvheadend backend is an Ubuntu 15.10 server in the basement, with a DVB-S2 card and tvheadend 4.1-1533gff6bf99wily

My frontend is a Intel NUC5i3 with Ubuntu 15.10, kodi 16.0git20160205.0918-rc3-0wily and kodi-pvr-hts 2.2.12-1wily

Unfortenately when playing a recording through the kodi add-on through htsp there was no logging from tvheadend even though i enabled debug logging!

@Jalle19
Copy link
Contributor

Jalle19 commented Feb 20, 2016

Could you try enabling trace debugging from the addon settings?

@mhlund
Copy link

mhlund commented Feb 21, 2016

Trace debugging was enabled in the addon settings!

@Jalle19
Copy link
Contributor

Jalle19 commented Feb 21, 2016

Can you post the full log in that case? You must also enable debug logging in Kodi itself.

@mhlund
Copy link

mhlund commented Feb 21, 2016

OK, I had'nt enabled debug logging in Kodi itself... I will do that and post new logs!

@mhlund
Copy link

mhlund commented Feb 21, 2016

Here is a complete log from starting kodi with debug logging enabled. The first thing i did was going to TV->Recordings and started playing a HD recording for 10-15 seconds before stopping it. It was stuttering the entire playback time.

http://pastebin.com/ydhCz63w

@mhlund
Copy link

mhlund commented Feb 26, 2016

Do you have sufficient information now or can I help with some more?

@RgRRgR
Copy link

RgRRgR commented Mar 12, 2016

I have the same problem. Playing a recording via the "recordings"-menu makes the CPU go wild (100% usage for Kodi) and causes stuttering, while playing the same file over a network share goes fine and while playing live-tv also is no problem.
I reverted back to Kodi 14.2 because of this. Kodi 14.2 plays recordings fine. I read in some other thread about a same kind of problem that it could have something to do with Kodi continuously checking the EPG-data during playing the file, but I'm not sure if that's the case here.

@Jalle19
Copy link
Contributor

Jalle19 commented Mar 12, 2016

The addon in Kodi 14.2 used an internal buffer when playing recordings. This buffer was removed at some point because it caused other issues. Any chance you're streaming over wifi or something?

@RgRRgR
Copy link

RgRRgR commented Mar 12, 2016

Yes, temporarily I am even streaming over WAN... I understand I am pushing the limits :)
But live-tv and recordings are really working fine in Kodi 14.2 with it. In Kodi 15+ the live-tv is still working fine, but when I start to play a recording I get the same errors as the topicstarter. It makes sense that the removal of the internal buffer you mentioned causes this problem. Could there be some way around this? Otherwise I will stick with 14.2 for a while.

@Xstasy
Copy link
Author

Xstasy commented Mar 12, 2016

This is still occuring for me with a cabled 1gbps connection on LAN.

@Jalle19
Copy link
Contributor

Jalle19 commented Mar 12, 2016

@Xstasy do SD recordings work? You only mentioned HD in the original post

@stan86
Copy link

stan86 commented Apr 20, 2016

Same for me. Gb LAN HD shutters.

@Xstasy
Copy link
Author

Xstasy commented Apr 20, 2016

@Jalle19 Yes, I do not have issues with SD recordings.

@volodymyrpavlenko
Copy link

volodymyrpavlenko commented Apr 23, 2016

Same issue, have another thread on the forum
http://forum.kodi.tv/showthread.php?tid=234640

But in my case I have problem with SD as well.
live streaming is working good, both sd and hd.

CPU usage in way higher when trying to watch records. it comes up to 16% (4 cores)

@mhlund
Copy link

mhlund commented Apr 28, 2016

Today I noticed something interesting. When I use the IOS App TvhClient and choose to play my recordings through my kodi client (which magically shows up along with VLC etc in the app) the recordings play with no problems at all! No stutter at all and I can skip forward and rewind, pause... Everything just works!

Is Kodi accessing the recording with another method when the IOS App is playing it?

Edit: When the recording is playing i assumed Kodi is accessing the TVHeadend server directly? Maybe I'm wrong... is it the app that streams the recording to kodi?

@volodymyrpavlenko
Copy link

I have an assumption that tvhclient accesses it by http on 9981 port and kodi does it on 9982 via htsp protocol. I have no problems with http streaming.

@Jalle19
Copy link
Contributor

Jalle19 commented Jun 1, 2016

@mhlund can you disable VDPAU acceleration in Kodi, it doesn't work on your hardware anyway?

@mhlund
Copy link

mhlund commented Jul 31, 2016

@Jalle19 sorry for not responding earlier... I've been on a long trip and had vacation...

You're correct that VDPAU acceleration does'nt work on my hardware, so I've had VAAPI-acceleration enabled. I've now tried with all hardware acceleration disabled in Kodi, and it makes no difference. The stuttering is still exactly as before!

@gazzer82
Copy link

gazzer82 commented Aug 7, 2016

Any progress on this as I'm seeing the exact same issue. I did have similar judder on live TV, but changing the deinterlacing mode fixed that, unfortunately there doesn't seem to be an option to choose the deinterlacing mode whilst playing back recordings?

@Jalle19
Copy link
Contributor

Jalle19 commented Aug 7, 2016

The option to force deinterlacing on was recently removed, but if you have the option for live TV you should have it for recordings as well.

@RgRRgR
Copy link

RgRRgR commented Aug 19, 2016

Update: for me the problem is solved since I moved the tvheadend server from a remote WAN-location to an in-home LAN-connection. I no longer have 100% CPU-usage and recordings don't stutter anymore. Nothing else in my setup has changed, so it must have something to do with the network connection (buffering probably).
Maybe other people suffering from this problem can also test their setup in a different location or with a different router just to pinpoint the exact cause of the problem?

@mhlund
Copy link

mhlund commented Aug 19, 2016

My tvheadend server and two kodi-pvr-hts clients sit on the same gigabit ethernet network and my kodi clients have no problem playing full HD content from a NFS share on the same server. As I have stated before my kodi clients does not have problem streaming live TV from the same tvheadend server. The problem with stuttering is only with recordings.

@volodymyrpavlenko
Copy link

Same issue here, I'm currently in the same country as my server is and tv records are working without stutter. At the same time, trying watching from another country brings lots of stutter. TV is working fine all the time from any point.

@Jalle19
Copy link
Contributor

Jalle19 commented Aug 22, 2016

Recordings are played differently than live TV. Practically all decisions about buffering etc. are made by Kodi, not by tvheadend nor this addon. I'm inclined to think this is something that must be fixed in Kodi instead, but I'm not sure where to even start looking.

@mhlund
Copy link

mhlund commented Sep 4, 2016

I tried Kodi 17 Beta 1 to investigate if the brand new dvdplayer code would make any difference, but the xbmc repos kodi-pvr-hts (3.4.7-1~xenial) does'nt work with my tvheadend server at all now...

@ksooo
Copy link
Member

ksooo commented Sep 4, 2016

does'nt work with my tvheadend server at all now...

which version is your tvheadeend server? 3.x is no longer supported by pvr.hts. You need 4.0.x or 4.1.x

@mhlund
Copy link

mhlund commented Sep 4, 2016

A restart of my server solved the general problem with tvheadend and I'm back on square 1....
The new Kodi 17 Beta 1 does'nt solve the stuttering problem on recordings.

I'm running:
kodi 2:17.0git20160823.0914-beta1
kodi-pvr-hts 3.4.7-1
xenial
tvheadend 4.1-2236g817f67exenial

@Jalle19
Copy link
Contributor

Jalle19 commented Sep 21, 2016

The problem with stuttering HD recordings (or any kind of recordings, given the latency to the server is high enough) has been reported but a fix probably won't be around for some time: http://trac.kodi.tv/ticket/16915. The only option would be to re-introduce the buffer we used to have in the addon but that again caused a lot of other weird issues, e.g. slow skipping in recordings, very sketchy rewinding/fastforwarding etc. We can maybe do it but I'm not very keen on it.

I'm closing this for, please trac the ticket I linked instead.

@Jalle19 Jalle19 closed this as completed Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants