Kazam only outputing recordings in mono

Bug #1179073 reported by Gavin van Lelyveld
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Kazam Screencaster
Fix Committed
High
David Klasinc

Bug Description

I've tried a few versions of kazam, including the bzr checkout with python3 setup.py install. Whichever codec I use the output audio is always mono.

Hardware-wise I'm running a laptop with it's internal audio, and a USB headset.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: kazam 1.4.3-0ubuntu1 [origin: LP-PPA-kazam-team-stable-series]
Uname: Linux 3.6.3-030603-generic x86_64
ApportVersion: 2.6.1-0ubuntu10
Architecture: amd64
CrashDB: {"impl": "launchpad", "project": "kazam"}
Date: Sat May 11 23:01:03 2013
InstallationDate: Installed on 2012-12-08 (154 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: kazam
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Gavin van Lelyveld (mdcore+launchpad) wrote :
Revision history for this message
Gavin van Lelyveld (mdcore+launchpad) wrote :

I opened kazam with the --debug parameter, selected a window and recorded for a few seconds. This is the output.

description: updated
Revision history for this message
Gavin van Lelyveld (mdcore+launchpad) wrote :

I get the same results even if I remove the USB headset and only choose the internal sound card.

Revision history for this message
Arnau (ninjastyleftw) wrote :

I'm having the same issue, could this problem make bad sound recording? becuase if I record microphone and speakers at the same time I'm getting no speakers recording but duplicated microphone recording :S Or should I open a new bug?

Revision history for this message
Gavin van Lelyveld (mdcore+launchpad) wrote :

@Arnau I think your issue is different. I get both game and microphone audio. My problem is that the resulting rendered file has mono sound. I think you'll need to open a new bug.

Revision history for this message
Romain Bar (romainbeha-r) wrote :

The GStreamer audio source are mono by default (one channel, must set 2).
Updating the two following lines in file 'gstreamer.py' fixes that:

 self.aud_caps = Gst.caps_from_string("audio/x-raw")
 self.aud2_caps = Gst.caps_from_string("audio/x-raw")

to replace with:

 self.aud_caps = Gst.caps_from_string("audio/x-raw,channels=2")
 self.aud2_caps = Gst.caps_from_string("audio/x-raw,channels=2")

Revision history for this message
David Klasinc (bigwhale) wrote :

I'll look into this. It might be true that GStreamer needs channels to be specified. However, this will have to be done with a little more care, because not all sources have two channels. Some more PulseAudio code will be needed to detect number of channels for specified devices.

Thanks for noticing this.

David Klasinc (bigwhale)
Changed in kazam:
status: New → In Progress
milestone: none → 1.5.4
importance: Undecided → High
assignee: nobody → David Klasinc (bigwhale)
David Klasinc (bigwhale)
Changed in kazam:
status: In Progress → Fix Committed
Revision history for this message
Dan Johansen (strit) wrote :

So, when is this fix being released to the masses? It is fairly annoying to only be able to record audio in mono. :P

Revision history for this message
Dan Johansen (strit) wrote :

@Romain Bar
Where is that file located? I've searched everywhere and I can't find it.

Revision history for this message
Dan Johansen (strit) wrote :

Nevermind, I found it in /usr/lib/python3.4/site-packages/kazam/backend/gstreamer.py.
Edited the lines and now it works. :)

Revision history for this message
Srikant Patnaik (u-srikant-patnaik) wrote :

The unstable repository doesn't have the stereo issue fixed.
I had to manually add Romain's fix :)

Revision history for this message
ElTomoLoco (tomaspartl) wrote :

@Romain Bar (romainbeha-r): Thanks for the fix, man!!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.