[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-dev] [Vincent Penquerc'h] Tor voicechat



I was sent some suggestions for this off-list, and Vincent said I could
post it here.

--- Begin Message ---
Hi,

I've seen a reference to your post about this, and that you were
wondering about a few things about gstreamer/ogg/opus. I think I might
be able to offer a few suggestions about this.

- You may want to switch to gstreamer 1.x, 0.10 is now unmaintained.
There should not be many changes needed for this.

- Using Opus is a good idea. It is indeed the latest from Xiph and is a
very good codec, designed for real time, low latency, use. How this will
translate to Tor is another question though.

- Opus can do constant bitrate. See the cbr option in opusenc. I do not
know if it actually works, but a good way to check is to run your code
with the environment variables:

GST_DEBUG_FILE=/tmp/gst.log
GST_DEBUG=GST_SCHEDULING:3

This will log relevant bits in /tmp/gst.log, in particular information
about buffers going through the pipeline. Look for those leaving
opusenc, they'll have "$nextelement:sink> calling chainfunction" in the
line and will include the size in bytes of the buffer. If these stay the
same as you talk in the mic, you're good.

- Using oggmux/oggdemux for real time communication is probably not a
good idea. Ogg was not made for low latency, and while it is possible to
set it up for lowish latency, this wastes bytes. Using RTP is a better
option there, as it is designed for live transmission. There are RTP
payloader and depayloader elements for Opus in -bad too.

- Using Opus with RTP was designed with privacy/security in mind. There
is a #opus channel on freenode with helpful Opus people, should you have
Opus specific questions.

- Selection of audio input source is done via setting properties on the
source elements. I'm not sure exactly how to do that offhand, but I
think you would listen for 'element-added' on the bin you create via
gst_parse_launch, then, if an element gets added that's an audio source
(alsasrc, pulsesrc, maybe osssrc), set the relevant property (ie,
"device" for pulsesrc). I'm not sure what those values would be, however.

- It should work on Windows, and maybe Mac. These should have their own
audio source elements. I think gstreamer is a pain to install on
Windows, though there is a prebuilt SDK for Windows (last I knew it was
using 0.10 though).

Feel free to ask questions about these points or more, I'll answer if I
can, or try to point to other sources otherwise.



--- End Message ---
_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev