Kodi Community Forum
[Windows] HDTV playback, lag, stuttering - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136)
+---- Thread: [Windows] HDTV playback, lag, stuttering (/showthread.php?tid=99721)

Pages: 1 2


[Windows] HDTV playback, lag, stuttering - nanolimit - 2011-04-20

I've been trying to use both the margro and opdenkamp builds, both seem to have an issue with ffmpeg.

While trying to watch a full channel(1080i) it will continuely stutter and lag, make it completely unwatchable.
I can watch the channels from from within MePo and the default software that came with the tuner, its just in XBMC.

Also even the SD channels after 30-60 minutes of play with start to stutter, but stopping and restarting the channel fixes the issue.


Is there any work arounds for this? or would I need to wait for a complete new build with an updated ffmpeg?


- opdenkamp - 2011-04-20

probably the buffer underrun problem, but that's not windows specific.
please pastebin a full debug log.


- loggio - 2011-04-24

This happens to me also, constantly. I also have an issue with one channel always missing the bottom quarter of the screen, but if i turn off DXVA the channel plays fine with no missing part of the image, but this is only happening on ONE of my channels... Not all, i don't understand why, because the streem is the same as all the other channels... It's frustrating and makes the channel virtually unwatchable.


- opdenkamp - 2011-04-24

debug logs please Smile


- loggio - 2011-04-24

Here's my debug log, and a picture showing the issue with my tv stream.

Image

LOG: http://www.mediafire.com/?lsxly3g47vunyfg


- loggio - 2011-04-25

Is that the Debug log you're after?


- opdenkamp - 2011-04-25

hmm yeah, but nothing special can be seen related to those missing epg details. I'll have to investigate that further.

what could be the cause of the missing bottom of the screen are these lines:
Code:
21:12:35 T:3004 M:2262724608   ERROR: ffmpeg[BBC]: [mpeg2video] warning: first frame is no keyframe
..
..
21:13:28 T:3004 M:2235908096   ERROR: ffmpeg[BBC]: [mpeg2video] Failed to begin frame

21:13:28 T:3004 M:2235908096   ERROR: ffmpeg[BBC]: [mpeg2video] hardware accelerator failed to decode picture
I could ignore all frames until an iframe is received in CDVDDemuxPVRClient I suppose. makes sense, since those can't be rendered correctly anyway.
is the mediaportal add-on using that code? the add-on isn't in the main tree (yet) since it doesn't work on all os'es.


- loggio - 2011-04-25

Not too sure if it uses that code. Margro hasn't released an update to his addon in god knows how long... i don't know too much about the addon. However I'm using the current binary build located here http://xbmc.opdenkamp.eu/ (19 April 2011) using the ffmpeg rtsp Media Portal plugin supplied.

But the issue has always been there, even when i was using Magro's Prebuild versions.
However, i'm sure Margro would be more than happy to tell you what you need to know.

Thanks for looking into this by the way. Been driving me nuts. If there's any more info you need, i can assist if you tell me what to look for.

Cheers,
Loggio.


- FernetMenta - 2011-04-25

Maybe this is the problem:

fps: 25.000000, pwidth: 1440, pheight: 1080, dwidth: 1440, dheight: 808

1440x1080 uses rectangular pixels....

CDVDVideoCodecFFmpeg::GetVideoAspect

Code:
/* XXX: we suppose the screen has a 1.0 pixel ratio */ // CDVDVideo will compensate it.
  iHeight = pCodecContext->height;
  iWidth = ((int)RINT(pCodecContext->height * aspect_ratio)) & -3;
  if (iWidth > (unsigned int)pCodecContext->width)
  {
    iWidth = pCodecContext->width;
    iHeight = ((int)RINT(pCodecContext->width / aspect_ratio)) & -3;
  }



- loggio - 2011-04-25

Kepp in mind, this ONLY happens with DXVA ENABLED. When switched off, everything plays fine.

I would just leave it off... But I'm using an ATOM machine...enough said. lol


- opdenkamp - 2011-04-25

that's probably because ffmpeg is correcting something.
could you try recording that stream and playing that back


- margro - 2011-04-25

dushmaniac Wrote:I could ignore all frames until an iframe is received in CDVDDemuxPVRClient I suppose. makes sense, since those can't be rendered correctly anyway.
is the mediaportal add-on using that code? the add-on isn't in the main tree (yet) since it doesn't work on all os'es.

Well, this MediaPortal addon (the ffmpeg one which is also in your tree) uses rtsp streams for playback and therefore does not use the CDVDDemuxPVRclient code. The only thing it does is sending a RTSP url to XBMC and the playback of this RTSP stream is handled entirely by XBMC/ffmpeg.
Unfortunately, I'm not able to test with DXVA because I'm still using Windows XP.

For the other MediaPort pvr addon (the TSReader version, only in my tree), I'm already working on ignoring the frames until an iframe is received to minimize the gray-block artifact on channel switches.


- loggio - 2011-04-25

I've recorded the stream and it plays back the same... missing bottom of the screen.


- opdenkamp - 2011-04-25

right, in that case it's not pvr related.

@loggio:
could you upload the recording somewhere, create a ticket for this under "video playback" and link to the recording and a full xbmc debug log from mainline xbmc.


- loggio - 2011-04-26

Sure. Will let you know when i've done it.