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

Stuttering 1080p MPEG-2 with MythTV addon #94

Closed
dapharsyde opened this issue Feb 22, 2018 · 9 comments
Closed

Stuttering 1080p MPEG-2 with MythTV addon #94

dapharsyde opened this issue Feb 22, 2018 · 9 comments

Comments

@dapharsyde
Copy link

Using the latest builds, I have begun experiencing buffering issues when trying to watch 1080p MPEG2 LiveTV streams using the MythTV addon.

720p MPEG2 and 720p H.264 work well, likely because they require less data/bandwidth.

With this same build, switching to the NextPVR addon allows me to watch the same 1080p MPEG2 LiveTV stream with no problems, which leads me to believe the issue is with the MythTV addon.

I've determined that this issue began after the merge of ​xbmc/xbmc#12212 - which relates to VideoBuffer. My theory is that this change to VideoPlayer broke the MythTV addon, and the MythTV addon is no longer supplying data fast enough to fill the buffer.

Attached are some debug logs which may help.

kodi0218-mythtv-snip.log - excerpt of MythTV addon tuning to 1080p MPEG2 channel (NOT WORKING) - running Milhouse test build ​#0218

kodi0218-nextpvr-snip.log - excerpt of NextPVR addon tuning to 1080p MPEG2 channel (WORKING) - running Milhouse test build ​#0218

kodi0709-mythtv-snip.log - excerpt of MythTV addon tuning to 1080p MPEG2 channel (WORKING) - running Milhouse test build ​#0709 - last build before the VideoPlayer/VideoBuffer merge

kodi0710-mythtv-snip.log - excerpt of MythTV addon tuning to 1080p MPEG2 channel (NOT WORKING) - running Milhouse test build ​#0710 - first build after the VideoPlayer/VideoBuffer merge

@dapharsyde
Copy link
Author

Attached, please find full debug logs for multiple tests.

In each test, I booted into Kodi, waited for the PVR guide to load, then tuned to the same 1080p mpeg2 channel, KNTVDT. In each log file, this starts at the text "PVRManager - OpenLiveStream - opening live stream on channel 'K".

kodi0709-full.log - last build before VideoBuffer merge - 1080P WORKS
kodi0710-full.log - first build after VideoBuffer merge - 1080P NOT WORKING
kodi0221-full-mythtv.log - Latest build with MythTV addon, 1080P NOT WORKING
kodi0221-full-nextpvr.log - Latest build with NextPVR addon, 1080P WORKS
kodi-8.2.3-stable.log - stable Kodi 17 - 1080P WORKS

@dapharsyde
Copy link
Author

As requested by janbar on the kodi forums, I am attaching full debug logs w/ additional MythTV addon logging. With these details, we can see that after the VideoBuffer merge, the MythTV addon only requests blocks in 4096bytes. Previously, the addon would dynamically request blocks up to 32768bytes.

Due to this cap, the i/o stream is unable to keep up with high bandwidth video, like 1080p mpeg2.

Janbar has also discovered the NextPVR uses a built-in 18k buffer, which explains why that addon continues to work even after the VideoBuffer merge.

kodi0709-mythtv-full-debug.log

kodi0710-mythtv-full-debug.log

@janbar
Copy link
Owner

janbar commented Feb 25, 2018

I added a buffer to work around the new behavior of the kodi player. Now the addon requests data with chunk of fixed size (64k bytes) and store additionnal data in a buffer for the next kodi read.

@dapharsyde
Copy link
Author

Many thanks, Janbar. I tested the most recent build with your newest updates, and 1080p mpeg2 Live TV is working well again. Thank you for your attention to this issue!

@stu247
Copy link

stu247 commented Jul 10, 2019

I am having the same problem with LibreElec 9.0.2 using MythTV addon 5.10.7.1. It is not possible to watch any 1080i MPEG2 video recorded from broadcast. Was the buffer work around included in this version? I have not been able to find the code with the buffer work around. What is the commit for it? Thanks!

@willat8
Copy link

willat8 commented Jul 10, 2019

@stu247, try turning off deinterlacing on the Kodi video settings (during playback, go to the video option control to the bottom right of the playback progress bar). Made an enormous difference for me. I ended up experimenting with the different options there, because the default auto-select was not playing nicely at all.

@janbar
Copy link
Owner

janbar commented Jul 10, 2019

@stu247, see commit 73d61bd . There the default chunk size of data transfer has been set to 64k and is stored in memory buffer: Kodi no longer controls the requested size of data from the backend.
Else I guess your stuttering issue isn't related to it, but probably the root cause is the video settings.

@dapharsyde
Copy link
Author

@stu247 - another test you should try is to play the recorded .mpg file using Kodi's default video player instead of through the MythTV plugin. If you're still seeing stuttering, MythTV has nothing to do with it - it is a video playback issue likely due to deinterlacing, which does require some CPU horsepower...

@stu247
Copy link

stu247 commented Jul 11, 2019

Thanks for everyone's help. The stutter was there using Kodi's default video player. Turning off deinterlacing fixed the issue.

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

4 participants