Open GoogleCodeExporter opened 9 years ago
It doesn't work in full duplex because echo cancellation is turned off (Speex
default settings I guess).
Original comment by ionut.ur...@gmail.com
on 26 Nov 2012 at 7:38
[deleted comment]
Thank you very much for this great app
its a little offtopic but its possible to listen the pttdroid multicast or
broadcast from alinux machine ? I get error for unknown format,I use the not
speex format
wich its 8000hz 16bits signd PCM so
I tried..
I get some sound but not inteligible
MULTICAST_IP_ADDR=230.0.0.1
AUDIO_UDP_PORT=2010
gst-launch-0.10 udpsrc multicast-group=$MULTICAST_IP_ADDR auto-multicast=true
port=$AUDIO_UDP_PORT \
caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000,
encoding-name=(string)PCMU, \
payload=(int)0, ssrc=(guint)1350777638, clock-base=(guint)2942119800,
seqnum-base=(guint)47141" ! \
rtppcmudepay ! mulawdec ! pulsesink
I also tried :
mplayer udp://@230.0.0.1:2010
cvlc -vvv udp://@230.0.0.1:2010
I also tried the opposite, like sending audio to the app from gstreamer again I
hear some distorted sound on android but not inteligible
Thanks for your help and any hint or insight you could give me
Original comment by jordipar...@gmail.com
on 18 Dec 2013 at 9:23
Hi,
Try both big/little endian format
Original comment by ionut.ur...@gmail.com
on 18 Dec 2013 at 11:27
Hi,
Thank you very much for answering so fast,
By Try both big/little endian format you mean change the
encoding-name=(string)PCMU ?
I havent found a list of implemented encodings the gstreamer can do many things
but can be complicated to grasp...
BTW I found a workaround not optimal cause it uses python but at least works,
I get "ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred "but sounds fine
In python
"import socket
import pyaudio, sys
import struct
#import time, wave, pymedia.audio.sound as sound
##http://stackoverflow.com/questions/603852/multicast-in-python
##http://pymotw.com/2/socket/multicast.html
MCAST_GRP = '231.0.0.1'
MCAST_PORT = 2010
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock.bind(('', MCAST_PORT))
mreq = struct.pack("4sl", socket.inet_aton(MCAST_GRP), socket.INADDR_ANY)
sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
BUFF= 1024*4
#chunk = 320
chunk = 160
FORMAT = pyaudio.paInt16
# http://people.csail.mit.edu/hubert/pyaudio/docs/
# paFloat32, paInt32, paInt24, paInt16, paInt8, paUInt8, paCustomFormat
CHANNELS = 1
RATE = 8000
p = pyaudio.PyAudio()
stream = p.open(format = FORMAT, channels = CHANNELS, rate = RATE, input =
True,output = True, frames_per_buffer = chunk)
while True:
data = sock.recv(BUFF)
stream.write(data,chunk)"
Original comment by jordipar...@gmail.com
on 18 Dec 2013 at 4:02
Original issue reported on code.google.com by
mahsanq...@gmail.com
on 22 Nov 2012 at 12:20