We have moved to a new Sailfish OS Forum. Please start new discussions there.
12

Heavy CPU usage listening to MP3 stream using built-in browser [answered]

asked 2014-07-10 11:54:24 +0300

Direc gravatar image

updated 2016-10-29 15:55:49 +0300

Steps to reproduce:

  1. Live in Finland - I'm not sure if the stream works abroad. Should apply to others, too...
  2. Open Jolla browser and head over to http://www.radiorock.fi
  3. Wait until the page loads
  4. Click the play/pause symbol on top of the page to start streaming
  5. Enjoy the show, and notice device rather quickly warming up

Everything worked as expected, but after some 20 minutes of playing the stream, I took the device off the charger, and noticed it was way too hot! I checked CPU usage using terminal and utility 'top' noticing the browser process using about 45-65% of CPU, pulseaudio was using about 5%, and bluetooth using 1-2%, as I was connected to Logitech bluetooth receiver. I also later checked if not using bluetooth had any difference, but sailfish-browse still used the same amount of CPU power.

This CPU usage seems very high to me. If I stop the stream, CPU usage goes down to idle. I suspect it's in the internal handling of the stream or perhaps missing hardware decoding. The actual stream - this took some digging - is http://83.102.39.40/Radiorock.mp3 and now having created .PLS to play it using the built-in browser, CPU usage is roughly 12-17% for pulseaudio and 3-6% for jolla-mediaplay, the percentages apply to also playing regular MP3 file.

This can be circumvented by digging the actual stream, wrapping it in .PLS and playing that insted, but it's out of usual users' reach - not out of usual Jolla users' reach, though! Does the streaming really hog up that much juice, or could that be optimized somehow?

Oh yeah, I use software version 1.0.7.18 (.16) now, but there doesn't seem to be anything connection-related on this.

EDIT 29.10.2016: Running 2.0.4 now, with updated browser and stuff, the situation is still the same. I have been using Nettiradio for a long time, works like a charm! Doesn't really fix the problem, though.

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by Direc
close date 2017-06-23 14:19:49.934541

Comments

I have the same behaviour while using YTPlayer from Jolla store, even if I only playback downloaded tracks CPU Usage is around 30-50% at all...

drummer12 ( 2015-09-12 16:56:41 +0300 )edit

I tested it with youtube in the browser: https://dl.dropboxusercontent.com/u/51032565/20150912193001.jpg

slehtonen85 ( 2015-09-12 21:42:38 +0300 )edit

Noticed the same while watching some videos on ted.com. Phone heats up and consumes a lot of battery. Haven't tested it yet on Eineheminlampi.

Wizah ( 2015-09-12 22:52:13 +0300 )edit

Video streaming is something quite different, also a LOT more demanding - I'd expect to see high CPU usage then, but not with just simple MP3 stream.

Direc ( 2015-09-12 22:54:49 +0300 )edit

1 Answer

Sort by » oldest newest most voted
7

answered 2015-09-12 18:27:04 +0300

updated 2015-09-12 20:37:32 +0300

Well, you could try using my app Nettiradio (available at the store) for listening to Finnish net radios. It has a build-in list of Finnish net radios including Radio Rock. The app is very lightweight and uses Qml Audio -element for playback.

Edit: According to Lighthouse, while Nettiradio is playing a stream the CPU usage is about 10%, which is, surprisingly enough, the same amount as when Jolla's Media app is playing a song stored on my SD card.

edit flag offensive delete publish link more

Comments

Here, have my upvote for making Nettiradio in the first place! It really kicks the llama's a*!

Your application *does
workaround my specific use case, but it doesn't solve the issue about high CPU usage using the browser for streaming - and not all streams are included in your application. I re-tested browser streaming again just now with SysMon, and CPU usage was solid 50% the whole time - still an issue...

Direc ( 2015-09-12 20:53:31 +0300 )edit

@Direc Thanks :) Well, one could use Sailwave or another similar app to listen to any stream more efficiently. I am also going to implement something that allows the user to add streams but I am really busy with my studies atm ;(

jollailija ( 2015-09-12 21:22:08 +0300 )edit

Question tools

Follow
1 follower

Stats

Asked: 2014-07-10 11:54:24 +0300

Seen: 762 times

Last updated: Oct 29 '16