Pancake,

Thanks for your help on this. I'll give these suggestions a run, but I have
a few comments first.

> # Then run the video.py program and drag the video file over the window. 
> now use 'top' again.
> python video.py

So you mean I should play two videos at the same time, on top of each other?


> In my box i get around 10% more of cpu usage with pigment than with
xvimagesink. It's mainly the cost
> of injecting every frame as an OpenGL texture. The main problem of this
conversion is the colorspace
> conversion, because opengl only handles RGBA format, and most videos are
in YUV, NV12, ... formats, so
> the pipeline needs to convert the colorspace of every frame before being
pushed to the sink element.
> To accelerate this, pigment uses vertex shaders to make this
transformation in hardware and for 1080p
> videos is probably the hardest thing to be done.

I'd be fine with 10%, my problem is that in Elisa it's on the magnitude of
double the cpu time vs gst-launch. That eats up all margin. 



> For 2D there are already hardware colorspace conversors, but actual
hardware has no way to do it
> without using pixel shaders or special (not yet released) hardware.

But it works well in gst-launch, what's the difference? Can I see the
"chain" that elisa is using vs. gst-launch -v?


> You can also try converting the clip and reencode-it to rgba, to do this
task before playing the
> video, but you will have to wait few hours before starting to watch the
movie :P

Nah, that's not really an option, I'm looking for a convenient media center
that my wife and son can use, don't want to convert videos for hours before
they are available. Also, it's working great in gst-launch so I don't
understand why it would be so much slower in Elisa if it's using the same
technique.

Regards,
/Hakan


-----Original Message-----
From: pancake [mailto:[email protected]] 
Sent: Tuesday, March 24, 2009 9:05 AM
To: Hakan Lindestaf
Cc: [email protected]
Subject: Re: [Elisa] What do I need for 1080P playback

Hakan Lindestaf wrote:
> Thanks for the suggestions, unfortunately I don't know the Elisa
development environment enough to know where to specify the qos property.
Can you point me to this pigment-python example that plays video?
> I'm a developer, just not in Python/Elisa.
>
>   

the pigment-python examples are inside the pigment repository and they 
are installed in
${prefix}/share/pigment-python/0.3/examples. The name of the video 
player is 'video.py'.

The qos propertly has nothing to do with python/elisa, it is something 
about GStreamer,
you can inspect the properties of the elements with 'gst-inspect-0.10' 
utility, but you will
not see pgmsink in with gst-inpsect because the element it's shipped 
inside pigment and
can only be used from inside.

BTW i have been looking at the pgmsink and looks like there's no such 
property. So, forget
about that 'hack' :)

The next thing you should try is:

# play the file using xvimagesink in fullscreen and analyze the cpu 
usage with 'top' utility.
gst-launch playbin uri=file://$PWD/your-file.mkv

# Then run the video.py program and drag the video file over the window. 
now use 'top' again.
python video.py

In my box i get around 10% more of cpu usage with pigment than with 
xvimagesink. It's mainly
the cost of injecting every frame as an OpenGL texture. The main problem 
of this conversion
is the colorspace conversion, because opengl only handles RGBA format, 
and most videos are
in YUV, NV12, ... formats, so the pipeline needs to convert the 
colorspace of every frame before
being pushed to the sink element. To accelerate this, pigment uses 
vertex shaders to make this
transformation in hardware and for 1080p videos is probably the hardest 
thing to be done.

Maybe pigment is using sofware based colorspace conversions and this is 
the bottleneck of your
pipeline. You can also use valgrind(1) to generate a profiling of the 
pigment pipeline and try to
determine the problem from there.

For 2D there are already hardware colorspace conversors, but actual 
hardware has no way to
do it without using pixel shaders or special (not yet released) hardware.

You can also try converting the clip and reencode-it to rgba, to do this 
task before playing the
video, but you will have to wait few hours before starting to watch the 
movie :P

Read documentation or ask in the gstreamer-* mailing list for detailed 
info :) This probably not
the best place to discuss low level multimedia stuff :P

--pancake

Reply via email to