![]() |
recording phone sound from bash
I am trying to make a python script work and record phone sound to aac file. this is the script:
----------------------- import gst import time import os bin = gst.element_factory_make("camerabin") bin.set_property("audioenc", gst.element_factory_make("nokiaaacenc")) bin.set_state(gst.STATE_PLAYING) bin.set_property("filename", "/home/user/MyDocs/current.aac") bin.set_property("mode",1) #starts recording bin.emit("user-start") time.sleep(30) # stops recording bin.emit("user-stop") bin.set_state(gst.STATE_PAUSED) bin.set_state(gst.STATE_NULL) ----------------------- first issue - for some reason, no "current.aac" file is being created - even though the script seems to run with no errors. second issue i have is that executing this script opens a window in n900 and i would like to avoid it. Any help will be appreciated. |
Re: recording phone sound from bash
That there's a window opening is because you're pretty much just launching the camera ui to record something. I doubt that you can avoid this if you don't use a real commandline utility... does lame or so run on Maemo?
Did you try Recaller? Maybe that thing can be remote-controlled or even auto-triggered? Please be aware of legal implications of secretly recording someone's private conversations. Kind regards, Sarah |
Re: recording phone sound from bash
regarding commandline foo, see the thread on call recording for some inspiration how to access the sound system from teh commandline.
o.O really wondering what you are planning to do with that thing |
Re: recording phone sound from bash
If you are launching your script from a desktop shortcut, then in /usr/share/applications/hildon/xyz.desktop, type this line: "X-App-Loading-Image=none". Then it will not attempt to launch a window when you click the shortcut.
I know recaller, I use recaller, but I would gladly find something more directly connecting to the audio, if possible. Shortcut instead of widget, bash script instead of python... Thank you. Best wishes. _________________ Per aspera ad astra... |
Re: recording phone sound from bash
the problem i have with recaller is that sometimes it makes hildon desktop stuck (the green icon does not change back to red at the end of a call) and then i have to restart the UI services.
I thought about making a recording script and attach it to dbus scripts when a call starts/ends and avoid widget changes. |
Re: recording phone sound from bash
Quote:
|
Re: recording phone sound from bash
Quote:
idk a solution/answer to your original problem. But maybe at least an explanation/workaround for your desktop thing: http://talk.maemo.org/showthread.php?p=1298457 better start from here. |
Re: recording phone sound from bash
Quote:
Testing the script right now :) |
Re: recording phone sound from bash
This script works well but it is a bad workaround to the main problem.
i added its execution to the call end dbus event, and in most cases it works - in some it doesn't, but the main issue is that it is reproducible almost every time when the calls end (my recorder widget is configured to record all calls automatically). if i disable the recording it does not happen again. I want to make a script to record the calls myself and stop using this widget. If anyone knows what modifications i need to do to the script posted in the 1st post it will be great. |
All times are GMT. The time now is 22:53. |
vBulletin® Version 3.8.8