Is there any jpeg capture (like snapshot) example with JX37 camera?

thansk for support in advanced, I saw couple examples for medial control in SDK,
but seem most sample are processing video streaming, is there snapshot example ?
I would like to capture one frame every 20ms and store a jpeg format.

thank you in advanced.

I checked Arduino(camera to lcd) and rtos SDK and I put same setting in both project.

Arduino Project is working well, but tried to implement same with rtos SDK and got fail.

the camera ctx in rtos is below (should be same as Arduino one)

with above, I did implement snapshot callback and send snapshot command during while loop.

seems snapshot is not triggered with rtos sdk.

I found out the debug messages are different

rtos sdk:

arduino debug:

I saw FW version are different and the heap size of VOE is big different also (11722496 and 7528192).

appreciated for your help and let me know if you need mroe information.

:waving_hand: Thanks for posting!

For documentation, SDK resources, FAQs, and community guidelines, please visit: here

For commercial users, if you would like to have dedicated technical support or to connect with us, please fill in the Private User Form

Happy building with Ameba!


:waving_hand: 感謝您的分享!

如需查閱技術文件、SDK 資源、常見問題及社群指南,請參考: 這裡

若您是商業用戶,希望獲得專屬技術支援或與我們聯繫,請填寫 Private User Form (商業用戶表單)

祝您使用 Ameba 開發順利!

Hi @sl526,

Have you tried this example?

You may need to uncomment line 37,
#define ENABLE_SD_SNAPSHOT //Enable the snapshot to sd card

thank you Pammy,

I think it should be still working w/o enabling SD storage and below is the debug message.

there is a thread to send CMD_VIDEO_SNAPSHOT every 10 sec and expect to see snapshot result

“printf(“snapshot size=%d\n\r”, jpeg_len);” → but I did not see this and it reset in 30 sec.

== Rtl8735b IoT Platform ==

[Normal mode]
BootFromNORFlash
[Start Boot ROM...]
=== Load PARTBL ===
=== Load Done ===
=== Load ISP_IQ ===
[fcs chk pass]
ISP_IQ @ 0x8461080, 0x58f80, 0x0
mfcs_data version 0x00010001
fcs_data version 0x00010101
=== Process ISP_IQ ===
=== Load Done ===
=== Load BL ===
[Image Start Table @ 0x18200]
=== Load Done ===

== Boot Loader ==
Nov  4 2025:14:24:05
=== Load FCS Para ===
=== Load Done ===
[crc pass]
=== Load ISP_IQ Sensor ===
ISP_IQ @ 0x8461080, 0x58f80
=== Process ISP_IQ ===
=== Load Done ===
=== Load FW1 ===
FW_ISP_IQ @ 0x8061080, 0x5af80
=== Process FW_ISP_IQ ===
DRAM_TYPE is DDR2 128MB.
ddr_freq = 533
VOE flash @ 0x80bc080, 0x82f80
FCS KM_status 0x00002081 err 0x0000200a
Wait KM fcs done 0 us
FCS TM_status 0x003f0000
store fcs data for application
It don't do the sensor i                            nitial process
RAM TM_STATUS 0x00bf1208 err 0x00001208
read fcs_status 0x000000bf
read fcs_stat                            us 0x000000bf
=== Process VOE IMG ===
[Image Start Table @ 0x20106200]
RAM Load @ 0x813f100->0x20106200, 0x6ac0
DDR Load @ 0x8146080->0x70100000, 0x1fc89e
=== FW Load Done ===

Boot Loader <==

== RAM Start ==
Build @ 23:24:32, Sep  7 2026

$8735b>interface 0 is initialized
interface 1 is initialized
cfg_size_lib = 124, cfg_size_user = 124

Initializing WIFI ...[Driver]: [HALMAC]
11692M HALMAC_MAJOR_VER = 1
HALMAC_PROTOTYPE_VER = 4
HALMAC_MINOR_VER = 20
HALMAC_PATCH_VER =
[Driver]: The driver include MP
[Driver]: Ver = libwlan:2026.07.27.15.54_b9.6_3985028b6cc47b5593d8544193444f6921                            2fa7e2
RFE type = 0
start_addr=(0x4000), end_addr=(0x8000), buffer_size=(0x4000), smp_number_max=(20                            48)

WIFI initialized
[Driver]: PSCAN_FAST_SURVEY channel: 1

[Driver]: set ssid [justin1219]
[Driver]: rtw_joinbss_cmd MGMT_FRAME_PROTECTION_OPTIONAL no pmf.
[Driver]: Bcn (ie: 266, rsn: 0, wpa: 0) ch: 1, seq: 3868, ts: 3016677069041

[Driver]: start auth to 4c:22:f3:86:01:07

[Driver]: auth success, start assoc
[Driver]: listen_interval: 10, bcn_interval: 100

[Driver]: association success(res=2)

[Driver]: set pairwise key to hw: alg:4(WEP40-1 WEP104-5 TKIP-2 AES-4)

[Driver]: set group key to hw: alg:4(WEP40-1 WEP104-5 TKIP-2 AES-4) keyid:2
(0) Scan: 1, Auth: 1, Assoc: 1, 4way: 1, connect: 1, reason: 0

Interface 0 IP address : 192.168.1.108
[LwIP_DHCP] dhcp offered_t0_lease: 259200
init_thread(59), Available heap 0x69167a0
[video_voe_presetting] fps:30  w:1920  h:1080

voe heap size = 23314944
fwin(1),enc_en(0),IQ_OFFSET = 0x2b620
fwin(1),enc_en(0),SENSOR_OFFSET = 0x3b580
sensor id 2 iq_data 2b620 sensor_data 3b580

RTSP[0] port: 554
hal_voe_ready 0x0 0xbf1208
connect successful sta mode

read fcs_status 0x000000bf
[video_init] uvcd iq is null, use default.
[video_init] uvcd SNR is null, use default.
IQ:FW size (65376)
sensor:date 2026/6/29 version:RTL8735B_VOE_1.7.1.0
sensor:FW size (3848)
sensor timestamp: 2026/06/29
iq timestamp: 2024/03/21 11:26:35
voe_heap malloc 0x706fc120, size 23314944
ISP:1 ENC:1 H265:1 NN:1
hal_voe_ready 0x0 0xbf1208
voe   :RTL8735B_VOE_1.7.1.0
sensor:RTL8735B_VOE_1.7.1.0
hal   :RTL8735B_VOE_1.7.1.0
load time sensor:48us iq:815us itcm:0us dtcm:0us ddr:0us ddr2:0us
Set H264 default HIGH profile
rc_version RC_v1
[video_pre_init_procedure] START
hal_voe_send2voe too long 150797 cmd 0x00000206 p1 0x00000000 p2 0x00000000
VOE command 0x206 fail ret 0x0
[Driver]: TSFValue = 3016678093051, tsf = 0, shift_set= 0x8000, bcn int = 100

[APP] send snapshot cmd now
[APP] send snapshot cmd now

below is the uncommend function

Hi @sl526,

From your log, I noticed the following error:

VOE command 0x206 fail ret 0x0

May I confirm whether you have modified sensor.h and changed USE_SENSOR to SENSOR_F37?

I’ve attached my configuration for your reference.

This example uses a double-encoder configuration, which allows H.264 video streaming while also supporting snapshot capture.

The snapshot function is triggered using the AT command:

SNAP=SNAPS

After entering the AT command, you should see,

SNAP=SNAPS
capture_snapshot_cb snapshot size=58539
jpeg sd:/0.jpg

[MEM] After do cmd, available heap 85369824

SNAP=SNAPS
capture_snapshot_cb snapshot size=216051
jpeg sd:/1.jpg

[MEM] After do cmd, available heap 85369824

I uncommented #define ENABLE_SD_SNAPSHOT //Enable the snapshot to sd card to save JPEG into a SD card.

Hello @Pammy ,

Appreciated for your support !!

I did try to enable SD w/ FAT32 64G and SD mount is good. but still got fail.
I think VOE command 0x206 fail return 0x0 is when sending CMD_VIDEO_APPLY and
I saw this in other projects also.

=== Load Done ===
[crc pass]
=== Load ISP_IQ Sensor ===
ISP_IQ @ 0x8461080, 0x58f80
=== Process ISP_IQ ===
=== Load Done ===
=== Load FW1 ===
FW_ISP_IQ @ 0x8061080, 0x5af80
=== Process FW_ISP_IQ ===
DRAM_TYPE is DDR2 128MB.
ddr_freq = 533
VOE flash @ 0x80bc080, 0x82f80
FCS KM_status 0x00002081 err 0x0000200a
Wait KM fcs done 0 us
FCS TM_status 0x003f0000
store fcs data for application
It don't do the sensor i                              nitial process
RAM TM_STATUS 0x00bf1208 err 0x00001208
read fcs_status 0x000000bf
read fcs_stat                              us 0x000000bf
=== Process VOE IMG ===
[Image Start Table @ 0x20106200]
RAM Load @ 0x813f100->0x20106200, 0x6b00
DDR Load @ 0x8146080->0x70100000, 0x21bf6a
=== FW Load Done ===

Boot Loader <==

== RAM Start ==
Build @ 20:49:15, Sep  9 2026

$8735b>interface 0 is initialized
interface 1 is initialized
cfg_size_lib = 124, cfg_size_user = 124

Initializing WIFI ...[Driver]: [HALMAC]
11692M HALMAC_MAJOR_VER = 1
HALMAC_PROTOTYPE_VER = 4
HALMAC_MINOR_VER = 20
HALMAC_PATCH_VER =
[Driver]: The driver include MP
[Driver]: Ver = libwlan:2026.07.27.15.54_b9.6_3985028b6cc47b5593d8544193444f6921                              2fa7e2
RFE type = 0
start_addr=(0x4000), end_addr=(0x8000), buffer_size=(0x4000), smp_number_max=(20                              48)

WIFI initialized
[Driver]: PSCAN_FAST_SURVEY channel: 1

[Driver]: set ssid [justin1219]
[Driver]: rtw_joinbss_cmd MGMT_FRAME_PROTECTION_OPTIONAL no pmf.
[Driver]: Bcn (ie: 266, rsn: 0, wpa: 0) ch: 1, seq: 3080, ts: 3181688217828

[Driver]: start auth to 4c:22:f3:86:01:07

[Driver]: auth success, start assoc
[Driver]: listen_interval: 10, bcn_interval: 100

[Driver]: association success(res=2)

[Driver]: set pairwise key to hw: alg:4(WEP40-1 WEP104-5 TKIP-2 AES-4)

[Driver]: set group key to hw: alg:4(WEP40-1 WEP104-5 TKIP-2 AES-4) keyid:2
(0) Scan: 1, Auth: 1, Assoc: 1, 4way: 1, connect: 1, reason: 0
[video_voe_presetting] fps:30  w:1920  h:1080

voe heap size = 23314944

Interface 0 IP address : 192.168.1.108
[LwIP_DHCP] dhcp offered_t0_lease: 259200
init_thread(59), Available heap 0x68e7280
fwin(1),enc_en(0),IQ_OFFSET = 0x17940
fwin(1),enc_en(0),SENSOR_OFFSET = 0x2a260
sensor id 1 iq_data 17940 sensor_data 2a260

RTSP[0] port: 554
vfs_mutex init
connect successful sta mode

fatfs register
Enable the emmc interface 0
sd mount
Register disk driver to Fatfs.
FATFS Register: disk driver 0
SD_Init 0
Sanpshot with streaming init done
hal_voe_ready 0x0 0xbf1208
read fcs_status 0x000000bf
[video_init] uvcd iq is null, use default.
[video_init] uvcd SNR is null, use default.
IQ:FW size (76042)
sensor:date 2026/6/29 version:RTL8735B_VOE_1.7.1.0
sensor:FW size (3948)
sensor timestamp: 2026/06/29
iq timestamp: 0000/00/00 00:00:00
voe_heap malloc 0x70729520, size 23314944
ISP:1 ENC:1 H265:1 NN:1
hal_voe_ready 0x0 0xbf1208
voe   :RTL8735B_VOE_1.7.1.0
sensor:RTL8735B_VOE_1.7.1.0
hal   :RTL8735B_VOE_1.7.1.0
load time sensor:52us iq:936us itcm:0us dtcm:0us ddr:0us ddr2:0us
Set H264 default HIGH profile
rc_version RC_v1
[video_pre_init_procedure] START
hal_voe_send2voe too long 164569 cmd 0x00000206 p1 0x00000000 p2 0x00000000
VOE command 0x206 fail ret 0x0
[Driver]: TSFValue = 3181689241834, tsf = 0, shift_set= 0x8000, bcn int = 100

SNAP=SNAPS
Warn: get snapshot buffer failed

[MEM] After do cmd, available heap 85376640

below is the sensor config

tried with SNAP=SNAP and result as below

is there possible root cause ?
I did test my board with Arduino example and it is working, so assume my HW is good.

Hi @sl526 ,

Some possible root causes for VOE command 0x206 fail ret 0x0 can be found in this topic.

However, one common cause is that the sensor configuration is not set correctly.

Could you also share your amebapro2_sensor_set.json file (in \project\realtek_amebapro2_v0_example\GCC-RELEASE\build\application) after build so that I can verify the sensor configuration?

You can also share your code with us if you have made any modifications to the original example. This will help us compare the changes and identify any possible cause of the issue.

The correct command is SNAP=SNAPS.

Can I also confirm that you build the example using this repo?

Here’s my log for your reference.
Video_log.zip (1.8 KB)

Thank you!

hello @Pammy

thanks for you information, I tested with ameba-rtos-pro2 SDK 1.0.1 and it is working.

you can see the last message in below log and it does trigger the callback (snapshot size xxxxx).

I expect it might be caused by different FW version

Working one

  • voe :RTL8735B_VOE_1.6.1.0
  • sensor:RTL8735B_VOE_1.5.7.0
  • hal :RTL8735B_VOE_1.6.1.0

the problem I have is

  • voe :RTL8735B_VOE_1.7.1.0
  • sensor:RTL8735B_VOE_1.7.1.0
  • hal :RTL8735B_VOE_1.7.1.0

the working one in you log → I did not see voe/sensor/hal version, so I think you are using SDK 1.0.0. (I did test 1.0.0 and it is also working)

== Rtl8735b IoT Platform ==

[Normal mode]
BootFromNORFlash
[Start Boot ROM…]
=== Load PARTBL ===
=== Load Done ===
=== Load ISP_IQ ===
[fcs chk pass]
ISP_IQ @ 0x8461080, 0x2ff80, 0x0
mfcs_data version 0x00010001
fcs_data version 0x00010101
=== Process ISP_IQ ===
=== Load Done ===
=== Load BL ===
[Image Start Table @ 0x18200]
=== Load Done ===

== Boot Loader ==
Sep 5 2024:15:06:59
=== Load FCS Para ===
=== Load Done ===
[crc pass]
=== Load ISP_IQ Sensor ===
ISP_IQ @ 0x8461080, 0x2ff80
=== Process ISP_IQ ===
=== Load Done ===
=== Load FW1 ===
FW_ISP_IQ @ 0x8061080, 0x31f80
=== Process FW_ISP_IQ ===
DRAM_TYPE is DDR2 128MB.
ddr_freq = 533
VOE flash @ 0x8093080, 0x80f80
FCS KM_status 0x00002081 err 0x0000200a
Wait KM fcs done 0 us
FCS TM_status 0x003f0000
store fcs data for application
It don’t do the sensor i nitial process
RAM TM_STATUS 0x00bf1208 err 0x00001208
read fcs_status 0x000000bf
read fcs_stat us 0x000000bf
=== Process VOE IMG ===
[Image Start Table @ 0x20106200]
RAM Load @ 0x8114100->0x20106200, 0x6aa0
DDR Load @ 0x811b080->0x70100000, 0x1c89be
=== FW Load Done ===

Boot Loader <==

== RAM Start ==
Build @ 22:21:32, Sep 10 2026

$8735b>interface 0 is initialized
interface 1 is initialized
cfg_size_lib = 40, cfg_size_user = 40

Initializing WIFI …[Driver]: [HALMAC]
11692M HALMAC_MAJOR_VER = 1
HALMAC_PROTOTYPE_VER = 4
HALMAC_MINOR_VER = 20
HALMAC_PATCH_VER =
[Driver]: The driver include MP
[Driver]: Ver = libwlan:2025.03.21.12.05_b9.6_06f7974bb9cc2f7fefb9e8f91b9b69b198 66edf7
RFE type = 0
start_addr=(0x4000), end_addr=(0x8000), buffer_size=(0x4000), smp_number_max=(20 48)

WIFI initialized
[Driver]: PSCAN_FAST_SURVEY channel: 1

[Driver]: set ssid [justin1219]
[Driver]: rtw_joinbss_cmd MGMT_FRAME_PROTECTION_OPTIONAL no pmf.
[Driver]: OnBeacon rtw_get_sec_ie (ielen: 266, rsn_len: 0, wpa_len: 0), channel: 1

[Driver]: start auth to 4c:22:f3:86:01:07

[Driver]: auth success, start assoc
[Driver]: listen_interval: 10, bcn_interval: 100

[Driver]: association success(res=1)

[Driver]: set pairwise key to hw: alg:4(WEP40-1 WEP104-5 TKIP-2 AES-4)

[Driver]: set group key to hw: alg:4(WEP40-1 WEP104-5 TKIP-2 AES-4) keyid:1
(0) Scan: 1, Auth: 1, Assoc: 1, 4way: 1, connect: 1, reason: 0

Interface 0 IP address : 192.168.1.108

init_thread(59), Available heap 0x694d600
[video_voe_presetting] fps:30 w:1920 h:1080

voe heap size = 23314944
fwin(1),enc_en(0),IQ_OFFSET = 0x17b60
fwin(1),enc_en(0),SENSOR_OFFSET = 0x2fba0
sensor id 1 iq_data 17b60 sensor_data 2fba0
VOE not init
VOE_OUT_CMD type 2 command fail -1

RTSP[0] port: 554
hal_voe_ready 0x0 0xbf1208
connect successful sta mode

read fcs_status 0x000000bf
[video_init] uvcd iq is null, use default.
[video_init] uvcd SNR is null, use default.
IQ:FW size (98342)
sensor:date 2024/9/12 version:RTL8735B_VOE_1.5.7.0
sensor:FW size (5412)
sensor timestamp: 2024/09/12
iq timestamp: 2023/05/15 14:48:54
voe_heap malloc 0x706c4640, size 23314944
ISP:1 ENC:1 H265:1 NN:1
hal_voe_ready 0x0 0xbf1208
voe :RTL8735B_VOE_1.6.1.0
sensor:RTL8735B_VOE_1.5.7.0
hal :RTL8735B_VOE_1.6.1.0
load time sensor:151us iq:2873us itcm:0us dtcm:0us ddr:0us ddr2:0us
Set H264 default HIGH profile
rc_version RC_v1
[video_pre_init_procedure] START
hal_voe_send2voe too long 51111 cmd 0x00000206 p1 0x00000000 p2 0x00000000
[Driver]: TSFValue = 3272147149026, tsf = 0, shift_set= 0x8000, bcn int = 100

snapshot size=121342
snapshot size=119479