Discussion:
[MPlayer-users] VDPAU missing out on AMD
Mikus Grinbergs
2015-12-07 06:39:53 UTC
Permalink
I wanted to use hardware acceleration (playback) with an AMD video card,
but I'm stymied. My system runs 32-bit Fedora 23 with a Radeon HD 7770.
The DRI2 driver is 'radeonsi'.

It's difficult to assemble information abut AMD video acceleration.
I've installed all the packages I've seen mentioned in conjunction with
AMD acceleration, such as 'mesa-vdpau'.

Information on "What is needed to have MPlayer use video acceleration"
isn't in one easy-to-understand place. The main thing seems to be '-vo
vdpau' to specify the "what" and '-vc ff...vdpau' to specify the "how".

----

With '-vo vdpau' in MPayer 1.2-5.1.1 (from Fedora), if I put in any '-vc
ff...vdpau' (appropriate to the video file I was trying to play - I
tried h264 and hevc and vc1 videos), MPlayer told me "The selected
video_out device is incompatible with this codec", as well as a bunch of
"Unexpected decoder output format Planar YV12" lines, then exited.

With '-vo vdpau' in MPlayer SVN-r37561-5.1.1 (I built), putting in any
appropriate '-vc ff...vdpau' still had the same result, but with the
hevc video the "Unexpected" lines kept coming until I stopped MPlayer.


I am NOT asking for a fix -- I'm just sharing what I saw. I can
continue video-watching even if hardware acceleration doesn't work.

----

What does surprise me is MPlayer telling me (on demanding videos): "Your
system is too SLOW to play this!" With my multi-core CPU at 3+GHz, and
putting in 'threads=6', I would have thought I wasn't slow.

mikus
Andy Furniss
2015-12-07 10:41:40 UTC
Permalink
Post by Mikus Grinbergs
I wanted to use hardware acceleration (playback) with an AMD video
card, but I'm stymied. My system runs 32-bit Fedora 23 with a Radeon
HD 7770. The DRI2 driver is 'radeonsi'.
It's difficult to assemble information abut AMD video acceleration.
I've installed all the packages I've seen mentioned in conjunction
with AMD acceleration, such as 'mesa-vdpau'.
Information on "What is needed to have MPlayer use video
acceleration" isn't in one easy-to-understand place. The main thing
seems to be '-vo vdpau' to specify the "what" and '-vc ff...vdpau' to
specify the "how".
vdpauinfo

should show you if your setup is OK, your card won't do hevc.
Post by Mikus Grinbergs
"Your system is too SLOW to play this!" With my multi-core CPU at
3+GHz, and putting in 'threads=6', I would have thought I wasn't
slow.
-lavdopts threads=6

On some cpus cpufreq ondemand can cause the "too slow". I don't use
distros, maybe there is some gui way to set perf if not assuming you are
using cpufreq of course you can for all cpus you have do -

echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

repeat with cpu1 etc

to turn back down

echo ondemand > ...
Dominik 'Rathann' Mierzejewski
2015-12-07 18:47:19 UTC
Permalink
Hi,
I wanted to use hardware acceleration (playback) with an AMD video card, but
I'm stymied. My system runs 32-bit Fedora 23 with a Radeon HD 7770. The
DRI2 driver is 'radeonsi'.
It's difficult to assemble information abut AMD video acceleration. I've
installed all the packages I've seen mentioned in conjunction with AMD
acceleration, such as 'mesa-vdpau'.
Information on "What is needed to have MPlayer use video acceleration" isn't
in one easy-to-understand place. The main thing seems to be '-vo vdpau' to
specify the "what" and '-vc ff...vdpau' to specify the "how".
It works for me rather well on a 64-bit Fedora 23 with Radeon HD 7950 (or
something like that). Please show the output of
rpm -qa '*vdpau*' 'mesa*' |sort

Also, /var/log/Xorg.0.log would be helpful (or are you running
Wayland?).
----
With '-vo vdpau' in MPayer 1.2-5.1.1 (from Fedora), if I put in any '-vc
ff...vdpau' (appropriate to the video file I was trying to play - I tried
h264 and hevc and vc1 videos), MPlayer told me "The selected video_out
device is incompatible with this codec", as well as a bunch of "Unexpected
decoder output format Planar YV12" lines, then exited.
With '-vo vdpau' in MPlayer SVN-r37561-5.1.1 (I built), putting in any
appropriate '-vc ff...vdpau' still had the same result, but with the hevc
video the "Unexpected" lines kept coming until I stopped MPlayer.
What's in your ~/.mplayer/config file?

Regards,
Dominik
--
MPlayer http://mplayerhq.hu | RPM Fusion http://rpmfusion.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
Mikus Grinbergs
2015-12-08 13:53:53 UTC
Permalink
Please show the output of rpm -qa '*vdpau*' 'mesa*' |sort
| libva-vdpau-driver-0.7.4-12.fc23.i686
| libvdpau-1.1.1-2.fc23.i686
| libvdpau-devel-1.1.1-2.fc23.i686
| libvdpau-va-gl-0.3.4-6.fc23.i686
| mesa-dri-drivers-11.0.6-1.20151122.fc23.i686
| mesa-filesystem-11.0.6-1.20151122.fc23.i686
| mesa-libEGL-11.0.6-1.20151122.fc23.i686
| mesa-libEGL-devel-11.0.6-1.20151122.fc23.i686
| mesa-libgbm-11.0.6-1.20151122.fc23.i686
| mesa-libgbm-devel-11.0.6-1.20151122.fc23.i686
| mesa-libGL-11.0.6-1.20151122.fc23.i686
| mesa-libglapi-11.0.6-1.20151122.fc23.i686
| mesa-libGL-devel-11.0.6-1.20151122.fc23.i686
| mesa-libGLES-11.0.6-1.20151122.fc23.i686
| mesa-libGLU-9.0.0-9.fc23.i686
| mesa-libGLU-devel-9.0.0-9.fc23.i686
| mesa-libwayland-egl-11.0.6-1.20151122.fc23.i686
| mesa-libwayland-egl-devel-11.0.6-1.20151122.fc23.i686
| mesa-libxatracker-11.0.6-1.20151122.fc23.i686
| mesa-vdpau-drivers-11.0.6-1.20151122.fc23.i686
| vdpauinfo-1.0-4.fc23.i686
Also, /var/log/Xorg.0.log would be helpful
As far as I know, I'm not running wayland (except that it's used for the
initial log-in screen).

/var/log/Xorg.0.log is multiple days old. Instead, I copied the content
of .local/share/xorg/Xorg.0.log to http://pastebin.com/CygGhZuv
What's in your ~/.mplayer/config file?
The "example" file provided by building MPlayer. Every line there is
either blank or commented out (except this one: " [protocol.dvdnav] ").

The various parameters that I am putting in -- I'm specifying them on
the command line with which I invoke MPlayer.



[ By the way, when I said I had put in 'threads=6', what I meant was
that it was actually '-lavdopts threads=6' that I put in. And the
kernel on my Fedora 23 system is 4.2.6-301.fc23.i686+PAE ]

mikus


----


I just started using MPlayer on a second system (different software OS:
64-bit Ubuntu 15.10 with 4.2.0-19 lowlatency kernel; different video
card: nvidia GFX 950). Guess what -- I'm seeing the same situation as
on the first system (whenever I use '-vc' to specify the __vdpau codec
that matches the video, MPlayer gives me the "device is incompatible
with this codec" error).

I cannot think of anything which is common to my two systems, but is
different from the systems of those users who have vdpau acceleration
working for MPlayer (me having /usr on a separate partition, perhaps?).
Dominik 'Rathann' Mierzejewski
2015-12-11 20:07:16 UTC
Permalink
Hi, Mikus.
Post by Mikus Grinbergs
Please show the output of rpm -qa '*vdpau*' 'mesa*' |sort
| libva-vdpau-driver-0.7.4-12.fc23.i686
| libvdpau-1.1.1-2.fc23.i686
| libvdpau-devel-1.1.1-2.fc23.i686
| libvdpau-va-gl-0.3.4-6.fc23.i686
| mesa-dri-drivers-11.0.6-1.20151122.fc23.i686
| mesa-filesystem-11.0.6-1.20151122.fc23.i686
| mesa-libEGL-11.0.6-1.20151122.fc23.i686
| mesa-libEGL-devel-11.0.6-1.20151122.fc23.i686
| mesa-libgbm-11.0.6-1.20151122.fc23.i686
| mesa-libgbm-devel-11.0.6-1.20151122.fc23.i686
| mesa-libGL-11.0.6-1.20151122.fc23.i686
| mesa-libglapi-11.0.6-1.20151122.fc23.i686
| mesa-libGL-devel-11.0.6-1.20151122.fc23.i686
| mesa-libGLES-11.0.6-1.20151122.fc23.i686
| mesa-libGLU-9.0.0-9.fc23.i686
| mesa-libGLU-devel-9.0.0-9.fc23.i686
| mesa-libwayland-egl-11.0.6-1.20151122.fc23.i686
| mesa-libwayland-egl-devel-11.0.6-1.20151122.fc23.i686
| mesa-libxatracker-11.0.6-1.20151122.fc23.i686
| mesa-vdpau-drivers-11.0.6-1.20151122.fc23.i686
| vdpauinfo-1.0-4.fc23.i686
I have the same versions, but I don't use the built-in Intel gfx
so I uninstalled everything related to libva, so I don't have
libva-vdpau-driver or libvdpau-va-gl. I'm not sure if it matters
though.
Post by Mikus Grinbergs
Also, /var/log/Xorg.0.log would be helpful
As far as I know, I'm not running wayland (except that it's used for the
initial log-in screen).
/var/log/Xorg.0.log is multiple days old. Instead, I copied the content of
.local/share/xorg/Xorg.0.log to http://pastebin.com/CygGhZuv
Looks ok.
Post by Mikus Grinbergs
What's in your ~/.mplayer/config file?
The "example" file provided by building MPlayer. Every line there is either
blank or commented out (except this one: " [protocol.dvdnav] ").
The various parameters that I am putting in -- I'm specifying them on the
command line with which I invoke MPlayer.
[ By the way, when I said I had put in 'threads=6', what I meant was that it
was actually '-lavdopts threads=6' that I put in. And the kernel on my
Fedora 23 system is 4.2.6-301.fc23.i686+PAE ]
Ok. Please provide vdpauinfo and mplayer -v your-options example-video
output.

It all works fine for me on similar hardware (x86_64 with Radeon HD 7970).

Regards,
Dominik
--
MPlayer http://mplayerhq.hu | RPM Fusion http://rpmfusion.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
Mikus Grinbergs
2015-12-12 07:04:47 UTC
Permalink
Please provide vdpauinfo and mplayer -v your-options example-video output.
See http://pastebin.com/w1scqC2P

The command line which gets an error is
export LIBVA_DRIVER_NAME=vdpau
export VDPAU_DRIVER=radeonsi
$vpgm -vf scale,lavc -vc ffh264vdpau,ffhevcvdpau,ffvc1vdpau, -ao alsa -lavdopts threads=6 -framedrop $1 $2 $3 $4 $5
The command line does not get an error with '-vc ffwmv3vdpau,' instead.

mikus


Are you on a kernel 3.xx ?
I tried my command line on a friend's system (with nvidia graphics, and
I think Ubuntu). His system also gave the "incompatible codec" error.
Andy Furniss
2015-12-12 11:05:02 UTC
Permalink
Post by Mikus Grinbergs
Please provide vdpauinfo and mplayer -v your-options example-video output.
See http://pastebin.com/w1scqC2P
The command line which gets an error is
export LIBVA_DRIVER_NAME=vdpau
export VDPAU_DRIVER=radeonsi
$vpgm -vf scale,lavc -vc ffh264vdpau,ffhevcvdpau,ffvc1vdpau, -ao
alsa -lavdopts threads=6 -framedrop $1 $2 $3 $4 $5
Looks like it would work with a simple line like

mplayer -vc ffh264vdpau infile

Recent ffmpeg has disables multithreaded decoding with vdpau.
Though it doesn't seem to affect anything in this case.

With x264 you shouldn't need fancy post processing as it's built in.

It seems the mysterious $1 ... options mess things up, though you have
-vf scale you probably need to put it somewhere else!
Post by Mikus Grinbergs
The command line does not get an error with '-vc ffwmv3vdpau,' instead.
It falls back to software dec.
Peter White
2015-12-12 12:44:52 UTC
Permalink
This post might be inappropriate. Click to display it.
Mikus Grinbergs
2015-12-12 17:57:34 UTC
Permalink
Please provide vdpauinfo and mplayer -v your-options example-video output.
For Dominik: http://pastebin.com/qbfg0ZU8

I note that the additional output from '-v' mainly describes how the
__particular__ video file was processed. I have many video files --
what you see here is the output from an arbitrarily chosen one.

mikus



p.s. My reason for using 'kino' is to save human effort in typing.
Rather than each time typing one long command line, I preserve the
required command syntax within a "batch file" named 'kino'. Then I can
use 'kino' to invoke MPlayer - and avoid potential typing fingerchecks.

pps. Peter - I am posting to describe what I saw (and NOT to ask: "How
do I play such-and-such file?"). Even though I do not have HEVC
hardware, if I put in '-vo vdpau' and '-vc ffhevcvdpau,' and specify an
hevc video -- MPlayer gives me an error message I did not expect. It is
this behavior by MPlayer (and NOT whether putting in 'ffhevcvdpau' is in
my case useless) that is the subject of this thread.
Peter White
2015-12-12 21:10:08 UTC
Permalink
This post might be inappropriate. Click to display it.
Mikus Grinbergs
2015-12-13 02:32:02 UTC
Permalink
your problem seems to be -vf scale,lavc. Have you tried without it?
Peter, thank you for explaining that putting in '-vf' is incompatible
with vdpau. Is that documented anywhere ?


I took the '-vf' out, and (after taking out the "threads=6") got to play
my very first accelerated video: http://pastebin.com/8ugyQaXK



The reason I had '-vf' in the examples I showed was because every time
that MPlayer gave me the "incompatible" error message, it also told me:

| Try appending the scale filter to your filter list,
| e.g. -vf spp,scale instead of -vf spp.

What was I supposed to do?



It is hard for me to remember what parameters I specified when I
originally started my quest for MPlayer video acceleration. What I do
remember is that no matter what I tried, the output always became
"Planar YV12". I guess that by the time I was frustrated enough to post
to mplayer-users, I had settled on including the '-vf' in one form or
another. But I'm certain that I had experienced equal non-success
before ever putting it there - so I saw no harm in leaving it in.
Which error message did you not expect? An error or a warning is
what I would expect, if I were trying to use an unsupported codec.
I did not expect the message: "The selected video out device is
incompatible with this codec."

As I said in my initial post, documentation regarding how to activate
hardware video acceleration with MPlayer is hard to find. I did not try
the various command line parameters one by one. What I did see was that
whenever with '-vo vdpau' my action was to put in '-vc ff*vdpau' (for
every type of file I tried, including for those types which my video
card hardware does support), MPlayer told me "incompatible". I did not
understand that it was the '-vf' that was incompatible.


Please note that in all the output I've shown, the video file I gave to
MPlayer had H264 content, not hardware-unsupported content.


mikus
Peter White
2015-12-13 03:40:06 UTC
Permalink
Post by Mikus Grinbergs
your problem seems to be -vf scale,lavc. Have you tried without it?
Peter, thank you for explaining that putting in '-vf' is incompatible
with vdpau. Is that documented anywhere ?
You're welcome. I don't think it is documented but I am not up to date.
Post by Mikus Grinbergs
I took the '-vf' out, and (after taking out the "threads=6") got to play
my very first accelerated video: http://pastebin.com/8ugyQaXK
Great, but having to disable multithreading is odd. That was
unnecessary for me, at least with my SVN r37422 build. Now that you
mentioned it I did compile the latest r37563 and multithreading results
in a lot of errors for me as well:

Too many buffered pts
Unexpected decoder output format Planar YV12

I'd say there is a bug to be found somewhere between those two
revisions.
Post by Mikus Grinbergs
The reason I had '-vf' in the examples I showed was because every time
| Try appending the scale filter to your filter list,
| e.g. -vf spp,scale instead of -vf spp.
What was I supposed to do?
Fair point.


Peter

Loading...