ge0rg / samsung-nx-hacks

Firmware Hacks for the Linux-based Samsung NX mirrorless camera models (NX300, NX2000, ???)
115 stars 11 forks source link

NX300M Live feed support #23

Open AKyzec opened 2 years ago

AKyzec commented 2 years ago

Hello

Hi I have this Samsung nx300m and was recently reading and looking at some of your work. I was wondering if you could make or find a way for me to get my camera to give me a live feed into my capture card instead of it being locked into playback mode.

Thanks

naums commented 2 years ago

Hello,

the cameras can produce a livestream over DLNA. I've started a python tool [1] for getting the camera in that remote viewfinder mode. I'm however quite unsure in which state that is, it's horribly small (480p I believe), and you'll have a few seconds delay on it.

Clean HDMI is an awful amount of work. I think if you give the camera app a modified libxrandr.so you could in theory have to mirror the camera screen over HDMI. Keep in mind though, that the camera screen is also quite small pixel-wise.

A different idea is to use a modified SD-card, that automagically takes a recorded movie in real-time and sends it over HDMI or USB or something. It must mock a real sd-card with FAT-filesystem for the camera though. To the best of my knowledge such a modified SD-card does not exist, only a few Wifi-ones seem to exist.

Have fun poking around though; I suspect that it isn't possible to get anything more than 480p live material out of that camera in real-time, if you don't want to build your own hardware.

[1] https://codeberg.org/snaums/nx300m-tools

Cheers.

AKyzec commented 2 years ago

thanks for letting me know I appreciate your response

Kyzec

On Sat, Jan 8, 2022 at 9:23 AM Stefan Naumann @.***> wrote:

Hello,

the cameras can produce a livestream over DLNA. I've started a python tool for getting the camera in that remote viewfinder mode. I'm however quite unsure in which state that is, it's horribly small (480p I believe), and you'll have a few seconds delay on it.

Clean HDMI is an awful amount of work. I think if you give the camera app a modified libxrandr.so you could in theory have to mirror the camera screen over HDMI. Keep in mind though, that the camera screen is also quite small pixel-wise.

A different idea is to use a modified SD-card, that automagically takes a recorded movie in real-time and sends it over HDMI or USB or something. It must mock a real sd-card with FAT-filesystem for the camera though. To the best of my knowledge such a modified SD-card does not exist, only a few Wifi-ones seem to exist.

Have fun poking around though; I suspect that it isn't possible to get anything more than 480p live material out of that camera in real-time, if you don't want to build your own hardware.

Cheers.

— Reply to this email directly, view it on GitHub https://github.com/ge0rg/samsung-nx-hacks/issues/23#issuecomment-1008070527, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJ2WU4KPFEGIUXMKBZZ5LLUVBXINANCNFSM5HFMEMJA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

hunkreborn commented 2 years ago

Well, Nx30 do have clean HDMI feature, I wonder if we're able to create a nx300 custom firmware using a modified version of di-app-camera-nx30. The problem is that by pushing a broken binary will brick the camera, that's how I got my NX2000 become a paper weight :(

naums commented 2 years ago

Hi.

I wouldn't recommend. You have to be very sure, that the image processor is at exactly the same addresses, the Linux kernel and dependencies are the same... Companies regularly sell similar hardware with different software to differentiate products, but I don't think it's that easy of flashing firmware B to camera A and get everything.

To the paperweight thing: The nx300 has two triangular contacts on the PCB according to the service manual. These can be shorted on bootup, then the processor should go into a special mode, where it tries to read a few things from SD card and flash the firmware image. Maybe it's similar on the nx2000. I believe this is a functionality of (maybe the second stage) bootloader, so if you break this, you only have JTAG (which I'm unsure it even exists) or desoldering the flash chip and programming it externally.

Cheers.

hunkreborn commented 2 years ago

Hi.

I wouldn't recommend. You have to be very sure, that the image processor is at exactly the same addresses, the Linux kernel and dependencies are the same... Companies regularly sell similar hardware with different software to differentiate products, but I don't think it's that easy of flashing firmware B to camera A and get everything.

To the paperweight thing: The nx300 has two triangular contacts on the PCB according to the service manual. These can be shorted on bootup, then the processor should go into a special mode, where it tries to read a few things from SD card and flash the firmware image. Maybe it's similar on the nx2000. I believe this is a functionality of (maybe the second stage) bootloader, so if you break this, you only have JTAG (which I'm unsure it even exists) or desoldering the flash chip and programming it externally.

Cheers.

Yes! You're absolutely right about all the address, it's not easy stuff. Samsung did not released the di-app-camera SDK nor it's source code/compiler, that way it becomes a real hacking issue. About the pins, unfortunately I've bricked it to a state where it wont even load the protocols that make use of those pins! I mean it wont even reacts to it anymore. Probably with a JTAG I would be able to push the firmware manually, sadly there is not enough documentation and my coding knowledge is not nearly close to make me build a handshaking program for it :(