Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[JESSIE] VDPAU high CPU usage

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
martijntje
Posts: 22
Joined: 2014-09-28 13:16

[JESSIE] VDPAU high CPU usage

#1 Post by martijntje »

After installing Testing, setting up the VDPAU driver and extracting the firmware from the driver, I keep having high CPU usage.

vdpauinfo shows the correct decoder capabilities:

Code: Select all

Decoder capabilities:

name               level macbs width height
-------------------------------------------
MPEG1                 0 16384  2048  2048
MPEG2_SIMPLE          3 16384  2048  2048
MPEG2_MAIN            3 16384  2048  2048
H264_BASELINE        41 16384  2048  2048
H264_MAIN            41 16384  2048  2048
H264_HIGH            41 16384  2048  2048
VC1_SIMPLE            1 16384  2048  2048
VC1_MAIN              2 16384  2048  2048
VC1_ADVANCED          4 16384  2048  2048
MPEG4_PART2_SP        3 16384  2048  2048
MPEG4_PART2_ASP       5 16384  2048  2048
I have installed gnome-mplayer and selected the VDPAU video output. Enabling or disabling 'Enable Video Hardware Support' does not make any difference. This worked fine under Wheezy. Does anyone have any idea what could be wrong here?

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: [JESSIE] VDPAU high CPU usage

#2 Post by gradinaruvasile »

Maybe you have some video that cannot be decoded via VDPAU?

To see whats happening, launch mplayer from terminal

Code: Select all

mplayer -vo vdpau -vc ffh264vdpau,ffodivxvdpau,ffvc1vdpau,ffwmv3vdpau,ffmpeg12vdpau moviename
Where moviename is your video's name of course.

What firmwae did you extract? You dont need to extract anything just to install the firmware-linux-nonfree package.

martijntje
Posts: 22
Joined: 2014-09-28 13:16

Re: [JESSIE] VDPAU high CPU usage

#3 Post by martijntje »

gradinaruvasile wrote:Maybe you have some video that cannot be decoded via VDPAU?
I have tried a video that would work fine using Wheezy (with mplayer using around 1-2% CPU)

To see whats happening, launch mplayer from terminal

Code: Select all

mplayer -vo vdpau -vc ffh264vdpau,ffodivxvdpau,ffvc1vdpau,ffwmv3vdpau,ffmpeg12vdpau moviename
Where moviename is your video's name of course.

Code: Select all

[mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
[mkv] Track ID 2: audio (A_AC3), -aid 0, -alang eng
[mkv] Will play video track 1.
Detected file format: Matroska
Load subtitles in .
Forced video codec: ffh264vdpau
Cannot find codec 'h264_vdpau' in libavcodec...
Video decoder init failed for codecs.conf entry "ffh264vdpau".
Forced video codec: ffodivxvdpau
Forced video codec: ffvc1vdpau
Forced video codec: ffwmv3vdpau
Forced video codec: ffmpeg12vdpau
Cannot find codec matching selected -vo and video format 0x31637661.
Selected audio codec: ATSC A/52A (AC-3) [libavcodec]
AUDIO: 48000 Hz, 2 ch, floatle, 384.0 kbit/12.50% (ratio: 48000->384000)
AO: [pulse] 48000Hz 2ch floatle (4 bytes per sample)
Video: no video
Starting playback...
A:   0.6 (00.6) of 2631.1 (43:51.1)  0.5% 

Exiting... (Quit)

What firmware did you extract? You dont need to extract anything just to install the firmware-linux-nonfree package.
I extracted the firmware for vdpau from the closed-source driver and installed them in /lib/firmware/nouveau. If I don't do this (even after installing the package you suggested), I don't get any decoder capabilities.

What I find most interesting from the mplayer output is the following:

Code: Select all

Cannot find codec 'h264_vdpau' in libavcodec...
Video decoder init failed for codecs.conf entry "ffh264vdpau".
Apparantly it's a problem in the more recent versions of libavcodec.

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: [JESSIE] VDPAU high CPU usage

#4 Post by gradinaruvasile »

Umm. You have something there. It does seem something amiss, i just checked with mplayer and it did the same thing as for you.

mpv (from the testing repos) works just fine though. mpv is a fork of mplayer that is actively developed, whereas mplayer seems dead.

I use the following ~/.mpv/config:

Code: Select all

# Write your default config options here!
idx=yes
ao=alsa
stop-screensaver="yes"
heartbeat-cmd="xscreensaver-command -deactivate &"
softvol=yes
softvol-max=600
af=volume=40
volume=30
hwdec=auto
hwdec-codecs=h264,vc1,wmv3,mpeg2video,mpeg4
deinterlace=auto
save-position-on-quit
vf=expand=::::1:16/10:16
This makes it work for pretty much anything, it uses sw decoding if hw isnt available for that format. I just checked with a 1080p 50fps test clip and hw decoding works. ~95% CPU if i disable hw decoding, ~9-11 if i set it to auto. xbmc works too with VDPAU (i compiled it from latest git).

BTW i have an AMD card with the OSS radeon drivers.

martijntje
Posts: 22
Joined: 2014-09-28 13:16

Re: [JESSIE] VDPAU high CPU usage

#5 Post by martijntje »

Wow, if only I'd known about that package! It works well for me too, although it does not recognize all the options from your config file.

It cribs about not recognizing the option idx and the expand option for the vf property should be an integer. Do you have a different version of it?

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: [JESSIE] VDPAU high CPU usage

#6 Post by gradinaruvasile »

martijntje wrote:Wow, if only I'd known about that package! It works well for me too, although it does not recognize all the options from your config file.

It cribs about not recognizing the option idx and the expand option for the vf property should be an integer. Do you have a different version of it?
Umm yes (i mean yes i have the same problem). I get that too sometimes but i just ignore it. I suppose it works only for certain videos. IIRK i put that there because certain videos didnt respect scaling (i have a 1440x900 monitor) or they didnt expand (had black borders left,right, top, bottom). But as i generally use mpv from the gui, it doesnt bugs me.

Post Reply