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

Mailing List Archive: MythTV: Users

Flash, VDPAU, MythNetVision and You

 

 

First page Previous page 1 2 Next page Last page  View All MythTV users RSS feed   Index | Next | Previous | View Threaded


mtdean at thirdcontact

Dec 3, 2010, 8:16 PM

Post #26 of 33 (983 views)
Permalink
Re: Flash, VDPAU, MythNetVision and You [In reply to]

All the below is TTBOMK--I may well be wrong in my interpretation of
the information I have.


On 12/03/2010 10:27 PM, Eric Sharkey wrote:
> On Fri, Dec 3, 2010 at 10:08 PM, Jarod Wilson wrote:
>> Xv support gets you what? Colorspace conversion?
> I'm certainly no expert, but I believe scaling is done in hardware with xv.

Yes. Really the biggest problem with Flash is software scaling of video.

Decoding low-bitrate video (even H.264) isn't that tough (at least not
for a real CPU :). And, yes, even Hulu "high-definition" video is
low-bitrate (480kbps, 700kbps, and 2.5Mbps On2 Flash VP6 or 1000kbps
H.264 Flash--see
http://en.wikipedia.org/wiki/High-definition_video#HD_on_the_World_Wide_Web.2FHD_Streaming
).

Scaling low-resolution H.264 to full 1920x1080 in software is /very/ tough.

I'm pretty sure this is why those who tried the CrystalHD decoding in
Flash were somewhat disappointed by the results. (I.e. it solved the 20%
problem (decoding), leaving the 80% problem (software scaling) still
there--or should that be the 5%/95% problems.)

Note, also, that Flash has had hardware acceleration support on
GNU/Linux since 9.0.115.0 (in May 2008) using OpenGL (and I'm pretty
sure that includes the 64-bit Flash versions). This allows the video to
be dumped to OpenGL in RGB (the colorspace that Flash uses***). Then
OpenGL can do the video scaling, and full-size graphic elements can be
composited on top of the video by OpenGL. (Then again, with OpenGL
support, I /think/ they could dump the unscaled video in YUV to the
graphics card, let OpenGL scale it, then dump a full-size graphic
element in RGB, and let the graphic card composite it on top of the
video--doing all required colorspace conversions--but I'm not positive.
And even if they could, I don't know if they actually do it that way
versus just doing the YUV->RGB conversion in software.)

However, hardware acceleration in Flash only works with content authored
to take advantage of this. See:
http://blogs.adobe.com/penguinswf/2008/05/flash_uses_the_gpu.html
and
http://www.kaourantin.net/2008/05/what-does-gpu-acceleration-mean.html
for details.

TTBOMK, this just means that for 2 1/2 years, it's been possible for
sites like Hulu/NBC and Fox and CWTV (which use wmode transparent) and
CBS (which uses wmode opaque) to have provided content that allows
hardware-accelerated playback in Flash, but they chose not to.

Of course, now that Adobe is making a big deal out of it, they're likely
to do things right. However, AFAIU, that means that anyone with OpenGL
support will also benefit.

And, Eric, FWIW, the Adobe blog post has the reason why Adobe doesn't
use Xv:
---

* FAQ regarding hardware acceleration: Why doesn’t the Flash Player
on Linux user[sic] the X video extension (Xv)?
* Answer: Because Xv scales YUV data. Flash Player operates on RGB data.

For the uninitiated, many video codecs operate in a YUV colorspace.
Unix/X11 has an extension called X video that allows hardware scaling of
YUV images. This is a very mature system on Linux which has allowed
seamless, low CPU usage, fullscreen video playback on Linux for many
years. Unfortunately, the Flash Player can not easily make use of this
since Sorenson, On2, or H.264 video data — even though it is decoded as
YUV — has to be converted to RGB and possibly combined with other
graphical elements. This is why RGB scaling via OpenGL is the future of
Flash.
---

Well, now it seems they're saying that VDPAU is the future of Flash...
Either way, TTBOMK, fixing the Flash to work with VDPAU will also fix it
to work with OpenGL.

See, also,
http://blogs.adobe.com/penguinswf/2010/01/solving_different_problems.html

Also, take note of who wrote those 2 Adobe blog posts. He should know
what he's talking about when it comes to FOSS video playback... (Search
on his name and look at Google's, "Searches related to..." list.)

Mike

*** Whereas Xv only works with YUV. Flash actually decodes H.264, which
results in YUV. Then it does a software colorspace conversion to RGB so
that it can do compositing of graphic elements on top of the video. They
also do software scaling of the video. And, they are likely doing
compositing after scaling so that they can render the graphic elements
at full display size rather than have them tied to the video size--play
back a 160x120 video in MythTV on a 1920x1080 screen using the Xv
renderer and display the OSD to see why. If you instead use the OpenGL
renderer on that same 160x120 video on a 1920x1080 screen, you get a
nice OSD because it's not compositing before scaling the video.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


jarod at wilsonet

Dec 3, 2010, 11:35 PM

Post #27 of 33 (958 views)
Permalink
Re: Flash, VDPAU, MythNetVision and You [In reply to]

On Dec 3, 2010, at 11:16 PM, Michael T. Dean wrote:

> All the below is TTBOMK--I may well be wrong in my interpretation of the information I have.
>
>
> On 12/03/2010 10:27 PM, Eric Sharkey wrote:
>> On Fri, Dec 3, 2010 at 10:08 PM, Jarod Wilson wrote:
>>> Xv support gets you what? Colorspace conversion?
>> I'm certainly no expert, but I believe scaling is done in hardware with xv.
>
> Yes. Really the biggest problem with Flash is software scaling of video.

Ah, ok, I stand corrected, I didn't realize it was actually the scaling
that was the bigger issue.

And thank you for the very detailed explanation. :)

--
Jarod Wilson
jarod [at] wilsonet



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


mythtv-list at dinkum

Dec 4, 2010, 12:47 AM

Post #28 of 33 (973 views)
Permalink
Re: Flash, VDPAU, MythNetVision and You [In reply to]

On 4 Dec 2010, at 01:08, jedi wrote:

> On Fri, Dec 03, 2010 at 11:45:40PM +0000, Andre wrote:
>>
>> On 3 Dec 2010, at 20:45, Jarod Wilson wrote:
>>
>>> On Dec 3, 2010, at 3:40 PM, jedi wrote:
>>>
>>>> On Fri, Dec 03, 2010 at 11:14:47AM -0500, Steven Adeff wrote:
>>>>> On Fri, Dec 3, 2010 at 12:55 AM, Jarod Wilson <jarod [at] wilsonet> wrote:
>>>>>> Okay, I've held out a few hours to see if anyone else would post
>>>>>> first, but I can't resist. (Plus, about to head to bed).
>>>>>>
>>>>>> Adobe just posted a flash player 10.2 beta binary, with VDPAU support,
>>>>>> and initial testing shows marginally > 0% cpu utilization playing back
>>>>>> 1080p flash video.
>>>>>>
>>>>>> So all those ion boxes just got a lot more interesting (and the
>>>>>> crystalhd got a bit less interesting at the same time). Should make
>>>>>> mythnetvision a lot more usable for a fair number of people...
>>>>>>
>>>>>> I certainly plan to poke at it more Real Soon Now. Annoyed that they
>>>>>> continue to let 64-bit support lag -- develop with 64-bit support in
>>>>>> mind to begin with (or develop *only* on 64-bit), then 32-bit support
>>>>>> is a piece of cake. Ugh. Anyway...
>>>>>>
>>>>>> http://labs.adobe.com/technologies/flashplayer10/stagevideo.html
>>>>>> http://www.phoronix.com/scan.php?page=article&item=adobe_linux_vdpau&num=1
>>>>>
>>>>> I was under the impression that StageVideo was to support VDPAU,
>>>>> CrystalHD, and VA-API?
>>>>
>>>> I've tried testing it with my own ION based setup with Hulu Desktop
>>>> and it doesn't do a dang thing for it. Has anyone else tried that yet?
>>>
>>> Re-read the docs... :)
>>>
>>> [QUOTE]
>>> For content providers, Stage Video will work with all of the existing
>>> video viewed in Flash Player once they utilize the new API in their
>>> video player SWFs. Developers can learn more about how to enable
>>> their sites to take advantage of Stage Video today, and sites like
>>> YouTube have already started adding early support for Stage Video.
>>> [END QUOTE]
>>>
>>> I suspect Hulu's software needs to be updated to use Stage Video.
>>
>> And final video performance is very dependent on the design of the individual flash code it's accessed from!
>>
>> Don't expect everything to work with 3% cpu like vdpau in myth, this is a partial solution that is really easy to screw up in your flash code.
>>
>> I did some projects with hw accelerated flash video a little while ago, it's a big help but it's not a magical complete solution.
>
> ...I dunno. From what I have been able to test with sites that actually use
> the new features, it's pretty effective. Myth-like uses should certainly end
> up with Myth-like levels of CPU usage.

If the usage is purely video playback and the frame sizes are appropriate to your screen then it can be a nice 5% cpu solution. The problem starts when the video is embedded in loads of other active graphic elements and navigation code, like the sort of flash only site that marketing types seem to like.

I'm sure the big players will optimise their code and keep things simple enough to work well but there will still be a lot of flash sites with poorly performing video, even if they use an accelerated player.

Andre



>
> The speedup just needs to be enough to allow the slower Atom type systems
> to be able to cope. It looks like the new approach will allow that. Although
> you can't know for sure until the stuff you're interested in is recoded to
> support the new features and you can test it for yourself.
>
> Dunno how the 1080p YouTube stuff referenced on the Stage Video site
> compares to other stuff like Hulu.
>
> It does generate single digit CPU usage on a faster machine and still
> yields what looks like a dramatic improvement on Atom.
>
> [deletia]
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

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


george.galt at gmail

Dec 4, 2010, 6:11 AM

Post #29 of 33 (975 views)
Permalink
Re: Flash, VDPAU, MythNetVision and You [In reply to]

> Note, also, that Flash has had hardware acceleration support on GNU/Linux
> since 9.0.115.0 (in May 2008) using OpenGL (and I'm pretty sure that
> includes the 64-bit Flash versions). This allows the video to be dumped to
> OpenGL in RGB (the colorspace that Flash uses***). Then OpenGL can do the
> video scaling, and full-size graphic elements can be composited on top of
> the video by OpenGL. (Then again, with OpenGL support, I /think/ they could
> dump the unscaled video in YUV to the graphics card, let OpenGL scale it,
> then dump a full-size graphic element in RGB, and let the graphic card
> composite it on top of the video--doing all required colorspace
> conversions--but I'm not positive. And even if they could, I don't know if
> they actually do it that way versus just doing the YUV->RGB conversion in
> software.)
>
> However, hardware acceleration in Flash only works with content authored to
> take advantage of this. See:
> http://blogs.adobe.com/penguinswf/2008/05/flash_uses_the_gpu.html
> and
> http://www.kaourantin.net/2008/05/what-does-gpu-acceleration-mean.html
> for details.
>
> TTBOMK, this just means that for 2 1/2 years, it's been possible for sites
> like Hulu/NBC and Fox and CWTV (which use wmode transparent) and CBS (which
> uses wmode opaque) to have provided content that allows hardware-accelerated
> playback in Flash, but they chose not to.
>
> Of course, now that Adobe is making a big deal out of it, they're likely to
> do things right. However, AFAIU, that means that anyone with OpenGL support
> will also benefit.
>

Mike:

Thanks for the very detailed and interesting explanation. I assume
from what you said above, that those of us on 64-bit systems might do
well to just wait for the content authors to take advantage of the
hardware acceleration that already exists in Flash and not jump
through the hoops needed to get 32-bit flash/VDPAU running. Is this
correct (assuming the 64-bit Flash player does OpenGL)?

Thanks again.

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


mtdean at thirdcontact

Dec 4, 2010, 9:57 AM

Post #30 of 33 (956 views)
Permalink
Re: Flash, VDPAU, MythNetVision and You [In reply to]

On 12/04/2010 09:11 AM, George Galt wrote:
> Thanks for the very detailed and interesting explanation. I assume
> from what you said above, that those of us on 64-bit systems might do
> well to just wait for the content authors to take advantage of the
> hardware acceleration that already exists in Flash and not jump
> through the hoops needed to get 32-bit flash/VDPAU running. Is this
> correct (assuming the 64-bit Flash player does OpenGL)?

Assuming you have good OpenGL (and, any good mythfrontend system
should), then, that's my understanding.

Note, though, that OpenGL (and, TTBOMK, VDPAU) isn't guaranteed to
actually reduce CPU usage--as described in the posts I linked, and as
mentioned by Andre in this thread.

And, as Andre also mentioned, the marketing types really seem to like
the complex UIs full of graphic elements--the kinds of things that,
TTBOMK, you can't do once you enable the hardware-accelerated video
playback. So, it's quite possible that sites may not enable the
acceleration--after all, Windows users don't generally see problems.

Also, I am not a Flash guy--so I may be way off.

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


kevin at familyross

Dec 4, 2010, 12:30 PM

Post #31 of 33 (941 views)
Permalink
Re: Flash, VDPAU, MythNetVision and You [In reply to]

On 12/4/2010 9:57 AM, Michael T. Dean wrote:
>
> And, as Andre also mentioned, the marketing types really seem to like
> the complex UIs full of graphic elements--the kinds of things that,
> TTBOMK, you can't do once you enable the hardware-accelerated video
> playback. So, it's quite possible that sites may not enable the
> acceleration--after all, Windows users don't generally see problems.

I believe this part is incorrect. The new StageVideo API was
specifically designed to allow GPU-accelerated video playback with
graphics composited on top of it. See
http://www.adobe.com/devnet/flashplayer/articles/stage_video.html

Or maybe I misunderstood you and you were talking about something else...
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mythtv-list at dinkum

Dec 4, 2010, 12:37 PM

Post #32 of 33 (943 views)
Permalink
Re: Flash, VDPAU, MythNetVision and You [In reply to]

On 4 Dec 2010, at 20:30, Kevin Ross wrote:

> On 12/4/2010 9:57 AM, Michael T. Dean wrote:
>>
>> And, as Andre also mentioned, the marketing types really seem to like the complex UIs full of graphic elements--the kinds of things that, TTBOMK, you can't do once you enable the hardware-accelerated video playback. So, it's quite possible that sites may not enable the acceleration--after all, Windows users don't generally see problems.
>
> I believe this part is incorrect. The new StageVideo API was specifically designed to allow GPU-accelerated video playback with graphics composited on top of it. See http://www.adobe.com/devnet/flashplayer/articles/stage_video.html

It's possible, we did it (eventually) on a recent project.

The point was that if the flash player is badly coded (like they usually are) then the video performance dies very quickly.

>
> Or maybe I misunderstood you and you were talking about something else...
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

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


mtdean at thirdcontact

Dec 4, 2010, 12:40 PM

Post #33 of 33 (955 views)
Permalink
Re: Flash, VDPAU, MythNetVision and You [In reply to]

On 12/04/2010 03:37 PM, Andre wrote:
> On 4 Dec 2010, at 20:30, Kevin Ross wrote:
>> On 12/4/2010 9:57 AM, Michael T. Dean wrote:
>>> And, as Andre also mentioned, the marketing types really seem to like the complex UIs full of graphic elements--the kinds of things that, TTBOMK, you can't do once you enable the hardware-accelerated video playback. So, it's quite possible that sites may not enable the acceleration--after all, Windows users don't generally see problems.
>> I believe this part is incorrect. The new StageVideo API was specifically designed to allow GPU-accelerated video playback with graphics composited on top of it. See http://www.adobe.com/devnet/flashplayer/articles/stage_video.html
> It's possible, we did it (eventually) on a recent project.
>
> The point was that if the flash player is badly coded (like they usually are) then the video performance dies very quickly.

Ah, makes sense. So they can still enable it, but it may not help as
much--since complex means harder to do right.

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

First page Previous page 1 2 Next page Last page  View All 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.