milkv-duo / duo-buildroot-sdk

Milk-V Duo Official buildroot SDK
411 stars 174 forks source link

Question: Autostart camera #143

Closed PaulaBras closed 1 month ago

PaulaBras commented 1 month ago

Heyho, I want to autostart the camera, but I am not really able to. I tried this:

[root@milkv-duo]~# cat /mnt/system/auto.sh
#!/bin/sh

# Put the program you want to run automatically here
#/mnt/system/blink.sh

export LD_LIBRARY_PATH=/mnt/system/lib

sleep 15 && sample_vi_fd /mnt/cvimodel/scrfd_768_432_int8_1x.cvimodel > /dev/null 2>&1 &

But it didn't work. When I run the command manually after the startup it will run in the background with no output etc. also after closing the shell session. Is there any more reliable way to autostart the camera?

Thanks in advance.

carbonfix commented 1 month ago

Please try using the absolute path for sample_vi_fd:

sleep 15 && /mnt/system/usr/bin/sample_vi_fd /mnt/cvimodel/scrfd_768_432_int8_1x.cvimodel > /dev/null 2>&1 &
PaulaBras commented 1 month ago

thanks that worked!