linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] python linphone RPI3


From: Leland Green
Subject: Re: [Linphone-developers] python linphone RPI3
Date: Sat, 19 Mar 2016 15:16:19 -0500

Hi Alex,

Perhaps we can help each other. Normally, to get the python headers and build a Python extension module, etc., you just run:

sudo apt-get install python-dev

But depending on what you're building you may also/alternatively need another package. Especially if you're rebuilding Python, itself, you'll need:

sudo apt-get install libpython-dev

And possibly several others. You can *usually* find the one you're looking for from the list generated with:

 apt-cache search python-dev

Hope that helps,
Leland...

On Sat, Mar 19, 2016 at 11:31 AM, Alejandro <address@hidden> wrote:
Hi Leland

You are really welcome. I am looking forward to hearing news about whether this fix the problem eventually. A good way to obtain the right id string is by running the sample script and getting the output in a text file. In the first lines of the output file you will get the strings for the audio devices in your pi.
$ python sample_from_web.py 2> output.txt

Also many thanks for sharing your project! It is a very useful example that can inspire people to bring video devices with sensing capabilities, on top of linphone. This is something that I will have to look at... because I want to bring a tangible video phone for senior people (easier to use and also better for people with some motor impairment). But I am stuck with performance issues, and compiling the linphone wrapper for raspberry fails (it shows an error with CMAKE, saying "Could NOT find PythonLibs (...").

if the wrapper recompiled for RPI3 run reasonably well with video support, it would enable us to bring alternative and exciting UI designs for linphone.

Best
Alex
--


On 19/03/2016 15:39, Leland Green wrote:
Hey Alex,

That is some awesome information. I sure do appreciate your help. 

However, I already have a cheap USB soundcard, and I *can* record audio from the microphone. I have tried various device names, but I don't think I was prefixing it with the "ALSA:". (Or if I did, I did not get the device name correct with it.) So I definitely think it's just a device naming issue. I felt like I had tried everything, and nothing worked, so I finally decided to ask. :-)

I'm very happy to hear from you! This is encouraging and I think that I can get the audio working now. If I have further problems I will try to post more details.

Thanks again and best wishes,
Leland…



On Sat, Mar 19, 2016 at 4:26 AM, Alejandro <address@hidden> wrote:
Hi Leland

Regarding your question: To get audio input from a mic you will need a soundcard with such capacity. I used a cheap USB sound card. Some devices tested on the PI can be find here:
http://elinux.org/RPi_VerifiedPeripherals#USB_Sound_Cards

First, check that with your device that you are able to record sounds (e.g. arecord). You can easily find posts about this. Once you have the sound card configured, it should be easy to use in your python script.

In the script you are based on from https://wiki.linphone.org/wiki/index.php/Raspberrypi:start, I just had to change the snd_capture parameter with the id string related to my sound device (snd_capture=id_device) . You can find the id_device string in alsamixer, or just in the first lines of the log output when running the python script. In my case I had to set "snd_capture='ALSA: USB PnP Sound Device'". Hope this helps.

Best
Alex
--

On 18/03/2016 21:43, Leland Green wrote:
Hi Alejandro,

I have a project that uses Linphone in Python. I started with the sample program for Python on the Linphone.org website. But it has grown considerably. It's a security camera with a motion detector. You can call into the Raspberry Pi, which is running the security_camera.py script. It works pretty well. Although, I don't have the audio from the RPi working, yet. I'm not sure why. Anyone have any ideas? I think it's because I don't have my USB soundcard setup right (somehow). But I'm not sure.

Does anyone have tips for Linphone using audio from the Raspberry Pi &/or from Python in general?

If you, or anyone, would like to take a look at this, I just updated the Readme to include the features and then the requirements. Here's a link: https://github.com/lelandg/Raspberry-Pi-Security-Camera
I would love to hear comments. Feel free to enter Issues on the project, even if you just want to comment. Questions will be answered in an expeditious manner. 

You could easily strip out the parts to do with custom hardware (that I built), by removing code related to them. And the Fritzing files are included, so you could also build the circuit, if you'd like. (It's a simple circuit so far, suitable for beginners.) I have further plans, so stay tuned. :)

If anyone at Linphone or Belledonne Communications would like to include my project in a list of sample projects, I would be honored.

I hope this helps,
Leland...

On Fri, Mar 18, 2016 at 2:37 PM, Alejandro <address@hidden> wrote:
Hi all,

Is there any plan to bring a package specifically compiled to Raspberry PI 3?

We would like to carry out a profiling of linphone, and see whether video rendering can eventually be supported. The available python package with the sample script from https://wiki.linphone.org/wiki/index.php/Raspberrypi:start
takes around 39% of CPU in total (streaming video with the raspicam).

We can confirm that the "Enable self-preview" feature of the "linphone 3.6", which is the out-of-date version that is installed in raspbian by using apt-get, takes almost the whole CPU to show the video on screen. I guess that compiling the libraries, or implementing a specific filter for RPI3, would made video rendering possible, especially when the raspistill tool for taking pictures with the raspicam is able to render live video without significant cpu usage.

Any further comments on this regard will be very helpful.

best
Alex


_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers



_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers


_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers




_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers


_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]