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

sound quality of video recordings

asked 2014-01-20 16:10:13 +0300

simo gravatar image

updated 2015-07-22 12:44:14 +0300

Sound quality is a lot worse than what I expected. Examples on Youtube:

Copy of comment by @Direc: This is just a guess, but I think that the poor audio quality on recorded video is due to active noise cancellation... At least it sounds to me like it. One could test it by completely blocking the secondary microphone...


I had some time to hunt this down and came up with an early conclusion. The situation has gotten even worse during system updates and currently I can only record 2-5 sec video until the sound quality drops dramatically during the recording. It seems that the issue relates to btrfs file system used on Jolla. It's rather new Linux implementation not used on too many products yet, and it's still under heavy development. Jolla's camera might be affected by the bugs in it, but there are also other possinbilities. My early conclusion of the workflow on Jolla:

  1. Video recording starts. Audio and video raw data is buffered into RAM
  2. Video data is handled by the camera, audio data with pulseaudio. Both are decoded in the CPU
  3. Writing command are sent to an mp4 file. CPU is in full use according to top
  4. While writing into the file, RAM buffer gets full of new data. Btrfs file system stalls for a while due do multiple write commands with too short time period in between
  5. RAM buffer overflows because of delayed writing and parts of the raw audio data are dropped
  6. Move to step 4... After few seconds and several write commands mp4 file is written with dramatically dropped audio quality

Possible causes and their solutions (in my suspected order):

  • Btrfs file system bugs (stalling with too severe write commands)
    • Kernel update needed. Jolla uses 3.4. branch (currently on 3.4.91, latest available 3.4.98)
  • Too slow writing speed of the internal memory
    • Video and audio quality must be downgraded to the level of the hardware performance
  • Underperforming CPU
    • Can the video raw data be decoded in the Adruino graphic chip instead of CPU leaving pulseaudio more resources?
  • Underperforming pulseaudio. Decoding code of pulseaudio (Open Source) is not resource wise.
    • Changing the decoded outcome doesn't help, tweaking the decoding method might.
  • Lack of RAM
    • This is unlikely as if the decoding is working and file writing is fast enough, any amount of free RAM should be enough. I'm just listing this option along as when the RAM buffer gets full, swap file is taken in to use on top of it being much slower in data handling.
edit retag flag offensive close delete



Sound quality is indeed terrible, 1 vote up.

Jörg ( 2014-01-20 16:35:28 +0300 )edit

Does anyone know a terminal command to stop the secondary microphone (I'd like to test the guess commented by @Direc)?

simo ( 2014-01-20 17:45:29 +0300 )edit

Changelog mentioned improvements on this, but I didn't notice any (in just a short test) - could this be hardware related anyway? (I sure hope not). Any other experiences?

simo ( 2014-01-31 21:48:50 +0300 )edit

I could say there is a slight improvement compared to earlier after Naamankajärvi update, but it could be also better too.

TimTTK ( 2014-02-03 16:08:33 +0300 )edit

the quality has to be improved, i agree

sauron ( 2014-02-03 21:27:32 +0300 )edit

1 Answer

Sort by » oldest newest most voted

answered 2015-09-25 14:30:22 +0300

sp3000 gravatar image

updated 2015-09-25 14:47:00 +0300

A (hopefully obsolete, and partial) workaround: get e.g. the basic android camera app and use that for video. Seems to have improved in Eineheminlampi now, the sound still drops to a rather conservative level during the first seconds but at least it doesn't sound like it's compressed through a straw, so on par with recording with another app. Hopefully it can be improved further

edit flag offensive delete publish link more


yaiks, there's finally some improvement on this? Please Jolla let it flow to Sailfish OS side too, I'm not going to accept a workaround (but big thanks for sharing one @sp3000 )

simo ( 2015-09-25 15:34:15 +0300 )edit should have improved the audio encoder. Is it still not on par with android?

MSameer ( 2015-09-25 16:13:16 +0300 )edit

Yep, it sounds similar to android now — coder sounds fine, stream still gets squished too much before that. The ambient noise cancellation theory sounds about right — a sound source directed toward the mouthpiece area gets reproduced at good volume, anything else not so much. Would be nice to turn that feature off while trying to capture ambient sounds ;) (or in a pinch, a makeup gain and compressor hack, but that would still leave the sound a bit quirky)

sp3000 ( 2015-09-25 20:14:41 +0300 )edit

Is there a terminal command to disable the secondary mic for testing?

simo ( 2015-09-27 13:53:34 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2014-01-20 16:10:13 +0300

Seen: 902 times

Last updated: Sep 25 '15