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

ffmpeg EACCES error #561

Closed
muxa opened this issue Jun 24, 2020 · 4 comments
Closed

ffmpeg EACCES error #561

muxa opened this issue Jun 24, 2020 · 4 comments
Labels

Comments

@muxa
Copy link

muxa commented Jun 24, 2020

Describe The Bug:
Snapshot or video stream fails.

To Reproduce:
Every time I open the camera in Home app

Expected behavior:
Snapshots should show in the app and video stream in the app when opening the camera.

Logs:

[6/24/2020, 9:08:27 PM] [Security Cameras] Snapshot from Driveway at 480:270
[6/24/2020, 9:08:27 PM] [Security Cameras] An error occurred while making snapshot request
[6/24/2020, 9:08:35 PM] [Security Cameras] [FFMPEG] Failed to start stream: spawn /homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg EACCES

Homebridge Config:

{
    "bridge": {
        "name": "Homebridge 9347",
        "username": "0E:BC:CB:CA:93:48",
        "port": 53253,
        "pin": "031-45-154"
    },
    "platforms": [
        {
            "name": "Security Cameras",
            "cameras": [
                {
                    "name": "Driveway",
                    "manufacturer": "Reolink",
                    "model": "RLC-410-5MP",
                    "firmwareRevision": "v2.0.0.448_19061407",
                    "videoConfig": {
                        "source": "-rtsp_transport tcp -re -i rtsp://motion:[email protected]:554/h264Preview_01_sub",
                        "stillImageSource": "-i http://192.168.1.59/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=&user=motion&password=motioneye",
                        "maxStreams": 2,
                        "maxFPS": 15,
                        "maxBitrate": 300,
                        "vcodec": "copy",
                        "videoFilter": "none",
                        "audio": false,
                        "debug": false
                    }
                }
            ],
            "platform": "Camera-ffmpeg"
        }
    ],
    "accessories": []
}

Screenshots:
n/a

Environment:

  • Node.js Version: v12.18.1
  • NPM Version: v6.14.5
  • Homebridge Version: 1.1.1
  • Homebridge Camera FFmpeg Version: 2.0.0
  • Homebridge Config UI X Plugin Version: 4.23.0
  • Operating System: Docker on Raspberry Pi 4
@donavanbecker
Copy link
Contributor

Closing this per #554.

@muxa
Copy link
Author

muxa commented Jul 9, 2020

I have upgrade to latest v2.1.1 of the plugin and this issue still exists.

Taking snapshot:

[7/10/2020, 7:10:12 AM] [Security Cameras] Snapshot from Driveway at 480:270
[7/10/2020, 7:10:12 AM] [Security Cameras] ffmpeg -i http://192.168.1.59/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=&user=motion&password=motioneye -frames:v 1 -f image2 -
[7/10/2020, 7:10:12 AM] [Security Cameras] An error occurred while making snapshot request
[7/10/2020, 7:10:12 AM] [Security Cameras] Error: spawn /homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'EACCES',
  code: 'EACCES',
  syscall: 'spawn /homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg',
  path: '/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg',
  spawnargs: [
    '-i',
    'http://192.168.1.59/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=&user=motion&password=motioneye',
    '-frames:v',
    '1',
    '-f',
    'image2',
    '-'
  ]
}

Opening video stream:

[7/10/2020, 7:13:50 AM] [Security Cameras] Starting Driveway video stream (1280x720, 15 fps, 299 kbps, 1316 mtu)...debug enabled
[7/10/2020, 7:13:50 AM] [Security Cameras] FFMPEG command: ffmpeg -rtsp_transport tcp -re -i rtsp://motion:[email protected]:554/h264Preview_01_sub -map 0:0 -vcodec copy -pix_fmt yuv420p -r 15 -f rawvideo -preset ultrafast -tune zerolatency -b:v 299k -bufsize 598k -maxrate 299k -payload_type 99 -ssrc 1000798 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params 3Con3pZ/JYyFhyu31OqXXcW60xyDcMMCky+JUZWs srtp://192.168.1.8:56951?rtcpport=56951&localrtcpport=56951&pkt_size=1316 -loglevel debug
[7/10/2020, 7:13:50 AM] [Security Cameras] [FFMPEG] Failed to start stream: spawn /homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg EACCES
[7/10/2020, 7:13:50 AM] [Security Cameras] Stopped Driveway video stream!

@muxa
Copy link
Author

muxa commented Jul 17, 2020

It turned out to be a disk permission issue (the mounted disk had noexec flag). I removed it following this: https://forums.plex.tv/t/pms-cannot-transcode-any-file-conversion-failed-the-transcoder-crashed-or-failed-to-start-up/227898/9

@Sunoo
Copy link
Collaborator

Sunoo commented Jul 17, 2020

Glad you were able to solve it.

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

No branches or pull requests

3 participants