Comments (2)
I found the problem and solution at https://stackoverflow.com/questions/20792427/why-is-my-node-child-process-that-i-created-via-spawn-hanging.
Here's the copy of the solution:
As it turns out once the stderr buffer exceeds 24kb you must be reading from it or you not see any events for completion. Possible workarounds:
Set the stdio option on the spawn call.
spawn('git', ['push', 'origin', 'master'], {stdio: 'ignore'});
See Node ChildProcess doc for all of the possibilities - there are lots.
Add an on(data) handler.
var git = spawn('git', ['push', 'origin', 'master']);
...
git.stderr.on('data', function(data) {
// do something with it
});
Pipe it to stdout / stderr. This may be too verbose for your application but including it for completeness.
var git = spawn('git', ['push', 'origin', 'master']);
...
git.stderr.pipe(process.stderr);
git.stdout.pipe(process.stdout);
from h264-live-player.
If I put in _server.js -> new_client(socket) -> socket.on(...):
if(action == "REQUESTSTREAM") {
self.start_feed();
}
if(action == "STOPSTREAM") {
try {
self.streamer.kill();
self.readStream = undefined;
} catch (er) {
console.log("self.readStream ended");
}
}
where streamer is spawn('ffmpeg', args) from ffmpeg.js I obtain the killing of ffmpeg process when pressing Stop Video button; when pressing the Start Video button the ffmpeg process restarts (started by self.start_feed call) so everything works fine.
I tested this behavior with two very different cameras. So why from time to time (~ 4 minutes) the node's child_process (streamer from ffmpeg.js) stops getting data from ffmpeg process?
Again: with some other software the same time I'm getting data from the same camera.
from h264-live-player.
Related Issues (20)
- how to fix this error?
- Error when I run server-rpi.js on Start Video HOT 2
- Using Raspberry Pi Stream with h264-live-player server-tcp HOT 5
- Broadway build version
- Do you know how to support other profile except baseline? HOT 1
- Unable to play H264 video stream of main profile HOT 3
- `npm install` fails HOT 3
- some resolution video's image is broken HOT 3
- 解码问题 HOT 1
- [issue/question] Degraded video quality at higher bitrate/resolution HOT 1
- Just sending some love HOT 1
- [Question] Can I use this for YUV image streaming?
- Update NPM Package?
- UDP ports are not supported HOT 1
- Failure 70 on USB Webcam Raspberry Pi HOT 6
- Video distortion from RTSP camera HOT 1
- Auto-play with no button callbacks HOT 1
- Refreshing page returns Failure 70 HOT 1
- Texture size mismatch
- h264播放失败
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from h264-live-player.