Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 02-14-11, 04:01 PM   #1
yxing
Registered User
 
Join Date: Feb 2011
Posts: 3
Default mplayer OSD rendering using 100% CPU with VDPAU

I'm using the SVN version of mplayer (4.4.3) to play an H.264 TS file with VDPAU acceleration. The playback is flawless, but whenever mplayer renders the OSD, my CPU usage goes up to 100%.

I noticed it was the
Code:
VdpOutputSurfacePutBitsIndexed
call that causes the spike in CPU usage. It seems that mplayer uses that function to draw the OSD each frame, but also calls
Code:
VdpOutputSurfacePutBitsNative
each frame to draw the actual video image without causing any spikes in CPU usage.

The output log of mplayer and nvidia-bug-report.sh are attached. I will upload the TS when I figure out how to get on your FTP site, but I'm not sure it's critical because it's the OSD drawing that seems to be the problem.
Attached Files
File Type: bz2 yxing_mplayer.log.bz2 (7.0 KB, 64 views)
File Type: gz yxing_nvidia-bug-report.log.gz (75.0 KB, 70 views)
yxing is offline   Reply With Quote
Old 02-15-11, 07:49 AM   #2
Licaon
Registered User
 
Licaon's Avatar
 
Join Date: Nov 2004
Location: Between the keyboard and the chair.
Posts: 490
Default Re: mplayer OSD rendering using 100% CPU with VDPAU

see this too: http://www.nvnews.net/vbulletin/showthread.php?t=157915

also, does this happen only after you suspend/wake ?
Licaon is offline   Reply With Quote
Old 02-15-11, 12:08 PM   #3
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: mplayer OSD rendering using 100% CPU with VDPAU

Licaon, I'm not sure how that other thread is related to this one.

yxing, How did you isolate which call causes the CPU usage. For how long does the CPU usage last; there is some tiny amount of polling in that function, but it shouldn't be noticeable unless the GPU is slow, or the uploaded data is huge.

Yes, to investigate this, we will need the exact clip you're using (please post the filename here after upload). Also, can you supply the complete MPlayer command-line you're using, and any MPlayer configuration files if you use any, if that's not all in yxing_mplayer.log.bz2 already.

Thanks.
Stephen Warren is offline   Reply With Quote
Old 02-15-11, 12:39 PM   #4
yxing
Registered User
 
Join Date: Feb 2011
Posts: 3
Default Re: mplayer OSD rendering using 100% CPU with VDPAU

Quote:
Originally Posted by Stephen Warren View Post
How did you isolate which call causes the CPU usage.
I both commented out the function call and I called it once every 10 frames instead of every frame. In the former case, CPU usage was close to 0 but the OSD failed to draw correctly. In the latter case, CPU usage was 20-30% with the OSD running, updated with a slight delay, and occasionally produced artifacts.

Quote:
Originally Posted by Stephen Warren View Post
For how long does the CPU usage last
The CPU usage is 100% as long as the OSD is updating.

Quote:
Originally Posted by Stephen Warren View Post
Yes, to investigate this, we will need the exact clip you're using (please post the filename here after upload). Also, can you supply the complete MPlayer command-line you're using, and any MPlayer configuration files if you use any, if that's not all in yxing_mplayer.log.bz2 already.
I am trying to upload the video using sftp. The command I am using is
Code:
sftp vdpau@partners.ftp.nvidia.com
but it's complaining that the blank password I am entering is incorrect.

I am not running mplayer with any custom configuration files, but the command-line argument I am using is:
Code:
mplayer /home/oberon/yxing.ts -vo vdpau -demuxer +mpegts -vc +ffh264vdpau -nosound -osdlevel 3
yxing is offline   Reply With Quote
Old 02-15-11, 12:49 PM   #5
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: mplayer OSD rendering using 100% CPU with VDPAU

Sigh, the sftp site is having some issues. I thought they'd very recently been fixed, but it appears it's broken again. I'll try to find out why.
Stephen Warren is offline   Reply With Quote
Old 02-16-11, 04:42 AM   #6
Licaon
Registered User
 
Licaon's Avatar
 
Join Date: Nov 2004
Location: Between the keyboard and the chair.
Posts: 490
Default Re: mplayer OSD rendering using 100% CPU with VDPAU

Quote:
Originally Posted by Stephen Warren View Post
Licaon, I'm not sure how that other thread is related to this one.
mplayer.log: VDPAU nvidia: Error detected 1 426
Licaon is offline   Reply With Quote
Old 02-16-11, 11:51 AM   #7
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: mplayer OSD rendering using 100% CPU with VDPAU

Licaon, that error message indicates the overlay presentation queue couldn't be created, which is unrelated to the CPU usage issue that is the subject of this thread.
Stephen Warren is offline   Reply With Quote
Old 02-16-11, 12:08 PM   #8
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: mplayer OSD rendering using 100% CPU with VDPAU

FYI, I've filed internal problem report #793119 for this.

Can you please provide the exact MPlayer command-line you're using.

Just to be clear, when you say OSD you aren't referring to subtitle data within the media file, but OSD such as what MPlayer shows when volume/brightness/... is adjusted. If so, can you also state exactly how you're triggering that.

Did you build MPlayer yourself? If not, which package did you install? If so, can you state the exact SVN revision you built, and the configure command-line you used.

Thanks.
Stephen Warren is offline   Reply With Quote

Old 02-16-11, 06:35 PM   #9
yxing
Registered User
 
Join Date: Feb 2011
Posts: 3
Default Re: mplayer OSD rendering using 100% CPU with VDPAU

The exact command line I am using is:
Code:
mplayer /home/oberon/yxing.ts -vo vdpau -demuxer +mpegts -vc +ffh264vdpau -nosound -osdlevel 3 -quiet
No, I am not referring to the subtitles. The "-osdlevel 3" switch makes the MPlayer OSD display the play time and a "playing" icon.

Yes, I built MPlayer SVN revision 32882 and configured it with
Code:
./configure --enable-gui
I've attached the output of that command.
Attached Files
File Type: gz configure.log.gz (3.5 KB, 65 views)
yxing is offline   Reply With Quote
Old 04-08-11, 03:36 PM   #10
danix
NVIDIA Corporation
 
danix's Avatar
 
Join Date: Feb 2010
Location: Santa Clara, CA
Posts: 237
Default Re: mplayer OSD rendering using 100% CPU with VDPAU

Hi yxing, the SFTP site issue is (partially) resolved now. Can you please upload an affected video clip? (You may need to use sftp interactively.)
danix is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:39 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.