juniorlm87 / csipsimple

Automatically exported from code.google.com/p/csipsimple
0 stars 0 forks source link

Call recorder file format #1862

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Dear Regis

As I said before to you by email, the CSIMPLE SIP phone is a great application, 
really.

The only thing that is becoming a must is the file format of the recorded 
calls. Look, I make everyday calls to my partners in Europe and then I share 
these conversations with my business partners by email.
The problem is that each recorded file has 5 - 14 and up to 18 Megabytes size. 
So to upload to the mail and send it is a pain in the ass. Sorry for my words 
but it is the reality.

If you are able to make the record files in a lower size, that will be 
fantastic. I use another call recorder when I call local phones and it record 
in 3gp file format and for the same conversation time it is 15 or 20 times less 
size.

This will be a great enhancement.

Thanks Regis.

regards, Victor

Original issue reported on code.google.com by Victor.R...@gmail.com on 3 Aug 2012 at 5:24

GoogleCodeExporter commented 9 years ago
As replied in private email. The position on this topic is to make a dedicated 
different app for that.

There is EVERYTHING necessary in CSipSimple api to do that. Issue 1839 
definitely fix the needed things for a third party application to treat on the 
fly the recorded entry.

For the record, and for others that wonder about that, some hints about the 
topic to understand why it's recorded under wav format and why it should be 
treaten by a third party application dedicated to format conversion. (Thanks to 
the intent of issue 1839 it could be done AUTOMATICALLY by such a third party 
app).

Things to consider :
 - If I record under 3gp format (which use AMR codec), it would mean extra CPU cycle to encode the PCM frames to AMR. While encoding into wav PCM is costless (since it's already the format the sound is played and recorded). So it's not good to record in real time to a different format than wav because would affect call quality.

 - It could be done once the call is ended (or record is stopped).
But I don't think it's a good idea to integrate this feature directly inside 
CSipSimple itself. The android platform is well designed enough to allow 
application to talk with each others. Besides developping CSipSimple I keep 
that in mind and provide a way to third party applications (with correct 
permissions granted at install time) to do extra things.
As I also believe in the fact an application should focus one thing but do it 
completely and cleanly... I think that to address your need it would be way 
better to do a "plugin" or third party application. Dedicated to call records 
management.
Not only it could give a way to encode file into a lighter format for storage 
once conversation is ended; but it would also allow to rename files with your 
own rules, to play, to share recorded conversations etc etc. Everything in mind 
of users could take place in such a dedicated application. While in csipsimple 
it could remain very simple and focused on SIP feature.

The idea is to keep things rudimentary inside CSipSimple to allow another (or 
many others) apps to manage that cleanly and fully.
If I have time, I'll do such an application. That's in my todo list with a low 
priority. But as CSipSimple is opensource and free as in speech any developer 
that would like to contribute such an extra application would be welcome and I 
will help this kind of initiative.

I hope you understand my position. And if you are a developer and would like to 
take the point and develop such an app, don't hesitate to tell; I'll give you 
starting entry points to do that ;).

Original comment by r3gis...@gmail.com on 3 Aug 2012 at 5:42

GoogleCodeExporter commented 9 years ago
Dear Regis

I just saw that the recording file from a call, is recorded at 256 Kbps so 
that's why this resultant file is so heavy in MB and consume more processor.

But this is only a phone call, not a high definition music, so a solution to 
not have big files, is to decrease the recording file to 96 Kbps.

So the resultant file will be 1/3 heavy and will consume less processor.

I guess is a very good idea as an enhancement.

Regards, Victor

Original comment by Victor.R...@gmail.com on 13 Aug 2012 at 4:58

GoogleCodeExporter commented 9 years ago
Hi Victor,
Indeed it's 256 Kbps and it's made to minimize CPU process and re-sampling.

I guess that your clock rate setting is 16kHz (the default).

So you have 16kHz x mono (1 channel) x 16 world length => 256 kbps.
Logic :) !

Again, that's to reduce the CPU cycle ! No resampling here ! It just take what 
is played. 
You could change audio clock rate to 8kHz if you want. It will change bitrate 
of wave file to 128kHz and may avoid some resampling between audio codec and 
audio device. However perceived quality will probably be lower ;).

The current record method is made to avoid any extra CPU cycle. It just write 
to wav file the same thing that it write to audio device.
And again, to reduce the file size, the correct solution is to 
resample/convert/compress the file once the call is ENDED. Everything in 
CSipSimple api is ready to do that... it just needs a third party application 
to do that ;)... and do that good ! with all options !

Original comment by r3gis...@gmail.com on 13 Aug 2012 at 8:00

GoogleCodeExporter commented 9 years ago
I also have this need/request. Are there any third party applications that 
actually use the CSipSimple API to provide such functionality at this moment?

If not, maybe a companion project should be started for this purpose?

Original comment by dbo...@gmail.com on 20 Mar 2013 at 10:06

GoogleCodeExporter commented 9 years ago
AFAIK there is no such app at the moment.

The CSipSimple api should be ready to allow such a companion project. If you 
start one and need some help don't hesitate to join the csipsimple-dev Google 
group :-) 

Original comment by r3gis...@gmail.com on 20 Mar 2013 at 10:58

GoogleCodeExporter commented 9 years ago
@Victor, 
Are you able to run a 3rd party call recorder along with CSipSimple 
simultaneously? 
I'm trying to use 3rd party call recorder for local calls. Somehow they affect 
CSipSimple, other persons don't hear me.

Original comment by sinancet...@gmail.com on 23 Apr 2013 at 3:29

GoogleCodeExporter commented 9 years ago
No finaly I m not using a 3rd party call recorder with CSimple. i sue it as it 
is, with the call recorder it has. The WAV file normaly is a little bit too 
heavy in some calls, but what can I do ? i use CSimple only for outgoing calls 
because I make everyday calls to europe or to US.
So for the normal operation I mean for local calls I use this one, very good, 
simple and light
https://play.google.com/store/apps/details?id=polis.app.callrecorder

Original comment by Victor.R...@gmail.com on 23 Apr 2013 at 3:42