fluent-ffmpeg / node-fluent-ffmpeg

A fluent API to FFMPEG (http://www.ffmpeg.org)
MIT License
7.93k stars 880 forks source link

Web cam- Error: ffmpeg exited with code 1: /dev/video0: Device or resource busy #844

Open SerafinTech opened 6 years ago

SerafinTech commented 6 years ago

When using a logitech webcam as input on raspberry pi I get an Error: ffmpeg exited with code 1: /dev/video0: Device or resource busy.

I have found a work around by setting _input[0].isStream = true before calling run() on the fluent-ffmpeg object

ffprobe is running and consuming the web cam. Maybe there should be an option to disable ffprobe

TWhidden commented 5 years ago

I know this was a year ago, just curious what your solution was - in my case, same thing. Trying to read from /dev/video0 . I have tried several different constructors, including fs.createReadStream('/dev/video0') (so it will have a stream), but just cant get past this issue. This looks to be a very used node package, but its primary target seems to be completed files. They list webcams and my usage is the same, but get this error under Ubuntu 18.04 LTS

uncaughtException: ffmpeg exited with code 1: /dev/video0: Device or resource busy

Thanks!

mattkrebs commented 4 years ago

I know this was a year ago, just curious what your solution was - in my case, same thing. Trying to read from /dev/video0 . I have tried several different constructors, including fs.createReadStream('/dev/video0') (so it will have a stream), but just cant get past this issue. This looks to be a very used node package, but its primary target seems to be completed files. They list webcams and my usage is the same, but get this error under Ubuntu 18.04 LTS

uncaughtException: ffmpeg exited with code 1: /dev/video0: Device or resource busy

Thanks!

Did you ever get this figured out? Same thing on my raspberry pi.

Able1991 commented 4 years ago

ffprobe needs to be disabled, or to be able to pass it a separate path for scanning as an option, I have rtmp stream, and the nginx-rtmp callback calls are duplicated due to calling ffprobe