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