ottokiksmaler / nx500_nx1_modding

Samsung NX500 and NX1 Modding
GNU Affero General Public License v3.0
124 stars 42 forks source link

NXFiles site hosting various files including Service Manual with motherboard diagrams #127

Open amvzo opened 1 month ago

amvzo commented 1 month ago

I found this interesting as I had not completely come across anything else on all the info I've been reading about NX cameras. There may be some useful details especially around page 128 that can hopefully be useful in terms of how the camera communicates across the system and its chips.

https://nxfiles.nx.tc/files/NX1/Service-Manual/NX1_Service-Manual.pdf

One thing that I am after that I keep trying to find a work around from is the PTP/MPT for webcam streaming or at the least using Live Camera and CamTwist with the Syphon function to get a video feed to OBS software for streaming.

I see there is something coming through on the computer in high quality as the computer storage was dropping in gigs as I selected the NX1 on the Camera Live app (even though it showed an error and blank/black screen) it seems that there is something coming through on the USB cable.

I know it's unlikely I will figure it out. But I'm messing around with telnet and have the hack for most of the functions. Just want to get the USB3 to work for streaming.

Thank you for all the work everyone has done for this camera system. Bought mine in 2018 and it is still amazing in 2024 and beyond!

My next attempt will be to build the open source code and see what I can find out or do.

Cheers!

Cheers!

ge0rg commented 1 month ago

Thanks for the link, where did you find it? Page 128 is the back cover of the manual, and I haven't seen anything in it relevant for USB or streaming. For the NX1, I think the most robust streaming would be to get a 20$ HDMI-to-USB capture dongle (watch out for the ones that claim to do 1080p but interpolate instead), and the second best option is probably using WiFi and https://mewlips.github.io/nx-remote-controller-mod/

amvzo commented 1 month ago

I found it on this page at the very bottom.

https://github.com/fritzchentastig/NX300M-MFW

And as I was going through it, I was looking at the Service Manual and came across the schematic for the motherboard and the chips and how they communicate. I thought it interesting.

I also noticed that the total pixels of the camera are 30.7MP and that there is something like 8GB of either storage or RAM I couldn't totally tell from the service manual. But interesting to look at.

Thank you for your quick response and interest. I have been going down this rabbit hole the last few days and it just goes deeper and deeper the more I search.

I also noticed that Vim is included in the OS when I was in the Telnet and I wondered if one could just write files to the system that way. I think that's been mentioned. But either way it's super interesting. I wanna run a VM of Ubuntu to mess with the source code that Samsung released. I'm wishing USB PTP/MPT to OBS could be possible.

Anyway I'll keep playing and researching and sharing.

ge0rg commented 1 month ago

I wouldn't be surprised if it's actually 8GB of RAM; the camera needs a huge buffer to do high-speed bursts before converting and compressing them to SRW/JPG and storing them, and it's usual that a part of the pixels are cut off at the corners, so 30MP sounds valid as well.

Which parts of the rabbit hole are you especially interested in? I have a series of blog-posts about various aspects of the NX world at https://op-co.de/blog/tags/samsung-nx/ and feel free to ask me specific questions beyond those topics.

This is the first time I hear of using PTP/MTP to stream live video, AFAIK it's only for transferring files from the SD card. As I said, streaming is probably best done using HDMI-to-USB or the NX remote controller mod.

Implementing a UVC (USB video class) device would require significant patching of the kernel and creating a driver that would access the DRIMe5 photo buffer and provide the data to a USB host; given that the DRIMe5 is not documented, this would require significant reverse-engineering of the closed source di-camera-app process running on the camera that's handling the actual camera UI.

amvzo commented 1 month ago

Thanks for sharing the link to your site. I actually came across the archeology page but had not seen the other links.

My rabbit hole and reason I feel that it should be possible to do a stream from USB is that the Samsung Remote Studio App on Windows would give a live view of the camera which some were able to use the app to do a screen capture with the OBS software. And on Mac there is this App called Camera-Live (v13) that basically gives a pass through to this other app called CamTwist which uses an Apple Script called Syphon that siphons the video feed from the camera to the OBS streaming software. So in my mind it should totally be doable. I just don't own any windows machine nor can I get the Samsung Remote Studio app from anywhere. Seems odd that there is nowhere to download it. But anyway I might be able to run that app using Wine to wrap the .exe to run on Mac. First I gotta find it.

I will go through your blog and just check out stuff there. See what else I can learn.

I would love to see:

• removing Noise Reduction on all video recording.

• It would also be awesome to add a LUTs to the system

• It would be even more awesome to add a Log profile

• It would be awesome to have uncompressed 14bit Video like in Magic Lantern For canons.

• I wonder if there is a way to make a 24-30fps MotionJpeg using the electronic shutter that can shoot 30fps and convert it into a Video format that is uncompressed RAW 28MP images in 14Bit quality.

• WiFi streaming to a custom HMTL site where maybe a phone or tablet or computer can be a remote viewer.

ajavamind commented 1 month ago

thanks @amvzo Your link is a goldmine to much more. https://nxfiles.nx.tc/ https://nxfiles.nx.tc/files/

amvzo commented 1 month ago

@ajavamind Thank you, I just came across it through someone else's GitHub research on the NX300. I am merely seeking any and all info I can find to hopefully find answers or workarounds.

I am so happy there are still folks interested. I know it's been years but there seems to be lots of possibilities still left to be uncovered and or created. I just hope I can add anything to the community as all of you have given already so much! Thank you!

amvzo commented 1 month ago

Thanks for the link, where did you find it? Page 128 is the back cover of the manual, and I haven't seen anything in it relevant for USB or streaming.

For the NX1, I think the most robust streaming would be to get a 20$ HDMI-to-USB capture dongle (watch out for the ones that claim to do 1080p but interpolate instead), and the second best option is probably using WiFi and https://mewlips.github.io/nx-remote-controller-mod/

It seems like this (mewlips) would be a solution to stream over wifi and then do a screen capture with OBS software.

The HDMI to USB solution would likely be the best route but I have heard there is a lag /latency that Makes it hard to stream live with it.

ge0rg commented 1 month ago

My rabbit hole and reason I feel that it should be possible to do a stream from USB is that the Samsung Remote Studio App on Windows would give a live view of the camera which some were able to use the app to do a screen capture with the OBS software.

I don't own the NX1, only the NX500, and that doesn't support SRS. You could create a Windows VM (that also has the benefit that you can pass-through USB into it and have the VM host sniff the USB traffic for analysis!), and install SRS. It's also available from NXfiles: https://nxfiles.nx.tc/files/Software-Windows/SamsungRemoteStudio/ (seems to be Windows-only).

• removing Noise Reduction on all video recording. • It would also be awesome to add a LUTs to the system • It would be even more awesome to add a Log profile • It would be awesome to have uncompressed 14bit Video like in Magic Lantern For canons. • I wonder if there is a way to make a 24-30fps MotionJpeg using the electronic shutter that can shoot 30fps and convert it into a Video format that is uncompressed RAW 28MP images in 14Bit quality.

I don't think any of those are possible without mutltiple months of working time effort, or even at all. Changing the DSP processing pipeline requires knowledge far beyond what's documented in the Service Manual. You need to know the DSP registers and to reverse-engineer the camera application on the camera to reprogram them accordingly. Part of that effort was done to change video resolutions in nx-patch, but this is only about resolutions and bitrates, not about pixel encoding.

• WiFi streaming to a custom HMTL site where maybe a phone or tablet or computer can be a remote viewer.

nx-controller-mod runs a webserver on the camera, which you can access from the local WiFi.

The HDMI to USB solution would likely be the best route but I have heard there is a lag /latency that Makes it hard to stream live with it.

I don't think that it adds significant lag when compared to direct USB streaming, but I haven't benchmarked it either.

amvzo commented 1 month ago

Thank you for pointing out the nxfiles have the remote studio totally missed that!!!

Hopefully I can get the app and wrap it with Wine to run it on Mac and be able to sniff out the USB signal. If I don't have to buy anything that would be ideal!

I totally understand that my dream changes are very likely not possible without significant effort and know how. I wondered though if someone who was familiar with the Magic Lantern software might attempt to copy what can be copied and apply/adapt it to the NX system. But I know that sounds easier said than done.

In either case I'm super happy that there are still folks here interested and connecting to keep the NX system alive!

Thank you all!

amvzo commented 1 month ago

Btw the Camera Live app is available through:

https://github.com/v002/v002-Camera-Live

Version 12 and 13 are the last updates from 2020 and are alpha releases but they carry with the libgphoto2 which recognizes the NX1 but gives an error when attempting to siphon the video stream.

The second app CamTwist is available at : https://camtwiststudio.com using the Syphon Effect (double click on it) and selecting Camera Live from the right drop down) should pick up any video signal from NX or most any camera.

And OBS for free online streaming to various platforms : https://obsproject.com

And once running in the sources select Syphon Client and CamTwist in the drop down to bring in whatever Camera Live is feeding to CamTwist.

If anyone wants to try with other models of NX to see if they get any further. I have been able to see that there is actually something coming through in terms of space as my hard drive space went from 400gb to near zero before the system told me I was running out of space. But as soon as I quit the Camera Live the GB on my computer went back to 400. Kinda odd.

If anyone has any ideas on this or wants to explore it. I will be messing around with it.

Cheers!

ge0rg commented 1 month ago

Camera-Live is a tool for a different camera brand. If you don't have any software that will stream live video from the NX1 as-is, then the camera probably doesn't support it.

amvzo commented 1 month ago

I get that it says it's made for Canon specifically but apparently it does recognize many other cameras and it uses the libgphoto2 plugin which does recognize the NX1 along with many others. I downloaded the source code to the Camera live and had small hopes i could maybe find a way to modify something to make it work. The App shows the NX1 when running, and information seems to be coming though by the Gigs bit its just a black screen so far.

anyway i don't mean to annoy continuing with this idea. I got somewhat obsessed with figuring it out, though i recognize there may not be a solution that i can figure out. but im having fun exploring and tinkering. And along the way i will share anything that i find or that can be of use.

amvzo commented 1 month ago

Came across this page and though it might be for development of android devices, it seems it might be still based on Tizen and for the control of ARM chips.

https://docs.samsungknox.com/devref/knox-sdk/reference/native/html/classknoxremotedesktop_1_1IRemoteDesktop.html

amvzo commented 1 month ago

Was also checking out the info inside of the Libgphoto2 Github and came across the Samsung.c file. I wonder if there is any information in the code here that could help to bring the NX family of cameras closer to being able to USB Streaming. https://github.com/gphoto/libgphoto2/blob/master/camlibs/samsung/samsung.c

I also was able to get some information out of the https://github.com/v002/v002-Camera-Live app where I was able to get some info from the App itself as it tried to run (while recognizing the NX1) but getting an error in terms of running it.

Samsung NX1 / ptp2 / porttype:0x04 / ops:0000 / file:0x0a / folder:0x0e main WINDOW / readwrite / Camera and Driver Configuration /
{ actions SECTION / readwrite / Camera Actions /
{ opcode TEXT / readwrite / PTP Opcode / / 0x1001,0xparam1,0xparam2 } (actions) settings SECTION / readwrite / Camera Settings /
status SECTION / readwrite / Camera Status Information /
{ serialnumber TEXT / readwrite / Serial Number / / SAMSUNG Digital Camera-157291271 manufacturer TEXT / readwrite / Camera Manufacturer / / SAMSUNG Electronics Co. Ltd. cameramodel TEXT / readwrite / Camera Model / / SAMSUNG Digital Camera deviceversion TEXT / readwrite / Device Version / / None vendorextension TEXT / readwrite / Vendor Extension / / microsoft.com:1.0; microsoft.com/WMPPD:11.0; microsoft.com/WMPPD:10.0; tizen.org:2.3; } (status) imgsettings SECTION / readwrite / Image Settings /
capturesettings SECTION / readwrite / Capture Settings /
other SECTION / readwrite / Other PTP Device Properties /
{ d401 TEXT / readwrite / Synchronization Partner / / Longhorn Sync Engine d402 TEXT / readonly / Friendly Device Name / / AP_NX1(A0:E0:27) d404 TEXT / readonly / PTP Property 0xd404 / / 1 d407 TEXT / readonly / Perceived Device Type / / 1 } (other) } (main)

Not sure if that gives anyone any ideas, but I will try and share this on the Camera Live page, because it seems we aren't too far from gaining access...

amvzo commented 1 month ago

From this last post, I picked out the tizen.org:2.3 and it led me to this page: https://review.tizen.org/git/ where I think it might have found some of the source files, and might be useful for looking into the various folders and files that come with the Tizen system that the NX1 runs. I guess its the same as opening up the source files that Samsung released, but maybe still helpful. At least for me working on Mac I cannot open the Source files since they are meant to be opened on Windows. Anyway still just messing about.

Cheers!