force codec ffmpeg

Asked by juba

Hello,

In order to force the use o certain codec i use this command with mplayer: "mplayer -vc ffh264vdpau", or "mplayer -vc ffh264vdpau, ffhmpeg12vdpau".
Anyone knows if its possible with xibo pyclient (1.6.0 running on ubuntu 12.04)?

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Xibo Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Harrington
Solved:
Last query:
Last reply:
Revision history for this message
Alex Harrington (alexharrington) said :
#1

Libavg detects the codec automatically. The client just passes in the video
file name

Revision history for this message
juba (diveup) said :
#2

Thank you Alex,

When I run avg_videoplayer.py filename.mp4, i get about 40% of cpu usage. And the nvidia-settings, section "Graphic Card Information" reports a "video engine utilization" of 27%, which seems ok.
Using the same video file, and running the xibo pyclient (sh run.sh), cpu usage scalates to 80%, and nvidia-settings, section "Graphic Card Information" reports a "video engine utilization" of 0%. It appears that video engine is not in use.

Thanks

Revision history for this message
Alex Harrington (alexharrington) said :
#3

Make sure you have the correct libsdl audio engine installed for your
environment. I've seen that break hardware rendering

Revision history for this message
juba (diveup) said :
#4

Sory Alex,

I tried all libsdl packages , even the one from this repo "https://launchpad.net/~zoogie/+archive/ubuntu/sdl2-snapshots" witch is version 2. No luck, can you tell witch version you are using?

Thank you

Revision history for this message
Alex Harrington (alexharrington) said :
#5

I'm using the one in the installation guide

Revision history for this message
juba (diveup) said :
#6

Hi Alex,

Just followed the installation guide step by step. Noticed that python-soapy is python-soappy and libswscale0 does not exist on ubuntu 12.04, just installed libswscale2.
Get the same result stated on question #2.
Its strange because avg_videoplayer.py allways uses the video engine.
Do you have more suggestions to make pyclient work with the graphic video engine?

Revision history for this message
Alex Harrington (alexharrington) said :
#7

The videoplayer py script is definitely using the system libavg and not
from a separate distribution

Revision history for this message
juba (diveup) said :
#8

Hello Alex,

Sorry to insist, I managed to use the graphics video engine with this script:

"import sys
from libavg import avg, app, player, widget

canvas = player.createMainCanvas(size=(800,600))
rootNode = canvas.getRootNode()
videoNode = avg.VideoNode(href="/opt/xibo/pyclient/client/python/data/18.mp4", pos=(10,10),
        parent=rootNode, accelerated=True)
videoNode.play()
player.play() "

The video acceleration, only works when this is stated "parent=rootNode, accelerated=True".
Can you tell me where can i pass this option on py client script ?

thanks

Revision history for this message
Best Alex Harrington (alexharrington) said :
#9

Line 41 of VideoMedia.py

http://bazaar.launchpad.net/~xibo-maintainers/xibo/ponswinnecke/view/head:/client/python/plugins/media/VideoMedia.py#L41

You'd need to add accellerated="true" to the parameters in the XML

Revision history for this message
juba (diveup) said :
#10

Hello Alex,

Its Great, it works !

Many Thanks for the help

Revision history for this message
juba (diveup) said :
#11

Thanks Alex Harrington, that solved my question.