Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neos SmartCam #10

Open
jgrob1 opened this issue Jun 13, 2019 · 5 comments
Open

Neos SmartCam #10

jgrob1 opened this issue Jun 13, 2019 · 5 comments

Comments

@jgrob1
Copy link

jgrob1 commented Jun 13, 2019

Hi,

I think this is a Xiaomi clone too, very similar to Wyze... Would the boot loader for Wyzecam V2 128Mb work?

The technical sheet says 128MB.

Just don't want to brick a brand new toy!

@susadmin
Copy link

+1 for an answer to this. Not too sure what the difference is. The Wyzecams and the 128Mb Dafang all seem to want the same bootloader but it would good to get some reassurance that dafang_128mb_v2.bin is the right file. I have checked the memory from the cmdline and it is 128M.

My command line reads:

console=ttyS1,115200n8 mem=104M@0x0 ispmem=8M@0x6800000 rmem=16M@0x7000000 init=/linuxrc rootfstype=squashfs root=/dev/mtdblock2 rw mtdparts=jz_sfc:256k(boot),2048k(kernel),3392k(root),640k(driver),4736k(appfs),2048k(backupk),640k(backupd),2048k(backupa),256k(config),256k(para),-(flag)

Thanks for the great project!

@daaaaan
Copy link

daaaaan commented Jun 28, 2019

I took the plunge. Figured if I bricked it I'd return it.

dafang_128mb_v2.bin works with the Neos. :) Also the other one does too which I found out accidentally. I'm in "glorious" hd now :)

@matbrewer396
Copy link

do you guys use RSTP, just wondering what video settings you found best with HD vid?
Mine seems to have quite a delay and fps is really low, like 0.3fps if that

@jontybrook
Copy link

For the benefit of anyone also doing this on a NeosCam, and for my own notes; I am going to document the process for flashing U-Book on a "Neos SmartCam"

My particular device labelled on the bottom with Model: NS-CAM-02 and was purchased from Amazon in the UK. I've set up Dafang on it and am now looking to enable full HD streaming from it by flaing U-Boot bootloader...

Flashing U-Boot

As per the instructions here the below screenshots show the process after SSHing into the device.

First I check the device RAM, then WGET the dafang_128mb_v2.bin file from:

https://github.com/Dafang-Hacks/uboot/raw/master/compiled_bootloader/dafang_128mb_v2.bin

Note that the link GitHub gives you if you use the "view raw" link is slightly different to the above (it uses query params to return the raw bin, whereas the above address contains "raw" in the path... it's important that you use the above link which will return the raw bin via wget

I then validate the MD5 hash, erase the the flash memory, copy in the new bootloader, copy the uEnv.txt file and finally reboot the device...

image

Enabling FullHD

Following reboot, the LED on the rear of the device is solid blue, indicating it successfully found the custom uEnv.txt boot configuration.

I SSH back into the camera and edit the uEnv.txt bootargs line. Below shows the contents of uEnv.txt following the changes. Note that in the instructions it mentions change the boot-line - I found this line to actually be called bootargs

Do not copy this config.. read below first!
image

I then ran reboot now and the device appeared to reboot (lost ping, heard the IR shutter click)... but it didn't boot. The blue LED was on solid. I power-cycled the device... and the same... just a solid blue light. Uh-oh...

Putting the SD card into my laptop and inspecting the uEnv.txt file revealed the issue... I had missed the "M" after the 87 on the mem boot argument. I fixed this. The valid bootargs line in uEnv.txt now reads:

bootargs=console=ttyS1,115200n8 mem=87M@0x0 ispmem=9M@0x5700000 rmem=32M@0x6000000 init=/linuxrc rootfstype=squashfs root=/dev/mtdblock2 rw mtdparts=jz_sfc:256k(boot),2048k(kernel),3392k(root),640k(driver),4736k(appfs),2048k(backupk),640k(backupd),2048k(backupa),256k(config),256k(para),-(flag)

Put the SD card back in the device and now it boots! cat /proc/cmdline indicates the change worked..

image

After some experimentation, I've found for my use case H264 VBR provides the most consistent frame rate at the cost of some artefacting in complex scenes..

image

@jontybrook
Copy link

do you guys use RSTP, just wondering what video settings you found best with HD vid? Mine seems to have quite a delay and fps is really low, like 0.3fps if that

Depends on your use case...

If artifacting is a problem for you then try MJPEG codec with CBR at 12000Kbps - this should provide accurate images but frame rate may be low.

If you want higher frame rate at the expense of potential artifacting, then H264 may be the best choice for you although due to the limited computing resources available on the Neos cam, complex scenes do lead to considerable artifacting.

To help you choose between codecs, consider the following:

  • H264 is CPU-intensive to encode. The Neos cam will struggle and this will manifest as visual artefacts in the stream.

  • H264 is less CPU-intensive to decode, so suitable if you have a low-powered client.

  • H264 requires around 4Mbps of bandwidth for a 1080p stream, so suitable if you are limited on bandwidth.

  • MJPEG is a much more simple codec (it's essentially just a stream of JPEG images) so it is less CPU intensive to encode; therfore you won't get artefacting but will get a lower frame-rate.

  • MJPEG is more CPU intensive to decode on the client side.

  • MJPEG will require around 12Mbps of bandwidth for a 1080p stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants