Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

Why does playback only use 1 core on some BluRay movies?

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


ron at ronfrazier

Nov 22, 2009, 6:15 AM

Post #1 of 6 (1350 views)
Permalink
Why does playback only use 1 core on some BluRay movies?

I recently got a BluRay drive for my Windows box, and I'm trying to rip some
BluRay movies and play them in myth (0.21, non-VDPAU on a Core2Duo). I used
AnyDVD-HD to rip them to m2ts files successfully. So far I've tried 2
movies. Bruno played back perfectly fine. However, Transformers: Revenge of
the Fallen pauses every 2-3 seconds. Running top during playback, I can see
that Bruno is successfully using both cores (typically with about 30% idle
on each core). However, Transformers is maxing out 1 core while the other
core sits completely idle. Why? Looking at the logs, it appears to want to
use both cores:

Using 2 CPUs for decoding
VDP: Accepting: cmp(> 0 0) dec(ffmpeg) cpus(2) rend(xv-blit) osd(softblend)
osdfade(enabled) deint(greedyhdeint,linearblend) filt()

I see these exact same lines for Bruno. In fact, most of the log file is
substantially the same (except for the prebuffer pausing on Transformers).
For the codec lines, I see the following:

Bruno:
AFD: Opened codec 0x89cbef0, id(H264) type(Video)

Transformers:
AFD: Opened codec 0x8a8e590, id(H264) type(Video)


Does that hex number identify a different codec (even though they both say
h264)? Is one of those codecs not designed to run dual cpu? If so, is there
any way to upgrade that codec to a version that does, or is that built into
myth (like maybe a part of the embedded copy of ffmpeg)? Does 0.22 handle
this better (I'd rather not upgrade at this point, but if it's the only real
solution, I'd consider it). Upgrading to a VDPAU card would probably help,
but it's not an option at this time.


---
Ron Frazier


jarpublic at gmail

Nov 22, 2009, 6:48 AM

Post #2 of 6 (1296 views)
Permalink
Re: Why does playback only use 1 core on some BluRay movies? [In reply to]

> Does that hex number identify a different codec (even though they both say
> h264)? Is one of those codecs not designed to run dual cpu? If so, is there
> any way to upgrade that codec to a version that does, or is that built into
> myth (like maybe a part of the embedded copy of ffmpeg)? Does 0.22 handle
> this better (I'd rather not upgrade at this point, but if it's the only real
> solution, I'd consider it). Upgrading to a VDPAU card would probably help,
> but it's not an option at this time.

H264 can only utilize multithreaded decoding if it was encoded the
right way. I don't know all of the details. But from what I understand
H264 can be decoded with one thread per "slice". If it was encoded
with a single slice then it can only use a single core. I am not sure
how check for the number of slices to confirm if this is the case for
you.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


ron at ronfrazier

Nov 22, 2009, 2:05 PM

Post #3 of 6 (1287 views)
Permalink
Re: Why does playback only use 1 core on some BluRay movies? [In reply to]

> H264 can only utilize multithreaded decoding if it was encoded the
> right way. I don't know all of the details. But from what I understand
> H264 can be decoded with one thread per "slice". If it was encoded
> with a single slice then it can only use a single core. I am not sure
> how check for the number of slices to confirm if this is the case for
> you.

Interesting. I didn't know that. Using that as a starting point for
futher research, it appears that the slice thing isn't a limitation of
h264, but merely of the current implementation of ffmpeg. Other
codecs (such as coreavc on windows) do not have this limitation.
Apparently the multithread branch of ffmpeg fixes this too, but it's
still got a lot of bugs at the moment (and because myth uses an
embedded copy of ffmpeg, even once those changes are complete we won't
see them until they get rolled into myth).

I haven't yet figured out how to detect stuff like from the ripped
file, but I'm assuming that's what goes on. Interestingly, by skimming
through the movie, I've discovered that as soon as it reaches chapter
4, it switches to dual core decoding and stays that way for the
remainder of the movie. Odd.

Anyway, thanks for the info. This helps me decide that most likely the
only real solution is to get a VDPAU capable card (or a faster CPU,
but that's probably not a better investment). For now, that's not an
option so I'll have to stick to transcoding it to less demanding file
size/resolution/whatever. Thanks
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


raymond at wagnerrp

Nov 22, 2009, 10:55 PM

Post #4 of 6 (1274 views)
Permalink
Re: Why does playback only use 1 core on some BluRay movies? [In reply to]

On 11/22/2009 17:05, Ronald Frazier wrote:
> Anyway, thanks for the info. This helps me decide that most likely the
> only real solution is to get a VDPAU capable card (or a faster CPU,
> but that's probably not a better investment).

A faster CPU is not really an option. Single threaded software decoding
of H264 content at BluRay bitrates is impossible, and considering CPU
development has been towards more cores instead of faster cores, it will
likely remain that way for some time to come. The fact that you could
play Bruno on a dual core with plenty of spare CPU means that movie is
rather sub-par.

> For now, that's not an
> option so I'll have to stick to transcoding it to less demanding file
> size/resolution/whatever. Thanks
>

Considering you have a C2D, you almost certainly have an available PCIe
slot. VDPAU capable cards can be picked up for as low as $20 after rebate.

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


ron at ronfrazier

Nov 23, 2009, 5:56 AM

Post #5 of 6 (1263 views)
Permalink
Re: Why does playback only use 1 core on some BluRay movies? [In reply to]

> The fact that you could play
> Bruno on a dual core with plenty of spare CPU means that movie is rather
> sub-par.

Huh? Transformers: Revenge of the Fallen runs between 35-40 Mbps for
most of the movie, and as I said, once it gets to chapter 4 and starts
multithreaded decoding, it plays back perfectly fine. CPU is typically
65-85% busy on each core, and that's will an older Core 2 Duo (E6750
2.6 GHz). My Core i7 920 (2.6 Ghz) can almost play back on a single
core with software decoding (some part work fine, but some are
choppy). With an i7-960 (3.2 GHz) smooth single core MIGHT be possible
(or might not....if anyone owns one, I'd love to hear)


> Considering you have a C2D, you almost certainly have an available PCIe
> slot.  VDPAU capable cards can be picked up for as low as $20 after rebate.

Yeah, but I'm still on 0.21 at the moment, and an upgrade would not be
trivial (I have 4 myth systems, and a lot of customizations).
Transcoding is a lot less painful at the moment.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


travis at tabbal

Nov 23, 2009, 8:06 AM

Post #6 of 6 (1250 views)
Permalink
Re: Why does playback only use 1 core on some BluRay movies? [In reply to]

On Mon, Nov 23, 2009 at 6:56 AM, Ronald Frazier <ron [at] ronfrazier> wrote:

>
> Yeah, but I'm still on 0.21 at the moment, and an upgrade would not be
> trivial (I have 4 myth systems, and a lot of customizations).
> Transcoding is a lot less painful at the moment.
>


How about the JYA backport of .21-fixes with VDPAU? I found that a painless
upgrade when I was running .21-fixes. VDPAU really helps and is worth the
small bother to get working. Most of my customizations were at the OS level
and were not affected, the Myth specific configs also worked fine, though
the upgrade to .22 did cause some minor hassles to get working properly.

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.