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

ERROR: FFmpeg exited with code 1 #65

Open
hanzala-123 opened this issue Jun 8, 2020 · 26 comments
Open

ERROR: FFmpeg exited with code 1 #65

hanzala-123 opened this issue Jun 8, 2020 · 26 comments

Comments

@hanzala-123
Copy link

what does this mean?

@Samfox2
Copy link
Owner

Samfox2 commented Jun 8, 2020

This means your ffmpeg is unable to stream. Could you post your log here?

@hanzala-123
Copy link
Author

hanzala-123 commented Jun 9, 2020

{
"name": "Video Doorbell",
"cameras": [
{
"name": "Front Door",
"button": true,
"motion": true,
"port": 554,
"throttle": 10000,
"videoConfig": {
"source": "mysource",
"stillImageSource": "-i http://faster_still_image_grab_url/this_is_optional.jpg",
"maxStreams": 2,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 30,
"maxBitrate": 300,
"vcodec": "h264_omx",
"packetSize": 188,
"vflip": false,
"hflip": false,
"audio": "true",
"debug": false
},
"videoProcessor": "High-Performance Embedded SOC Processor",
"manufacturer": "EZviz",
"model": "DB1"
}
],
"platform": "Video-doorbell"
},

i cant retrieve my log info atm, it said something like ffmpeg type 1 or something like that. It gave an error code.

@Samfox2
Copy link
Owner

Samfox2 commented Jun 9, 2020

Ok, first of all "videoProcessor": should be "ffmpeg" as this is the binary that is used to stream (and not "High-Performance Embedded SOC Processor").

@hanzala-123
Copy link
Author

This means your ffmpeg is unable to stream. Could you post your log here?

[6/9/2020, 12:44:20] [Video Doorbell] Snapshot from Front Door at 480x270
[6/9/2020, 12:44:20] [Video Doorbell] Start streaming video from Front Door with 1280x720@299kBit
[6/9/2020, 12:44:21] [Video Doorbell] ERROR: FFmpeg exited with code 1

ive changed the "videoProcessor" to "ffmpeg" BTW

@Samfox2
Copy link
Owner

Samfox2 commented Jun 9, 2020

Ok, I am assuming that your snapshots work. As you are using h264_omx codec please make sure that your user that is running homebridge is allowed to use grafix hardware.

@hanzala-123
Copy link
Author

hanzala-123 commented Jun 9, 2020

Ok, I am assuming that your snapshots work. As you are using h264_omx codec please make sure that your user that is running homebridge is allowed to use grafix hardware.

it says that there is a snapshot but i do not get one in the home app. Also please explain to me what you mean about the grafix hardware. What is it ? etc

Thanks for helping BTW, sorry for any inconveniences caused im a bit of a noob!

@Samfox2
Copy link
Owner

Samfox2 commented Jun 9, 2020

As h264_omx codec uses gpu to increase performance the user that is running homebridge has to be allowed to use the graphic hardware of your system.
If your user is called "myuser" you can add homebridge to the video group with: sudo adduser myuser video.

Many cams provide a url to get a pic from the cam. This url can be tested by opening in your web browser. Optional "stillImageSource" parameter should point to this snapshot url of your cam.
I dont think http://faster_still_image_grab_url/this_is_optional.jpg` is the right url. So it would be better to leave that option out and try with a simple config.

Also, after changing config parameters it is better to remove the doorbell and add it as a new doorbell with a different name to your home as homekit remembers configuration parameters and changes may not be recognized.

@dikodahan
Copy link

dikodahan commented Jun 15, 2020

I am experiencing the same issue.
I have an August Doorbell Cam Pro. I had it working perfectly with no issues and it just recently started happening. Getting the exact same error message.
my user, pi, is and was already a member of the video group.

Could this be related to a recent Raspberry pi OS update? Maybe a recent ffmpeg update?? If not a recent plugin update impact.

I am using the following config with my camera:

        {
            "platform": "Video-doorbell",
            "cameras": [
                {
                    "name": "Doorbell",
                    "motion": true,
                    "button": true,
                    "manufacturer": "August",
                    "model": "Doorbell Cam Pro",
                    "serialNumber": "XXXXXXXXXXXX",
                    "firmwareRevision": "2.3.0",
                    "videoConfig": {
                        "source": "-re -i rtsp://user:#######@xxx.xxx.xxx.xxx:554/live/stream0",
                        "stillImageSource": "-skip_frame nokey -i rtsp://user:#######@xxx.xxx.xxx.xxx:554/live/stream1 -frames:v 1",
                        "maxStreams": 10,
                        "maxWidth": 1280,
                        "maxHeight": 960,
                        "maxFPS": 30,
                        "maxBitrate": 300,
                        "vcodec": "libx264",
                        "packetSize": 1316,
                        "audio": false,
                        "debug": false
                    }
                }
            ]
        }

I am getting the following when running ffmpeg from raspberry pi os cli:

pi@homebridge:~ $ ffmpeg 
ffmpeg version 4.1.4-1+rpt7~deb10u1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --libdir=/usr/lib/arm-linux-gnueabihf --cpu=arm1176jzf-s --arch=arm
  WARNING: library configuration mismatch
  avutil      configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  avcodec     configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  avformat    configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  avdevice    configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  avfilter    configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  avresample  configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  swscale     configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  swresample  configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  postproc    configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

@mikeknoop
Copy link

@dikodahan I found that error was due to the version of ffmpeg being used. The plugin uses a packaged version that comes with it instead of the system version. I was able to resolve by uninstalling system version and the plugin, and re-installing just the plugin.

Also @dikodahan were you able to somehow get notifications working with your August doorbell?

@spiderguy84
Copy link

@dikodahan I found that error was due to the version of ffmpeg being used. The plugin uses a packaged version that comes with it instead of the system version. I was able to resolve by uninstalling system version and the plugin, and re-installing just the plugin.

Also @dikodahan were you able to somehow get notifications working with your August doorbell?

I have no clue why, but I'm having the same issue. I never installed FFMPEG with HomeBridge, as I knew this plugin had it built-in. It will work for a few minutes, then constantly crash with code 1. And notifications when the button pressed don't work. If I manually click the button accessory platter inside the home app it will work, but not when the doorbell button is physically pushed.

@michasiatko
Copy link

I have the same problem. Using "homebridge-videodoorbell" there is FFmpeg exited with code 1 error.

I have the same stream's URL and vcodec for "homebridge-camera-ffmpeg"- everything works perfectly.

Part of my config
{ "name": "Camera FFmpeg", "cameras": [ { "name": "Podjazd Dahua", "manufacturer": "dahua", "model": "ipc", "unbridge": true, "videoConfig": { "source": "-re -i rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1", "stillImageSource": "http://admin:[email protected]/cgi-bin/snapshot.cgi?chn=1", "maxWidth": 640, "maxHeight": 480, "maxBitrate": 420, "vcodec": "h264_omx" } } ], "platform": "Camera-ffmpeg" }, { "name": "Dzwonek", "cameras": [ { "name": "Podjazd", "button": true, "motion": false, "throttle": 10000, "videoConfig": { "source": "-re -i rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1", "stillImageSource": "-i http://admin:[email protected]/cgi-bin/snapshot.cgi?chn=1", "maxStreams": 2, "maxWidth": 640, "maxHeight": 480, "maxFPS": 15, "maxBitrate": 420, "vcodec": "h264_omx", "packetSize": 1316, "vflip": false, "hflip": false, "audio": "false", "debug": false }, "manufacturer": "Dahua", "model": "IPC" } ], "platform": "Video-doorbell" }

@Samfox2
Copy link
Owner

Samfox2 commented Aug 27, 2020

Please make sure that you are using the same ffmpeg version.

@spiderguy84
Copy link

Please make sure that you are using the same ffmpeg version.

Ummmm what? I never installed FFMPEG only your plugin so make sure I have the same version installed compared to what?

@MichelRabozee
Copy link

@spiderguy84, homebridge-camera-ffmpeg comes with a version of ffmpeg. What @Samfox2 suggests is to use that ffmpeg (as it works with homebridge-camera-ffmpeg) in homebridge-videodoorbell as well. In my case I added
"videoProcessor": "/usr/local/lib/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg",
to the configuration of homebridge-videodoorbell

Beware that my path is under a MocOS system. I do not know if on other systems, it will be the same.

@spiderguy84
Copy link

@spiderguy84, homebridge-camera-ffmpeg comes with a version of ffmpeg. What @Samfox2 suggests is to use that ffmpeg (as it works with homebridge-camera-ffmpeg) in homebridge-videodoorbell as well. In my case I added
"videoProcessor": "/usr/local/lib/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg",
to the configuration of homebridge-videodoorbell

Beware that my path is under a MocOS system. I do not know if on other systems, it will be the same.

But what I am saying is that I don't have any other version of FFMPEG to use, so why would I need to tell it to use its own plugin version?

@MichelRabozee
Copy link

MichelRabozee commented Aug 27, 2020

On which operating system are your homebridge running ?

If it is a Linux flavour, you could have some version (not the one used by homebridge-camera-ffmpeg) of ffmpeg installed (in a location referred to by PATH) and this version is used by homebridge-videodoorbell but does not work anymore for some reason.

@michasiatko
Copy link

Guys.
But if you use "homebridge-camera-ffmpeg" plugin in the newest version you can add in JSON config
"doorbell": true
"switches": true

which shows dummy switch for doorbell so fighting with this plugin at this moment is pointless.

@spiderguy84
Copy link

Guys.
But if you use "homebridge-camera-ffmpeg" plugin in the newest version you can add in JSON config
"doorbell": true
"switches": true

which shows dummy switch for doorbell so fighting with this plugin at this moment is pointless.

Could you use some English that makes sense? We are talking about FFMPEG, and you bring up dummy switches?

@spiderguy84
Copy link

On which operating system are your homebridge running ?

If it is a Linux flavour, you could have some version (not the one used by homebridge-camera-ffmpeg) of ffmpeg installed (in a location referred to by PATH) and this version is used by homebridge-videodoorbell but does not work anymore for some reason.

Synology DS 218+

@UKenGB
Copy link

UKenGB commented Jan 4, 2021

I am also suffering occasional type 1 errors from ffmpeg.

Using this plug-in with a HIKvision DS-HD1 and snapshots are showing OK, but live video is dreadful. Any movement in the field of view creates blocks on screen in that area and that can spread to most of the screen. But when first trying to view Live, the window sometimes just stays black and the HomeBridge log shows ffmpeg failed with Type 1 error.

These cameras have a strange 1536x2048 resolution, but whatever I put in the config, Homebridge logs show it is trying to stream 1280/720@299kbps. I need to be able to stream at the full resolution but cannot seem to be able to achieve that and half the time ffmpeg just crashes.

I have the latest stable version of ffmpeg on the Homebridge server (Mac) and neither this plug-in nor the ffmpeg-camera plug-in (also installed) seem to contain ffmpeg, so presumably it must be using the 'system' one on the PATH (usr/local/bin in fact). If not, which is it using? And why is it crashing and how can I obtain full quality video from this camera?

@Samfox2
Copy link
Owner

Samfox2 commented Jan 4, 2021

Those are the resolutions supported by homekit (from hap-nodejs):
[1920, 1080, 30], // width, height, framerate
[1280, 960, 30],
[1280, 720, 30],
[1024, 768, 30],
[640, 480, 30],
[640, 360, 30],
[480, 360, 30],
[480, 270, 30],
[320, 240, 30],
[320, 240, 15], // Apple Watch requires this configuration (Apple Watch also seems to required OPUS @16k)
[320, 180, 30]

All other resolutions can cause issues and need to be transcoded.

@UKenGB
Copy link

UKenGB commented Jan 5, 2021

Ok thanks. Looks like I need to figure out the ffmpeg settings to do that.

What ffmpeg does this plug-in use? I couldn't find one built-in. Does it just use whatever is available on the PATH?

@Samfox2
Copy link
Owner

Samfox2 commented Jan 5, 2021

Yes, the first ffmpeg binary that is found is used.

@UKenGB
Copy link

UKenGB commented Jan 5, 2021

Thanks. I'm presuming I can supply ffmpeg with options to transcode to what I need?

@UKenGB
Copy link

UKenGB commented Aug 9, 2022

All this time later and still keep getting ffmpeg crashing with Type 1 error. Nothing I have tried seems to make any difference. But…

I set up the same doorbell/camera in 'homebridge-camera-ffmpeg' with minimal configuration and it just works. Try that same config. for this plug-in and again 'Type 1 error'.

Since neither plug-in has 'video processor' specified, they must both be using the same ffmpeg (although this plug-in doesn't report the version whereas 'homebridge-camera-ffmpeg' does).

So, same config, same ffmpeg, but this plug-in crashes and 'homebridge-camera-ffmpeg' doesn't. Which means this plug-in is throwing options (that we cannot control) at ffmpeg which cause it to crash. Is it still being maintained? Any possibility of looking at what this plug-in is doing to cause this 'currently insurmountable' problem.

@dpamping
Copy link

how can I connect a Ezviz dp1c?

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

9 participants