fpv-wtf / voc-poc

A PoC for USB video out from the DJI FPV Goggles, inspired by The Video Out Club
MIT License
431 stars 80 forks source link

Is this supposed to work on macOS? #2

Closed agoodshort closed 3 years ago

agoodshort commented 3 years ago

First of all, great job on that. Big big kudos to y'all! Maybe it was just not designed to work on macOS, but somewhere on the README.m you do mention that if not working on Windows, it might miss some drivers so I thought i'd try on macOS. I did not troubleshoot much this error, I kinda wanted to run it by you first.

node index.js -f outfile.bin

/Users/adrimac/Documents/GitHub/voc-poc/node_modules/bindings/bindings.js:135
  throw err;
  ^

Error: Could not locate the bindings file. Tried:
 → /Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/build/usb_bindings.node
 → /Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/build/Debug/usb_bindings.node
 → /Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/build/Release/usb_bindings.node
 → /Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/out/Debug/usb_bindings.node
 → /Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/Debug/usb_bindings.node
 → /Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/out/Release/usb_bindings.node
 → /Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/Release/usb_bindings.node
 → /Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/build/default/usb_bindings.node
 → /Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/compiled/15.7.0/darwin/x64/usb_bindings.node
 → /Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/addon-build/release/install-root/usb_bindings.node
 → /Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/addon-build/debug/install-root/usb_bindings.node
 → /Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/addon-build/default/install-root/usb_bindings.node
 → /Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/lib/binding/node-v88-darwin-x64/usb_bindings.node
    at bindings (/Users/adrimac/Documents/GitHub/voc-poc/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/usb.js:1:57)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:997:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/adrimac/Documents/GitHub/voc-poc/index.js:1:13)
    at Module._compile (node:internal/modules/cjs/loader:1108:14) {
  tries: [
    '/Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/build/usb_bindings.node',
    '/Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/build/Debug/usb_bindings.node',
    '/Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/build/Release/usb_bindings.node',
    '/Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/out/Debug/usb_bindings.node',
    '/Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/Debug/usb_bindings.node',
    '/Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/out/Release/usb_bindings.node',
    '/Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/Release/usb_bindings.node',
    '/Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/build/default/usb_bindings.node',
    '/Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/compiled/15.7.0/darwin/x64/usb_bindings.node',
    '/Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/addon-build/release/install-root/usb_bindings.node',
    '/Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/addon-build/debug/install-root/usb_bindings.node',
    '/Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/addon-build/default/install-root/usb_bindings.node',
    '/Users/adrimac/Documents/GitHub/voc-poc/node_modules/usb/lib/binding/node-v88-darwin-x64/usb_bindings.node'
  ]
}
j005u commented 3 years ago

Did you npm install? Did it finish without errors?

OS X should work fine.

dgtvc commented 3 years ago

OS X on Big Sur with m1 inside works fine ^^

shatiffconyers commented 3 years ago

can you better explain how to get it working on mac? or a step by step.. i'm new to this and struggling here...

dgtvc commented 3 years ago

Sorry, was late,

  1. Try to open terminal in repository folder
  2. Write: rm -rf node_modules
  3. Type: yarn, when on installing packages, yarn shows some errors paste it here, some we can check everything more
  4. And check basic commands from Readme.md, on main repository page

FYI: @shatiffconyers

OdoorX commented 3 years ago

I'm stuck, i'm on Mac with everything done from here https://gist.github.com/fichek/c69326dba7e5a9dfb6ecc2c9e4e93224

Air-di-000:voc-poc a000$ ls LICENSE.txt index.js magic.c package.json README.md install-scripts package-lock.json voc-poc Air-di-000:voc-poc a000$ npm install -bash: npm: command not found Air-di-000:voc-poc a000$

Any advice?

dgtvc commented 3 years ago

@OdoorX There was some an error with installing node on your PC, so just type this in your terminal: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

You must reopen terminal to make it working, so close whole terminal application.

Then open a new terminal and type: nvm install node

Then you should be able to rerun commands from step 5, skipping step 6, cause you have this repository already on your PC

OdoorX commented 3 years ago

@dgtvc many thanks, now the process in going and installed npm, but i have another problem..

Schermata 2021-05-12 alle 10 03 48

agoodshort commented 3 years ago

@dgtvc Thanks! Alright found my issue It was related to xcode. I recently updated macOS and xcrun was not updated properly I guess. My npm install was running fin. But when trying to do anything else with npm I'd have some errors like below:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools),
missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Resolution steps:

  1. $ rm -rf node_modules
  2. $ xcode-select --install
  3. $ npm install
agoodshort commented 3 years ago

@OdoorX You are missing the ffmpeg package. I personally installed it using homebrew $ brew install ffmpeg

dgtvc commented 3 years ago

For me brew didn't work out with ffmpeg :/ But i have working solution for this, if somebody have problem

OdoorX commented 3 years ago

@goodshort

I already did everything written inside here:

Schermata 2021-05-12 alle 10 15 25

So, i installed homebrew and then: 1)node 2)ffmpeg

But i get this error

OdoorX commented 3 years ago

https://github.com/fpv-wtf/voc-poc/issues/2#issuecomment-839566333

Me, please help! :)

dgtvc commented 3 years ago

@OdoorX try to:

  1. Go to: click me
  2. On every of left blocks with: ffmpeg..., ffprobe..., ffplay..., click download as zip, then open every zip file inside Downloads for extract everything, so in Downloads folder you will have files called ffmpeg,ffplay
  3. In terminal write something like this: sudo cp ~/Downloads/ff* /usr/local/bin this will copy binaries to executive folder on your PC

And then ffplay should work flawlessy!

OdoorX commented 3 years ago

@dgtvc dude.... thank you so much, you are great!! You solved the problem for every Mac user ;)

Schermata 2021-05-12 alle 10 28 22

agoodshort commented 3 years ago

@OdoorX If @dgtvc solution does not work for you. What's the output of $ brew info ffmpeg?

agoodshort commented 3 years ago

Closing the issue as everyone got sorted. Happy flying!