mplayer-vaapi

mplayer-vaapi

Postby pmithrandir » Feb 8th, '14, 17:42

Hello,

would like to know if someone manage to make it work.

I think mageia included the intel driver that support it for my card, but I don't see mplayer-vaapi anymore in the package list.
Any idea what would be the best way to get it ?

I'm reluctant to install it from source and to remove the player instance from rpm database... but I can try if needed.

My final goal is to use smplayer.

Thank you,
Pierre
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: mplayer-vaapi

Postby doktor5000 » Feb 8th, '14, 17:51

Define "make it work".
Also why only use mplayer? Why not vlc or smplayer?
EDIT: Scratch that last one as smplayer is only a frontend :)

Please show the output of
Code: Select all
vainfo
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18032
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: mplayer-vaapi

Postby pmithrandir » Feb 8th, '14, 18:27

Hello,

I'm not a big fan of vlc ;)

For the output, here it is :
Code: Select all
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_34
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.34 (libva 1.2.1)
vainfo: Driver version: Intel i965 driver - 1.2.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD


It seams that the intel driver was not installed from the g45-h264 branch.
described here https://01.org/linuxgraphics/community/vaapi

If I understand right, to make it work I need :
- the specific branch
- mplayer-vaapi

Does that sound easy to setup without loosing too much advantage of mageia pre-configured package ?
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: mplayer-vaapi

Postby doktor5000 » Feb 8th, '14, 20:12

pmithrandir wrote:It seams that the intel driver was not installed from the g45-h264 branch.
described here https://01.org/linuxgraphics/community/vaapi

If I understand right, to make it work I need :
- the specific branch
- mplayer-vaapi

Does that sound easy to setup without loosing too much advantage of mageia pre-configured package ?

Have a look:

Code: Select all
[doktor5000@Mageia3 ~]$ urpmq -i vaapi-driver-intel
Name        : vaapi-driver-intel
Version     : 1.2.1
Release     : 2.mga4
Group       : System/Kernel and hardware
Size        : 1295062                      Architecture: x86_64
Source RPM  : vaapi-driver-intel-1.2.1-2.mga4.src.rpm
URL         : http://cgit.freedesktop.org/vaapi/intel-driver/
Summary     : Is the VA-API implementation for Intel G45 chipsets
Description :
Libva-driver-intel is the VA-API implementation for Intel G45 chipsets
and Intel HD Graphics (Intel Core processor family).

Do you have that installed?
If you want x264 support, then you have to compile yourself, but see the notes at https://wiki.archlinux.org/index.php/In ... n_GMA_4500

AFAIK mplayer-vaapi is not needed anymore, that's contained in mplayer since quite some time.
You only need to pass the right options to mplayer, can be configured in smplayer.
I've used http://www.fedorawiki.de/index.php/NVID ... _abspielen for that
Although that's for VDPAU, shouldn't be that much different for va.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18032
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: mplayer-vaapi

Postby pmithrandir » Feb 9th, '14, 13:26

Hello,

Seems so :
Code: Select all
[pmithrandir@localhost ~]$ urpmq -i vaapi-driver-intel
Name        : vaapi-driver-intel
Version     : 1.2.1
Release     : 2.mga4
Group       : System/Kernel and hardware
Size        : 1295062                      Architecture: x86_64
Source RPM  : vaapi-driver-intel-1.2.1-2.mga4.src.rpm
URL         : http://cgit.freedesktop.org/vaapi/intel-driver/
Summary     : Is the VA-API implementation for Intel G45 chipsets
Description :
Libva-driver-intel is the VA-API implementation for Intel G45 chipsets
and Intel HD Graphics (Intel Core processor family).


ok, so I have to compile the support, but if I do so, will it be compatible with global pckages ?

Thank you,
Pierre
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: mplayer-vaapi

Postby doktor5000 » Feb 9th, '14, 17:19

urpmq only check packages in repository, not installed packages. What does
Code: Select all
rpm -q vaapi-driver-intel
say?

To keep it compatible with the other packages you could take the src.rpm for vaapi-driver-intel and modify it to build with the h.264 branch.
But if you don't try you'll never know.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18032
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: mplayer-vaapi

Postby pmithrandir » Feb 9th, '14, 18:08

I have that :
Code: Select all
[pmithrandir@localhost ~]$ rpm -q vaapi-driver-intel
vaapi-driver-intel-1.2.1-2.mga4


I will check how package src.rpm works.
I never did it and that's why I wanted to know the consequences before starting... to reinstall my computer is not an option if I fail :) no time for that.

thank you for your help.
Pierre
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: mplayer-vaapi

Postby pmithrandir » Feb 12th, '14, 20:46

Hi,

While trying to execute the compilation, I get that :
Code: Select all
checking for DRM... no
configure: error: Package requirements (libdrm >= 2.4.45) were not met:

No package 'libdrm' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables DRM_CFLAGS
and DRM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.



Any idea why ? Of course libdrm is installed in correct version.
Pierre
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: mplayer-vaapi

Postby pmithrandir » Feb 12th, '14, 21:03

Hello,

i passed it by installing libdrm-devel.

But now I have :
Code: Select all
checking for LIBVA_DEPS... no
configure: error: Package requirements (libva >= 0.34) were not met:

No package 'libva' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.


And libva doesn't seem to exist in 64bits.
Any suggestion ?
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: mplayer-vaapi

Postby doktor5000 » Feb 12th, '14, 22:11

pmithrandir wrote:And libva doesn't seem to exist in 64bits.
Any suggestion ?


It does, just install it:
Code: Select all
[doktor5000@Mageia3 ~]$ urpmf -f -m --name lib64va-
Core Release:lib64va-devel-1.2.1-2.mga4.x86_64
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18032
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: mplayer-vaapi

Postby pmithrandir » Feb 13th, '14, 20:51

Hello,

Found it
Another question, after executing autogen.sh with success, I have to do what ?
I never see a package without any doc like this one.

Did you find it ?
Thanks
Pierre
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: mplayer-vaapi

Postby doktor5000 » Feb 13th, '14, 22:21

Did I find what?

autogen.sh is usually used for development snapshots.

Simply run ./configure && make as usual afterwards ... if they use autotools as buildsystem.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18032
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: mplayer-vaapi

Postby pmithrandir » Feb 13th, '14, 22:49

Hi,

I was refering to the doc.
I did the classic configure / make, but I cant find the driver file...

strange.

Will check more this week end.
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: mplayer-vaapi

Postby doktor5000 » Feb 13th, '14, 23:13

pmithrandir wrote:I did the classic configure / make, but I cant find the driver file...


Code: Select all
[doktor5000@Mageia3 intel-driver-g45-h264]$ find . -iname "*so"
./src/.libs/i965_drv_video.so


But why didn't you simply run make install to install it?

make[2]: Entering directory '/home/doktor5000/intel-driver-g45-h264/src'
make[3]: Entering directory '/home/doktor5000/intel-driver-g45-h264/src'
make[3]: Nothing to be done for 'install-exec-am'.
/usr/bin/mkdir -p '/usr/lib64/dri'
/bin/sh ../libtool --mode=install /usr/bin/install -c i965_drv_video.la '/usr/lib64/dri'
libtool: install: /usr/bin/install -c .libs/i965_drv_video.so /usr/lib64/dri/i965_drv_video.so
libtool: install: /usr/bin/install -c .libs/i965_drv_video.lai /usr/lib64/dri/i965_drv_video.la
libtool: finish: PATH="/sbin:/bin:/usr/sbin:/usr/bin:/sbin" ldconfig -n /usr/lib64/dri

----------------------------------------------------------------------
Libraries have been installed in:
/usr/lib64/dri
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18032
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: mplayer-vaapi

Postby pmithrandir » Feb 15th, '14, 12:21

It was easy in fact,

Now I have :
Code: Select all
[pmithrandir@localhost Telechargements]$ vainfo
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_34
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.34 (libva 1.2.1)
vainfo: Driver version: Intel i965 driver - 1.2.1.pre1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD


But when I try o open the video, I get :
Code: Select all
[pmithrandir@localhost Telechargements]$ mplayer -vo vaapi  video.mp4
libavformat version 55.12.100 (external)
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO:  [H264]  848x480  24bpp  23.976 fps  649.5 kbps (79.3 kbyte/s)
Clip info:
 major_brand: isom
 minor_version: 1
 compatible_brands: isomavc1
 creation_time: 2013-11-20 16:15:56
Load subtitles in ./
Error opening/initializing the selected video_out (-vo) device.

Any idea of the reason ?
Thank you,
Pierre
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: mplayer-vaapi

Postby pmithrandir » Feb 15th, '14, 13:11

For what I understood, the problem is that mplayer doesn't have vaapi support included.
I'm trying with the mplayer-vaapi tgz file to see.
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: mplayer-vaapi

Postby pmithrandir » Feb 15th, '14, 19:04

ok, I tried the entire afternoon to compile mplayer vaapi, without any success.

https://gitorious.org/vaapi/mplayer/sou ... 49480:DOCS

I may be at the limit of my skills, and to install devels for tens of library start to piss me a little bit.
I will check if there is any way to do it in an easier way.

EDIT : I tried this version...
http://pkgs.org/mageia-3/mageia-tainted ... 4.rpm.html

it works, but the playback is very slow., not really what you can expect from hardware decoding.
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: mplayer-vaapi

Postby rihoem » Feb 25th, '14, 22:58

I managed to successfully compile mplayer -vaapi , after many attempts and some trickery .

First , I downloaded and compiled the libva-intel-driver and libva packafes from this site ( the latest versions ): http://www.freedesktop.org/software/vaapi/releases/

The building is simple, ./configure, make and make install (and the proper -dev packages, but they are all avaiable from repositories). After restarting the system, follow the mplayer building instructions according to this thread from Gentoo forum:

Code: Select all
git clone git://gitorious.org/vaapi/mplayer mplayer.git
cd mplayer
git pull origin hwaccel-vaapi
./configure -prefix=/usr/local
make

( http://forums.gentoo.org/viewtopic-t-903718-postdays-0-postorder-asc-start-25.html)

When running the command 'configure', it will aks to download ffmpeg from git. Accept it. For some reason , he does not see the ffmpeg headers installed by 'lib64ffmpeg -devel' package.

Stay tuned to the required packages. Maybe I'm too newbie , but I ended up confusing myself with 'libva -devel ' (32bits) and 'lib64-devel' packages before realizing the mistake :P

Please note that I did not put 'make instal' command. For some reason, even after installed, smplayer can not use the compiled binary with hardware acceleration (it just give no video output...). So you need to point to SMPlayer the location of the compiled binary, then it runs flawlessly. Maybe removing the 'smplayer' and 'mplayer' packages from the system, forcing installation of smplayer only, and then installing the compiled binary, it would work.

Finally, we need to "restore" the drivers from packages 'lib64va1' and 'vaapi-driver-intel'. Force re-installation with the command "urpmi -replacepkgs lib64va1 vaapi-driver-intel". (Just removing and installing again could break the system, because libva is a dependency of a lot of packages).

Restart the system, and finally copy the file i965_drv_video.so from /usr/lib64/dri to /usr/local/lib/dri (or create a symbolic link).

I do not understand why, but it seems that the installation of the drivers from freedesktop is required, in order to build mplayer-vaapi correctly (and avoid libva errors), but the compiled mplayer needs the drivers from Mageia repositories in order to run....

Sorry my bad english. Hope this help.

(I was wondering. Can i just upload my compiled binary to someone who needs it?)
User avatar
rihoem
 
Posts: 12
Joined: Feb 25th, '14, 15:15

Re: mplayer-vaapi

Postby pmithrandir » Feb 27th, '14, 12:55

Hello,

Question, what kind of performance do you have ?
Mine were so poor that I had to come back to xv driver.
Pierre
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: mplayer-vaapi

Postby rihoem » Feb 27th, '14, 16:16

pmithrandir wrote:Hello,

Question, what kind of performance do you have ?
Mine were so poor that I had to come back to xv driver.
Pierre


Using mplayer directly via command line, it uses a max of 3% of CPU. Using Smplayer, it reaches ~5% of CPU, playing a 1080p video without any frame-drop or tearing. Very good.

I had even better results with MPV player, using almost 0% of CPU, better then hardware acceleration on windows. And the compilation process ocurred without any issue, and without all this trickery that i needed to use with mplayer. But mpv does not have a GUI yet. The only program that uses mpv is cmplayer, but the instalation and compilation of the gui itself failed on mageia 4.

Anyway, do you have an intel GMA X4500HD, right? Did you managed to install the driver with h264 branch? I can't tell if this is the reason of mplayer not having vaapi support after your compilation process, but the driver is necessary anyway. So there is the tip: the freedesktop intel driver provides the h264 branch, and the building process is very easy.
User avatar
rihoem
 
Posts: 12
Joined: Feb 25th, '14, 15:15

Re: mplayer-vaapi

Postby pmithrandir » Feb 27th, '14, 22:36

I have the 4500 HD brqnch driver compiled manually. But performance and quality is very bad. 1080 doesnt work really, 720 works a little, but slowly.

Strange if you have the same if it works better for you.

It's important for me because 1080 doesn't work on my laptop with xv driver, too slow.
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: mplayer-vaapi

Postby rihoem » Feb 27th, '14, 22:54

Did you tried running mplayer using this command: "mplayer -vo vaapi -va vaapi video.mp4" ?
It's important to use both 'va' and 'vo' options, otherwise mplayer will not use vaapi to hardware decode, only to output the image, and the decode will be done via software.

P.S: i have a HD Graphics 3000, but this is irrelevant. I think that your problem is mplayer not actually using hardware acceleration. Can you try play a mpeg2 movie, and check cpu usage? Just to see if the problem is with the 264branch, the driver itself or mplayer? Because mpeg2 decoding is supported by default, maybe the problem ocurred with the driver compilation.

P.S. 2: Have you ever got hardware acceleration (using linux) on this video card, or is it the first time you are trying?
User avatar
rihoem
 
Posts: 12
Joined: Feb 25th, '14, 15:15

Re: mplayer-vaapi

Postby pmithrandir » Feb 28th, '14, 11:02

Hello.

This is the first time I'm trying ;)
Driver are not very up to date.

I will check at my return from vacation with command line, But I think I remember someone telling that this G45 branch was not really good now... they said 720 should be ok, but 1080 was not.

I will see.
Pierre
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: mplayer-vaapi

Postby rihoem » Feb 28th, '14, 22:50

pmithrandir wrote:Hello.

This is the first time I'm trying ;)
Driver are not very up to date.

I will check at my return from vacation with command line, But I think I remember someone telling that this G45 branch was not really good now... they said 720 should be ok, but 1080 was not.

I will see.
Pierre


Well, it seems that you are right. Hardware acceleration on GMA 4500HD is experimental, and nobody is working on it, acording to this entry on Arch Wiki: https://wiki.archlinux.org/index.php/In ... n_GMA_4500

But, you should be able to play at least 720p videos with reasonable performance (and not very poor performance). And, CPU usage should be low, to at least have some power saving :P

Saddly, if you really need hardware acceleration for x264 videos, you need to have windows on dual boot, or convert your videos before playing them (which is not a really bad option).

You could try installing MPV (or cmplayer, to have a GUI) and see if you get a better performance than with mplayer.

P.S: some people reported that VLC has a little bit better performance than mplayer, at least with 720p videos. Idon't think that this is true, because support to vaapi on VLC was always experimental too. But, give it a try.
User avatar
rihoem
 
Posts: 12
Joined: Feb 25th, '14, 15:15


Return to Video

Who is online

Users browsing this forum: No registered users and 0 guests