mscdex / node-rtp Goto Github PK
View Code? Open in Web Editor NEWAn RTP module in pure JavaScript for node.js
License: MIT License
An RTP module in pure JavaScript for node.js
License: MIT License
Hello @mscdex,
I'm trying to follow your example (sendg711.js
) on streaming RTP-based audio to a Cisco phone. I used https://g711.org/ to convert one of my .wav
using the "Standard Definition 16-bit WAV (8Khz, Mono, 16-Bit PCM)" option. This produced the clearest audio on the phone, whereas the rest of the conversions were intercombined with static or completely unintelligible.
However, I'm having some issues with receiving the audio on my phone. Using the default code:
intvl = setInterval(writeData, 20);
yields the audio streaming for about 2 seconds, no audio for 2 seconds, and the audio continuing intermittently so on. If I decrease the param of 20
to 8
(for example), there are no more gaps of silence but the audio appears to 'overlap' during the streaming process. Increasing past 20 also respectively increases the gaps.
Do you have any tips on what the problem might be or how I should better convert my audio file?
This code is super readable, to the point, and encapsulated perfectly..
The whole implementation is just an object with getters and setters...
sender uses setters, receiver uses getters & the constructor --
so i literally just read the datagram from the socket and throw it to the constructor...
AWESOME..
But my question is, what changes would I need to make to support rfc-2250.
Which getters and setters would need to change to support 2250?
Thanks!!
every 20 ms
intvl = setInterval(writeData, 20);
but if ((bytesRead = fs.readSync(fd, buf, 0, buf.length)) > 0) {
i think it all read 0 - 160 bytes
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.