You are not logged in.

#1 2010-08-29 10:08:59

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

[Solved]I don't know if hardware acceleration is working

I often watch movies in HD, and when using XBMC, they sometimes lag and/or get out of sync (audio/video). So recently I tried mplayer, and it seems better, but I've also looked into va-api. So I grabbed the pkgbuild for mplayer-vaapi (in community) and edited it to include pulseaudio and then built and installed it. But when trying 'mplayer -ao pulse -vo vaapi [movie] I don't really notice any difference. Htop shows cpu usage 70-90%, I thought it would be lower if it is working. My hardware is not the best though, so maybe it is? how do I know?
Here is output of mplayer:

MPlayer SVN-r32025-4.5.1 (C) 2000-2010 MPlayer Team
159 audio & 342 video codecs
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing f-brothers.720p.mkv.
libavformat file format detected.
[matroska,webm @ 0x360dbc0] Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (dca), -aid 0
VIDEO:  [H264]  1280x536  0bpp  24.000 fps    0.0 kbps ( 0.0 kbyte/s)
Opening video filter: [expand osd=1 aspect=16/9 round=16]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 1.777778, round: 16
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[VD_FFMPEG] VA API accelerated codec.
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [ffdca] afm: ffmpeg (FFmpeg DTS)
==========================================================================
AO: [pulse] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Unsupported PixelFormat 61
[VD_FFMPEG] Trying pixfmt=1.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
Unsupported PixelFormat 61
[VD_FFMPEG] Trying pixfmt=0.
Unsupported PixelFormat 61
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[VD_FFMPEG] Trying pixfmt=2.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[VD_FFMPEG] Trying pixfmt=3.
Movie-Aspect is 2.39:1 - prescaling to correct movie aspect.
VO: [x11] 1280x720 => 1280x720 Planar YV12 
[swscaler @ 0xeafc20]using unscaled yuv420p -> bgra special converter
A:   1.5 V:   1.5 A-V: -0.002 ct:  0.007   0/  0 19% 27%  3.1% 1 0 

Exiting... (Quit)

in ~/.mplayer/config I have this:

# default configuration that applies to every file
[default]
# use X11 for video output
vo=x11
va=vaapi
# use also for audio output
ao=pulse
# scale the subtitles to the 3% of the screen size
subfont-text-scale = 3
# never use font config
nofontconfig = 1
# add black borders so the movies have the same aspect ratio of the 
# monitor
# for wide screen monitors
vf-add=expand=::::1:16/9:16

If I use vo=vaapi and va=vaapi, I get audio, but video is black. Mplayer seems to think it's working, though there is no video.
My system is:
Asus UL30a
Intel CULV 1,3ghz
4GB ram
Intel x4500mhd

I am running gnome with compiz enabled, and system is fully up-to-date with [testing] enabled:
testing/kernel26 2.6.35.4-1 (base)
testing/xf86-video-intel 2.12.0-2 (xorg-video-drivers)
extra/libva 1.0.4-1
extra/libdrm 2.4.21-2

So, how do I know if it's working if I can't see any difference just by my eyes? smile

Last edited by KlavKalashj (2010-08-29 18:08:00)

Offline

#2 2010-08-29 11:00:00

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: [Solved]I don't know if hardware acceleration is working

I came across this thread. you can try the solution for your case.

Offline

#3 2010-08-29 12:45:14

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

Re: [Solved]I don't know if hardware acceleration is working

Thanks for your reply. That indeed seems to be worth a try. The problem is, I need it to work with pulseaudio. And looking at that pkgbuild, I don't know where to add --enable-pulse, that was easy in mplayer-pulse(obviously) and mplayer-vaapi.

Offline

#4 2010-08-29 13:25:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved]I don't know if hardware acceleration is working

You have pretty weak hardware so it may be just it.

Offline

#5 2010-08-29 13:49:53

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: [Solved]I don't know if hardware acceleration is working

Unless this has changed recently, there's no VAAPI support for X4500 yet. Should be coming sometime this year though.

Is the processor dual core by any chance, or single core with hyperthreading? In both of these cases, mplayer-mt will help.

Offline

#6 2010-08-29 14:07:32

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

Re: [Solved]I don't know if hardware acceleration is working

Oh, I see, I did not know that... It's a dual core. Hyperthreading, I don't know, don't think so. I guess I will try mplayer-mt then and skip vaapi for now, but could anyone have a look at the pkgbuild and tell me how to add pulseaudiosupport? Thanks for your help!!

Offline

#7 2010-08-29 18:07:34

KlavKalashj
Member
Registered: 2008-10-09
Posts: 376

Re: [Solved]I don't know if hardware acceleration is working

Ok, so I installed mplayer-mt-git from aur, and it's now working nicely. It's still not super smooth, but I guess that's becouse of my hardware. At least it syncs perfectly now, and I did not need to add anything to get pulse support. So thanks for the help! I'll keep my eyes open for va-api support smile

Offline

Board footer

Powered by FluxBB