Closed maxammann closed 2 years ago
In fact I found out what the problem is :)
On the Z6, the datatype is u8:
payload := struct {
Resolution uint8
}{
Resolution: uint8(3),
}
Many thanks for the report and POC 👍 I'll merge your changes somehow, like adding a quirk flag ;) I leave here opened until then.
Are you sure this is a quirk? With which Nikons did you test the 64bit value?
D500, D850, and D7500 want 64bit value and I confirmed it works.
If the newer models incl. Z6 and the brothers want 8bit, it's not a quirk specific to Z6 and I'll add a new value like ResolutionValueType
in the mtp.ModelMap
struct.
(Extra story: I confirmed the max resolution feature in a camera store with permission from a clerk and I found that it doesn't work with Z6 and similar models. I didn't have a courage to ask clerk for a permission to debug my code in the store so I left there 😅)
D500, D850, and D7500 want 64bit value and I confirmed it works. If the newer models incl. Z6 and the brothers want 8bit, it's not a quirk specific to Z6 and I'll add a new value like
ResolutionValueType
in themtp.ModelMap
struct.(Extra story: I confirmed the max resolution feature in a camera store with permission from a clerk and I found that it doesn't work with Z6 and similar models. I didn't have a courage to ask clerk for a permission to debug my code in the store so I left there 😅)
Haha, nice! Do you know that you can get the documentation from nikon for all cameras? :) Im not sure whether one is allowed to use them though.
Do you know that you can get the documentation from nikon
That's what I'm negotiating with Nikon for. Here is the story. I'm asking a Nikon guy to re-release the SDK under an OSI-approved license.
Their public SDK may give me something interesting, but it's licensed under a proprietary agreement that is considered not to be compatible with GPL.
Sorry for being inactive, The fix is merged in #57 . mtplvcap now transmits an uint8 value for the newer models incl. Z6.
No worries :) thank you for your project!
Will test next week
Hi @puhitaku I can confirm that this doesn't work on D3500:
maybe #57 fixes it?
Thank you for this project, I love it!
Thanks for the report fedegratti-san, I suspect that all Nikon needs uint8 (the fix introduced in #57) in the end so I'm going to test it in a week or so. Please wait for a while and I'll mention you.
I get exactly the same log as fedegratti with a D3400.
When using master I get:
Awesome project thanks :)
Thank you everyone, now I identified the bug in changing the resolution and it is due to my untested change (Sorry for that! I have no new DSLRs capable of higher resolutions), so I fixed it now in #59 after a brief test in near camera shop.
Interestingly, the internal model name is different from what I expected e.g. Z7 II returns NIKON DSC Z 7_2
as its model name. And D3400 also differs too (its model name is NIKON DSC D3400
according to it while I expected "D3400").
Hi @puhitaku, thank you so much for your support!
I've just tested and it still not working on D3500:
I hope the above image helps. Also, if you need me to do some testing on my camera, we can do chat about it.
Lastly, do you have a place for donations? I love your work and I would like to give you something!
Cheers.
That's because the resolution value type is "falling back" (as you see in the log) to uint64 I guess and I added a tweak to use uint8 by default.
@fedegratti Could you pull the branch fix/resolution
and give it a try again?
do you have a place for donations? I love your work and I would like to give you something!
Thank you very much! Donation is very appreciated. The top page of mtplvcap and my GitHub profile page have a link to GitHub Sponsors and Patreon.
@fedegratti Could you pull the branch fix/resolution and give it a try again?
@puhitaku same issue. Is there a way to log more info? Maybe I can add more logs in the core.
Argh, I temporarily can't think of what to do next ... I should borrow a D3500 (or other model that causes the "closing connection").
Argh, I temporarily can't think of what to do next ... I should borrow a D3500 (or other model that causes the "closing connection").
We could also take a look at the specification. Im pretty sure thats legal.
According to some other project the D3500 is not capable of higher resolutions: https://github.com/dognotdog/ptpwebcam/blob/9f138716eaf1d14a3505f57b71480ab8577150e5/CAMERAS.md#aps-c--dx
for the d3300 im getting a similar error to the d3400
Hi @puhitaku, were you able to find a workaround for this issue?
@maxammann
According to some other project the D3500 is not capable of higher resolutions
If its max is 640x480, it actually is. But they described the resolution pair with parens. I'm not sure what it means.
@fedegratti Unfortunately, no :P
Is there a way to log more info?
mtplvcap is not so verbose even when all logging options are enabled because I preferred to debug it with an interactive debugger. I think I should improve and increase the log... At present, I'm pretty not sure how to remedy this and looking for a D3500 body.
Sorry for neglecting here. And thanks for kind donations.
@maxammann It's been a while, Z6 is confirmed to accept high resolutions according to a comment in #59 . The fixed version v1.5.1 is released. Thanks for providing me a POC!
Despite the issue being closed I assume this is the best topic to give resolution feedback for untested models, is that correct?
I just tried this out for my Z fc
. It works, max resolution is 1024x680. So a higher resolution is available, but it doesn't seem to have the full range the camera should be able to support.
@JobLeonard Hi Job, I appreciate your feedback. So glad to see that Z fc supports high-res!
I assume this is the best topic to give resolution feedback for untested models, is that correct?
Yes, commenting here and creating a new issue are the choices, and "it worked" things will come here since no further discussion is needed in general.
it doesn't seem to have the full range
It should be possible to transmit high-res frames like 1920x1080 at 30fps, but Nikon seems not to give LV more than a preview purpose.
Ah, so they distinguish the live view from their own "webcam" support? That explains it :)
Luckily 1024x680 is more than enough for my purposes, the image is so clean it's probably better than most people's HD webcams anyway ;)
And as a Linux user, thanks for writing this amazing piece of software!
Related: https://github.com/puhitaku/mtplvcap/issues/44
Switching to XGA does not work with mtplvcap. I also tested this with ptpwebcam on a Mac which actually worked.
I uploaded the camera info from ptpwebcam as
camera.txt
: camera.txtThis is from the log of mtplvcap