LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 06-05-2014, 07:45 PM   #1
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
High MPlayer CPU usage on Raspi Pi


I'm finding mplayer using 20-40 % CPU when playing back most audio formats, streaming or local files, on my Rasp Pi.

ffplay is even worse (only tested local files).

The situation is the same when setting output device to 'null' so it doesn't seem to be hardware/soundcard related.

Any ideas?

Last edited by dive; 06-05-2014 at 07:46 PM.
 
Old 06-05-2014, 08:23 PM   #2
frushiyama
Member
 
Registered: Oct 2010
Location: Brazil, SP - Cosmópolis
Distribution: Slackware
Posts: 171

Rep: Reputation: 40
If you use another player can be an answer to take into consideration, try using a lighter as mocp.
 
Old 06-05-2014, 08:32 PM   #3
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Original Poster
Rep: Reputation: Disabled
That works for local files, but not for streams.
 
Old 06-05-2014, 10:05 PM   #4
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,279
Blog Entries: 21

Rep: Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503
Quote:
Originally Posted by dive View Post
That works for local files, but not for streams.
http://s17.postimg.org/ibe7sgmjz/screenshot1.jpg

works for me on .pls streaming radio.

My installed files if that helps.

Code:
/usr/bin/mocp
/usr/lib
/usr/lib/moc
/usr/lib/moc/decoder_plugins
/usr/lib/moc/decoder_plugins/libaac_decoder.so
/usr/lib/moc/decoder_plugins/libflac_decoder.so
/usr/lib/moc/decoder_plugins/libmodplug_decoder.so
/usr/lib/moc/decoder_plugins/libmp3_decoder.so
/usr/lib/moc/decoder_plugins/libmusepack_decoder.so
/usr/lib/moc/decoder_plugins/libsidplay2_decoder.so
/usr/lib/moc/decoder_plugins/libsndfile_decoder.so
/usr/lib/moc/decoder_plugins/libspeex_decoder.so
/usr/lib/moc/decoder_plugins/libvorbis_decoder.so
/usr/lib/moc/decoder_plugins/libwavpack_decoder.so
/usr/share
/usr/share/doc
/usr/share/doc/moc
/usr/share/doc/moc/AUTHORS
/usr/share/doc/moc/README.Debian
/usr/share/doc/moc/README.gz
/usr/share/doc/moc/README_equalizer.gz
/usr/share/doc/moc/THANKS
/usr/share/doc/moc/TODO.gz
/usr/share/doc/moc/changelog.Debian.gz
/usr/share/doc/moc/changelog.gz
/usr/share/doc/moc/copyright
/usr/share/doc/moc/examples
/usr/share/doc/moc/examples/config.example.gz
/usr/share/doc/moc/examples/keymap.example
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/mocp.1.gz
/usr/share/menu
/usr/share/menu/moc
/usr/share/moc
/usr/share/moc/themes
/usr/share/moc/themes/black_theme
/usr/share/moc/themes/darkdot_theme
/usr/share/moc/themes/example_theme
/usr/share/moc/themes/green_theme
/usr/share/moc/themes/moca_theme
/usr/share/moc/themes/nightly_theme
/usr/share/moc/themes/red_theme
/usr/share/moc/themes/transparent-background
/usr/share/moc/themes/yellow_red_theme

Last edited by rokytnji; 06-05-2014 at 10:10 PM.
 
Old 06-05-2014, 10:10 PM   #5
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Original Poster
Rep: Reputation: Disabled
That image is very small. I tried it on a .asx and it didn't show the file in the browser.
 
Old 06-05-2014, 10:26 PM   #6
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,279
Blog Entries: 21

Rep: Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503
Quote:
Originally Posted by dive View Post
That image is very small. I tried it on a .asx and it didn't show the file in the browser.
Not small on my Iceweasel browser screen at all.

Everything I stream in mocp is .pls, not .asx.

Last edited by rokytnji; 06-05-2014 at 10:28 PM.
 
Old 06-05-2014, 10:29 PM   #7
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Original Poster
Rep: Reputation: Disabled
When I opened it again it's normal size. strange.

Currently compiling omxplayer to see if that's an improvement.

mocp wouldn#t really be useful for me as I'm looking for a better Pi alternative to mplayer for use with soma.
 
Old 06-06-2014, 02:18 AM   #8
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Original Poster
Rep: Reputation: Disabled
Well, omxplayer doesn't even support alsa so that's out.

I've noticed that for local files the cpu usage is ~= 10% which is better, but streaming goes way up.
 
Old 06-06-2014, 05:31 AM   #9
franzen
Member
 
Registered: Nov 2012
Distribution: slackware
Posts: 544

Rep: Reputation: 386Reputation: 386Reputation: 386Reputation: 386
Quote:
Originally Posted by dive View Post
Well, omxplayer doesn't even support alsa so that's out.
Sound is coming out somehow:
http://mike632t.wordpress.com/2013/0...-raspberry-pi/
 
Old 06-06-2014, 07:19 AM   #10
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Original Poster
Rep: Reputation: Disabled
Yeah that's fine, but my Wolfson Audio Card SPDIF is alsa...

---------- Post added 06-06-14 at 12:20 PM ----------

Here's the first reply I had from mplayer mailing list:

Quote:
Did you try capturing with -dumpstream and then playing that file?
I doubt your local files are in WMA format, in which case the comparison
doesn't make sense.
Also cpu frequency scaling unless you have disabled it will result in
CPU usage numbers being completely misleading.
The commands "perf record mplayer ..." and then after it is finished
"perf report" will tell where all the CPU time is used.
Also, which MPlayer version you are using would be helpful information.
However with the ridiculously outdated CPU of the Pi that kind of CPU
usage is most likely as expected, as it doesn't even include NEON,
which causes issues for the data conversions required.
In addition if whatever distribution you uses uses "softfloat" instead
of "hardfloat" that is likely to cost you a significant amount of
performance, as well as if your MPlayer isn't compiled specifically
for it (runtime CPU detection is a mess and basically does not work
on ARM, as a result generic distribution binaries a generally useless
performance-wise).
 
Old 06-06-2014, 10:30 AM   #11
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,279
Blog Entries: 21

Rep: Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503Reputation: 3503
Quote:
mocp wouldn#t really be useful for me as I'm looking for a better Pi alternative to mplayer for use with soma.
OK. As I listen to the live stream today using the

Quote:
MP3: 128k
saved as SBSW.pls

in mocp
 
Old 06-06-2014, 10:32 AM   #12
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Original Poster
Rep: Reputation: Disabled
Yes but mocp has a gui. I need a simple player with no gui. By soma I mean the soma player that comes with slackware, not the radio station.
 
Old 06-06-2014, 01:45 PM   #13
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,624

Rep: Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346Reputation: 1346
Quote:
Originally Posted by dive View Post
I'm finding mplayer using 20-40 % CPU when playing back most audio formats, streaming or local files, on my Rasp Pi.

ffplay is even worse (only tested local files).

The situation is the same when setting output device to 'null' so it doesn't seem to be hardware/soundcard related.

Any ideas?
I think this is to be expected since all of the maths is done in software rather than being offloaded to a FPU.
 
Old 06-06-2014, 02:03 PM   #14
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by drmozes View Post
I think this is to be expected since all of the maths is done in software rather than being offloaded to a FPU.
Stuart, I guess that that is what was meant by the hard float/soft float issue that was mentioned in the reply from the mplayer mailing list?

I'm guessing that it is using soft, since when I tried compiling omxplayer I had to specifically set it to 'soft'. Is it something that is set in gcc and all compiled apps have to follow that, or can some apps be made to use a hard float? Does a Pi even have a math co-processor?

*Edit: well it seems that the Pi does have an FPU, question is how to use it: http://stackoverflow.com/questions/1...-compatibility

*Edit 2: I came across this on the forum: http://mindplusplus.wordpress.com/20...-raspberry-pi/

I may give that a shot or just put up with soft float...

Last edited by dive; 06-06-2014 at 05:07 PM.
 
Old 06-23-2014, 06:06 PM   #15
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 504

Rep: Reputation: Disabled
Two questions, dive:

1. Did you get a VFP-enabled glibc/libm?

2. If so, did it help?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid 3 near 100% cpu usage and high RAM usage piman Linux - Software 1 11-16-2013 03:20 AM
mysql server not responding with high cpu usage and high load avgs landysaccount Linux - Server 2 09-15-2013 04:46 AM
[SOLVED] High CPU load, but low CPU usage (high idle CPU) baffy Linux - Newbie 5 03-13-2013 10:24 AM
High load and high cpu kernel usage enid Linux - Server 8 09-30-2010 04:33 AM
High CPU usage ?! Why? skate Linux - Software 1 04-11-2007 06:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 06:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration