Questions tagged [nodejs-stream]

A stream is an abstract interface for working with streaming data in Node.js. The stream module provides a base API that makes it easy to build objects that implement the stream interface.

306 questions
1
vote
2 answers

Nodejs - RTSP live camera feed - distributed architecture

We have a requirement where we pass the camera details and need to show the live stream to the end-user in a web browser. As this is distributed architecture, so we can do it using the Rest API only or socket communication. Technology stack Nodejs…
Bhavin
  • 179
  • 1
  • 2
  • 13
1
vote
1 answer

Node.js: appending to readable stream WHILE it is piped to a writable stream?

My server receives udp packets of audio buffers. I would like to stream these incoming chunks to Google's text-to-speech API. Using fs streams, is it possible to achieve this in a manner that goes something like this?: let stream =…
A S
  • 75
  • 8
1
vote
0 answers

should I use stream to get big data from mySQL?

so I have to get big data which is approximately 1017208 KB from MySQL. The problem is that it takes time when I retrieve it . After some googling, I find out I can use stream or child processer to improve the performance. I'm using the data to draw…
1
vote
1 answer

Convert String to Readable in TypeScript

I want to do this: How to create streams from string in Node.Js? in TypeScript. I tryed the folowing things: import * as stream from 'stream' dataStream = stream.Readable.from(["My String"]) This leads to the error:Property 'from' does not exist on…
maxbit89
  • 748
  • 1
  • 11
  • 31
1
vote
0 answers

Node.js - Split binary stream into multiple sub streams

I have one readable byte-stream and need to distribute it's contents into chunks into writable output streams. The output streams represent sinks that have a maximum length. So the stream would be read byte by byte and streamed into the writeable…
ash
  • 11
  • 1
1
vote
0 answers

Piping ReadableStream to child process stdin

I'm trying to spawn ghostscript using a nodejs child process, I want to pass a ReadableStream as stdin. Seems like ghostscript does not pick up my input, why is that? I know I could do all of this sync etc. but I want to keep the memory footprint as…
Alexander Kludt
  • 854
  • 6
  • 17
1
vote
1 answer

Streaming html5 animation in real time from server to client

I have an animation written in Javascript. I am new to nodejs (no knowledge) and I have been finding it difficult to stream the animation in real-time to users connected to the site. I read about socket.io and Websockets but I do not have a good…
Wicfasho
  • 311
  • 2
  • 13
1
vote
0 answers

Nodejs express how to pipe stream from function to API res

How do I pipe the stream from my downloadWithBuffers function into the res of my sequence_stream API? I can get the stream to work when I run the downloadWithBuffers function directly in the file passing in the params with correct bucket and object…
rf guy
  • 379
  • 10
  • 26
1
vote
0 answers

Node.JS Voice over IP Electron

I am fairly new to Node.JS, but I want to code a Voice Chat Program which uses the Electron Framework for the Client. The Server shall be hosted on a Linux Computer. I want to connect with multiple Clients to this Server and talk and recieve audio…
peter12908
  • 21
  • 2
1
vote
0 answers

unexpected end of while when zlib.gunzipping very large file from s3 bucket

I'm loading a very large file from an AWS s3 bucket, creating a readStream out of it, gunzipping it, and then passing it through Papa.parse. When I say "very large file", I mean it's 245 MB gzipped, and 1.1 GB unzipped. Doing this with smaller files…
mcv
  • 4,217
  • 6
  • 34
  • 40
1
vote
0 answers

Stream request body in Koa

I know that I can pass a stream into the response body in Koa: import fs from 'fs'; import { Context } from 'koa'; const routeHandler = async (ctx: Context): Promise => { const stream = fs.createReadStream('path/to/response.png'); …
Fela Maslen
  • 2,022
  • 3
  • 25
  • 46
1
vote
1 answer

ECONNRESET error in Nodejs while calling API request

I'm using NodeJS in my application, I'm trying to call API service to get the token from the server. While I'm making any request from the NodeJS file I'm getting "ECONNRESET" error. I've tried with some API , which reflects the same error. Below is…
JeevaRekha
  • 383
  • 1
  • 7
  • 21
1
vote
0 answers

Why do I call socket.write function continuously but only trigger IPC Server 'data' event once in nodejs?

I created an IPC server, I will send message to the client during the entire program life cycle. When the client receives the message, it will process it, but will not send the message to the server. // Server.js let server =…
Yuu
  • 11
  • 1
1
vote
1 answer

Azure Speech to text result undefined nodejs

I am trying to implement a speech to text with userMedia. I write stream in the file on Nodejs server file created successfully but when try to convert speech to text with Azure fromStreamInput getting an undefined result. var subscriptionKey =…
1
vote
1 answer

Is there way to specify local file system path in nodeJS POST API request , am able to make api call using curl but not with nodejs

Following curl API is successfully deploying .zip file from the local file system into the Azure Function APP. curl -X POST -u user123:P@ssword --data-binary @"C:\Ddrive\Porject\deploy-zip\wb-uc-code.zip"…