Well, but wav doesn’t need decoding, it is uncompressed. But of course you can measure the application/framework’s overhead that way.
Here’s a quick comparison on my system, playing an MP3 file:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
26234 wolfi 20 0 1233872 91676 17248 S 11,56 4,462 0:33.51 clementine
27220 wolfi 20 0 1235520 43052 6088 S 10,24 2,096 0:47.66 xine
31110 wolfi 20 0 1961140 63536 39396 S 9,267 3,093 0:04.66 totem
31793 wolfi 20 0 840292 40676 24228 S 8,273 1,980 0:03.35 kaffeine-x+
27959 wolfi 20 0 1954192 39036 6432 S 7,611 1,900 0:34.59 audacious
31715 wolfi 20 0 722620 43088 28864 S 6,617 2,097 0:04.26 dragon
25710 wolfi 20 0 4957952 104232 16888 S 6,604 5,073 0:31.31 amarok
26802 wolfi 20 0 1168292 39684 14412 S 6,288 1,932 0:14.40 vlc
27271 wolfi 20 0 1400636 29412 11696 S 3,313 1,432 0:14.14 gmplayer
This is a single-core AMD Athlon64 3000+ system.
I ran the apps one after the other (not at the same time), and minimized the player windows, to rule out stuff like analyzers and video performance. (Clementine f.e. used even >30% with the window open and the analyzer active)
Amarok is using the VLC backend here.
dragon is included mainly as comparison to Amarok, because it also uses Phonon.
Kaffeine just uses libxine, so you can see there’s definitely a difference according to the frontend you use… Might be in this case because xine-ui shows an analyzer for audio files whereas Kaffeine doesn’t.
And now Amarok/dragon with the gstreamer-0_10 backend:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31330 wolfi 20 0 4902568 159468 61940 S 12,90 7,762 0:13.92 amarok
31692 wolfi 20 0 979156 46620 27716 S 11,91 2,269 0:04.58 dragon
So there is quite a difference, even in RAM usage. That’s why I will keep using phonon-backend-vlc…
Here’s Amarok and totem with the fluendo-mp3 codec removed: (that’s actually the part that interested me most now)
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31452 wolfi 20 0 4894476 153764 62216 S 13,56 7,484 0:11.61 amarok
31528 wolfi 20 0 1969048 64628 39232 S 9,600 3,146 0:05.29 totem
Not much differently, but the fluendo codec seems to be marginally better regarding CPU usage.
BTW, do you know anything about differences between Gstreamer 0.10 and 1.x performance wise?
Not really, but as you can see, totem (gstreamer 1.x) behaved better here than clementine/Amarok (with gstreamer 0.10), and even xine.
That’s not necessarily only because of gstreamer 1.x vs. gstreamer 0.10, but it seems to indicate that 1.x has better performance.
I can confirm your observation though, that MPlayer uses the least CPU…