[mythtv-users] Why is h.264 seeking so slow?
stichnot at gmail.com
Mon Sep 27 01:13:57 UTC 2010
On Wed, Sep 15, 2010 at 3:03 PM, Jim Stichnoth <stichnot at gmail.com> wrote:
> I have noticed for a while that seeking in h.264 HDPVR recordings is
> quite slow, compared to ATSC recordings. It's most noticeable when
> using the cutlist editor, skipping around a few frames or seconds at a
> time trying to find the exact start/end of a commercial break. It
> seems to take 0.5-1 second per seek. I can press a bunch of keys on
> the remote in rapid succession to queue up a lot of seek operations,
> then watch "top" on the frontend and backend. The ION frontend is
> using up to 15% of a CPU during this seeking, and the more powerful
> backend doesn't go beyond about 3%. I can't tell whether the disk is
> thrashing during this, since the backend is in the garage. I have
> "Seek to exact frame" disabled in my settings.
> On the other hand, seeking in ATSC files is quite reasonable, maybe
> 0.25 seconds or less per frame, about what I'd expect on the ION
> Any ideas why this is the case, or suggestions on how to improve the
> seeking performance?
I think I worked out the "why". Apparently the HD-PVR keyframes are
very far apart, like >100 frames. Skipping forward by 1 second
usually means decoding and skipping over 59 frames (for 720p
recordings), using VDPAU on the not-so-powerful ION GPU.
Instrumentation showed that the seek delay is proportional to the
number of intra-keyframe frames skipped, and during that time nothing
of note is happening on the frontend or backend except a series of
nanosleep() calls on the frontend, presumably polling the GPU until
it's ready. On the other hand, ATSC recordings tend to have much more
frequent keyframes so the seek delays are less apparent.
Is there anything I can do to improve the situation using my existing
hardware? (I'm very attached to these absolutely silent Zotac ION-ITX
frontends.) Is there any way to get the HD-PVR to generate keyframes
more frequently, even at the cost of file size or quality? Or maybe a
lossless transcoder that inserts a new keyframe every ~15 frames?
Would recording at 1080i instead of 720p cut the average seek time by
half? Any other ideas?
More information about the mythtv-users