Ticket #9815 (closed Bug Report - General: Fixed)
Opened 2 years ago
Last modified 2 years ago
Pauses in playback
|Reported by:||krose@…||Owned by:||markk|
|Component:||MythTV - Video Playback||Version:||Master Head|
From my post to the mythtv-dev mailing list, edited:
For reference, my main front end and back end are running on the same machine, a Zotac barebones with an Atom processor with NVidia ION video.
I have spent the last 3 days trying to slay some short pauses in MythVideo? playback that I assume are similar to what was described here:
I tried the following:
(1) Turn off hyperthreading. My first theory was that CPU contention from the HT cores was keeping some important thread from making progress, especially since I saw kworker processes using 100% of the CPU for a second at a time several times a minute (as it turns out, decrypting a krb5p payload). This change did nothing.
(2) Tweak NFS. I futzed with the rsize/wsize and actimeo settings, and switched from krb5p to krb5i. Again, no change.
(3) Force the NIC to 100Mb/s mode, under the theory that readahead requests at 1Gb/s were saturating the bus in this poor machine. Again: nothing.
(4) Move the file to the local machine, which is running on an Intel SSD, in order to eliminate all off-machine variables. Alas, no change.
At this point, I was forced to the conclusion that the problem was data exhaustion in the front end rather than a hardware constraint. I tried forcing backend streaming as a hack, in hopes that this would force the combination of front end/back end to cache more of the file. This did not solve the problem either. I tried upgrading to trunk, which also had no effect.
The only change that worked was to increase the read-ahead of the ring buffer. Specifically, I upped the size of the ring buffer to 32MiB and then increased the fill threshold to half of that (/2 instead of /4). Those settings might be overkill, but for the first time the file streamed smoothly from start to finish.
The problematic file in question is an encoding of BSG S03E10 "The Passage", which is the highest variable bitrate encoding I have in my library. The reason why this file in particular causes the default settings to fail is that the intelligence in ringbuffer.cpp to decide how much data to cache does not correctly predict the future based on the past: the pauses always occur when there is a change in the on-screen image from one of low motion and low noise to one of high motion and high noise. (For those familiar with this episode, it's when the scene changes from one depicting people aboard Galactica talking to one in the star cluster: there is nearly always a stutter at this transition with the default player settings.)
A 750 MB prefix of this episode is here, for a few more days: