Comments (4)
I'm not sure, but I think some reverse-engineering like sniffing API calls between the official tool and camera is possible because MTP is well-known especially in Windows world.
Okay, thank you for your answers :) Have a nice weekend!
from mtplvcap.
Now it's time to unveil the secret gem ... which is not that secret haha
The source I found and learned so many things from is listed in the Credit section of the readme.
go-mtpfs
mtplvcap started from forking go-mtpfs which implements MTP communication over famous libusb. This software is awesome not only for implementing MTP, but having const.go that contains so many consts extracted from libmtp. munge.py converts a header in libmtp into a Go code.
So why consts are awesome? Please take a look at this line for example. OC
stands for "operation code" so you can make an operation call with this enum. You'll easily guess what's going to happen by to call OC_NIKON_StartLiveView
!
MTP devices have "properties" that can be read and written. The ID of them is called DPC (device property code) and these are also listed in the same file.
So the primitive things mtplvcap do here are: call commands and read/write properties described in const.go. I did some guessing game here with some trivial try-and-errors to open the shutter and take LV frames.
digiCamControl
Simple operations like opening the shutter and fetching the frame stream were done pretty easily. Painful parts were left next; 1. to control so many knobs on the DSLR like exposure and f-value. 2. to handle the difference of so many models ranging from 2000s to 2020s.
Implementing all of them without knowledge was impossible. So, I looked for other implementations that do the things. One of them was digiCamControl that covers massive number of DSLRs so I learned so many from here.
Experiment and contribution
All I had was a Nikon D5300 then so I went to a camera store to test my program. Luckily, a store clerk allowed me to do so (not knowing I'm doing some dev ... I never lied, but I said "I want to try tethered shot" lol). The confirmed model list in readme with my name other than D5300 was all tested in the store.
And of course, mtplvcap would have never grown like today without contributions from all over the world. Issue author and I tried so many things so get it working.
from mtplvcap.
digiCamControl
Simple operations like opening the shutter and fetching the frame stream were done pretty easily. Painful parts were left next; 1. to control so many knobs on the DSLR like exposure and f-value. 2. to handle the difference of so many models ranging from 2000s to 2020s.
Implementing all of them without knowledge was impossible. So, I looked for other implementations that do the things. One of them was digiCamControl that covers massive number of DSLRs so I learned so many from here.
How did digiCamControl implemented this propietary protocol without docs?
from mtplvcap.
I'm not sure, but I think some reverse-engineering like sniffing API calls between the official tool and camera is possible because MTP is well-known especially in Windows world.
from mtplvcap.
Related Issues (20)
- Sometimes SIGINT does not close the shutter HOT 2
- SIGSEV with binaries and own build HOT 4
- "-max-resolution" not workig with some models HOT 27
- Doesn't build HOT 6
- Nikon D5000 High Res not working HOT 1
- Camera model matching doesn't work for Z cameras HOT 2
- Error on Nikon D3100 HOT 5
- [Report] Nikon Z6 ii high(er) resolution works HOT 1
- Does not work on macOS Ventura 13.1 HOT 1
- Z50 hi-res report HOT 2
- failed to detect MTP devices: could not open 04b0:0448 HOT 3
- [macos]pkg-config: exec: "pkg-config": executable file not found in $PATH HOT 3
- Doesn't work with Z f HOT 3
- Unable to use OBS virtual camera HOT 2
- -max-resolution not working on D3500 HOT 2
- support? HOT 1
- Stream to browser without OBS? HOT 1
- Confirmed on Nikon D810 HOT 3
- Not working a lot of the time HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mtplvcap.