Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disconnected camera #84

Open
NasserAlmanji opened this issue Jul 5, 2021 · 3 comments
Open

Disconnected camera #84

NasserAlmanji opened this issue Jul 5, 2021 · 3 comments

Comments

@NasserAlmanji
Copy link

NasserAlmanji commented Jul 5, 2021

The module works well.

In case the camera is disconnected (unplug the cable) and then connect, the module does not detect that and the process needs a restart to see the media again in browser.

Kind regards,
Nasser

@llindor
Copy link

llindor commented Jul 8, 2021

Same issue here.

I tried passing some http options to ffmpeg but it has no effect :

  ffmpegOptions: {
    "-reconnect": 1,
    "-reconnect_at_eof": 1,
    "-reconnect_streamed": 1,
    "-reconnect_delay_max": 2,
  },

The process need to restart to see the video too.

@OmanCoding
Copy link

Thanks for clarification

@AndresGamboaBaldi
Copy link

image

The solution is to modify the file mpegmuxer.js, in the line 44 when an error occurs, this is only handling errors with code = 1, if the camera gets disconnected the error code = 0, so I fixed it adding the code === 0 to the If

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants