# Snapshot example not working

**URL:** <https://forum.amebaiot.com/t/snapshot-example-not-working/4485>\
**Category:** Multimedia\
**Tags:** rtl8735b\
**Created:** [October 30, 2025, 1:32pm UTC](https://forum.amebaiot.com/t/snapshot-example-not-working/4485 "2025-10-30T13:32:29Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravinder](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/ravinder/32/3030_2.png) [@ravinder](https://forum.amebaiot.com/u/ravinder)\
**Post date:** [October 30, 2025, 1:32pm UTC](https://forum.amebaiot.com/t/snapshot-example-not-working/4485/1 "2025-10-30T13:32:29Z")

</div>

Hi all,

I’m testing the `mmf2_video_example_v1_snapshot_init()` example on the Ameba Pro2 platform, but it’s not working correctly.  
Below is the log I get when I run it:

SNAP=SNAPS

[VID Wrn]VOE CH0 JPG queue full (queue/used/out/rsvd) 0/0KB  
Warn: get snapshot buffer failed

[MEM] After do cmd, available heap 76771680

t seems like the snapshot buffer allocation is failing (`VOE CH0 JPG queue full`).  
Has anyone faced a similar issue or knows how to fix this?  
I’m running the example without modifying the default configuration.

Thanks in advance for any help! 🙏

---

<div class="post-metadata">

**Author:** ![M-ichae-l](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/m-ichae-l/32/33_2.png) [@M-ichae-l](https://forum.amebaiot.com/u/M-ichae-l)\
**Post date:** [November 14, 2025, 9:59am UTC](https://forum.amebaiot.com/t/snapshot-example-not-working/4485/2 "2025-11-14T09:59:20Z")

</div>

I have just tried the example `mmf2_video_example_v1_snapshot_init()`no issue for me.

So could you help me to do the following checks

- cam sensor setup. Before compile have to update the right sensor for streaming [sensor.h](https://github.com/Ameba-AIoT/ameba-rtos-pro2/blob/main/project/realtek_amebapro2_v0_example/inc/sensor.h)
  - line 166,169,176

- network setup. After update bin into IC, lets connect to a 5G network and start streaming when client connect by RTSP address.
  - if you able to see the streaming, there will not be any issue. Then can start snapshots….

if you still have some issues, could you please provide the logs for example. So i can dig deep.

---

<div class="post-metadata">

**Author:** ![M-ichae-l](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/m-ichae-l/32/33_2.png) [@M-ichae-l](https://forum.amebaiot.com/u/M-ichae-l)\
**Post date:** [November 20, 2025, 7:38am UTC](https://forum.amebaiot.com/t/snapshot-example-not-working/4485/3 "2025-11-20T07:38:18Z")

</div>

Could you share your SDK version with me so I can run some tests? Thank you.

---

<div class="post-metadata">

**Author:** ![ravinder](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/ravinder/32/3030_2.png) [@ravinder](https://forum.amebaiot.com/u/ravinder)\
**Post date:** [November 24, 2025, 5:36am UTC](https://forum.amebaiot.com/t/snapshot-example-not-working/4485/4 "2025-11-24T05:36:19Z")

</div>

My SDK version is the same one available in the official GitHub repository.  
I’m using exactly the camera sensor and files you provide for the Ameba Pro2 Mini board with the F-37 sensor.  
Everything is taken from your provided package, but it is still not working on my side.

Could you please check and help?  
Thank you.

---

<div class="post-metadata">

**Author:** ![M-ichae-l](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/m-ichae-l/32/33_2.png) [@M-ichae-l](https://forum.amebaiot.com/u/M-ichae-l)\
**Post date:** [November 24, 2025, 11:01am UTC](https://forum.amebaiot.com/t/snapshot-example-not-working/4485/5 "2025-11-24T11:01:05Z")

</div>

Ok let me try the SDK to see if we can reproduce the issue.

Could I know your WiFi condition? 2.4/5G? Does the video streaming working smooth? or have any lags?

---

<div class="post-metadata">

**Author:** ![ravinder](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/ravinder/32/3030_2.png) [@ravinder](https://forum.amebaiot.com/u/ravinder)\
**Post date:** [November 24, 2025, 11:19am UTC](https://forum.amebaiot.com/t/snapshot-example-not-working/4485/6 "2025-11-24T11:19:43Z")

</div>

Hi Michael,

Thank you for the quick response.

My WiFi environment is **Jio 5G** , and the video streaming is **working smoothly with no lags**.

---

<div class="post-metadata">

**Author:** ![M-ichae-l](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/m-ichae-l/32/33_2.png) [@M-ichae-l](https://forum.amebaiot.com/u/M-ichae-l)\
**Post date:** [November 25, 2025, 11:20am UTC](https://forum.amebaiot.com/t/snapshot-example-not-working/4485/7 "2025-11-25T11:20:06Z")

</div>

Hi @ravinder ,

Thanks for your patience. But I haven’t encountered any issues when running this demo.

Let me list all the steps and details below. Please review them and see if anything differs on your side or if there’s anything that may be causing the problem.

1, clone/download the [Freertos SDK](https://github.com/Ameba-AIoT/ameba-rtos-pro2),

```markdown
main branch, https://github.com/Ameba-AIoT/ameba-rtos-pro2.git

```

the latest commit should be [Update code base · Ameba-AIoT/ameba-rtos-pro2@3b947a6 · GitHub](https://github.com/Ameba-AIoT/ameba-rtos-pro2/commit/3b947a6371659d902a8e2faac346d898f4f4e193)

2, setup all tools and toolchain, refer to [read.me](https://github.com/Ameba-AIoT/ameba-rtos-pro2/blob/main/README.md)

3, update [sensor.h](https://github.com/Ameba-AIoT/ameba-rtos-pro2/blob/main/project/realtek_amebapro2_v0_example/inc/sensor.h) and choose the sensor

- [ameba-rtos-pro2/project/realtek\_amebapro2\_v0\_example/inc/sensor.h at 3b947a6371659d902a8e2faac346d898f4f4e193 · Ameba-AIoT/ameba-rtos-pro2 · GitHub](https://github.com/Ameba-AIoT/ameba-rtos-pro2/blob/3b947a6371659d902a8e2faac346d898f4f4e193/project/realtek_amebapro2_v0_example/inc/sensor.h#L161)
- [ameba-rtos-pro2/project/realtek\_amebapro2\_v0\_example/inc/sensor.h at 3b947a6371659d902a8e2faac346d898f4f4e193 · Ameba-AIoT/ameba-rtos-pro2 · GitHub](https://github.com/Ameba-AIoT/ameba-rtos-pro2/blob/3b947a6371659d902a8e2faac346d898f4f4e193/project/realtek_amebapro2_v0_example/inc/sensor.h#L169)
- [ameba-rtos-pro2/project/realtek\_amebapro2\_v0\_example/inc/sensor.h at 3b947a6371659d902a8e2faac346d898f4f4e193 · Ameba-AIoT/ameba-rtos-pro2 · GitHub](https://github.com/Ameba-AIoT/ameba-rtos-pro2/blob/3b947a6371659d902a8e2faac346d898f4f4e193/project/realtek_amebapro2_v0_example/inc/sensor.h#L171)

4, update [video\_example\_media\_framework.c](https://github.com/Ameba-AIoT/ameba-rtos-pro2/blob/main/project/realtek_amebapro2_v0_example/src/mmfv2_video_example/video_example_media_framework.c) choose the example,

[line 64](https://github.com/Ameba-AIoT/ameba-rtos-pro2/blob/3b947a6371659d902a8e2faac346d898f4f4e193/project/realtek_amebapro2_v0_example/src/mmfv2_video_example/video_example_media_framework.c#L64)

```c
	//mmf2_video_example_v1_init();

```

[line 73](https://github.com/Ameba-AIoT/ameba-rtos-pro2/blob/3b947a6371659d902a8e2faac346d898f4f4e193/project/realtek_amebapro2_v0_example/src/mmfv2_video_example/video_example_media_framework.c#L73C1-L74C1)

```c
	mmf2_video_example_v1_shapshot_init();

```

5, update [mmf2\_video\_example\_v1\_snapshot\_init.c](https://github.com/Ameba-AIoT/ameba-rtos-pro2/blob/main/project/realtek_amebapro2_v0_example/src/mmfv2_video_example/mmf2_video_example_v1_snapshot_init.c) setup SD card mode

[line 37](https://github.com/Ameba-AIoT/ameba-rtos-pro2/blob/3b947a6371659d902a8e2faac346d898f4f4e193/project/realtek_amebapro2_v0_example/src/mmfv2_video_example/mmf2_video_example_v1_snapshot_init.c#L37)

```c
#define ENABLE_SD_SNAPSHOT //Enable the snapshot to sd card

```

6, compile

clean build, remove “build“ folder and create again at [GCC-RELEASE](https://github.com/Ameba-AIoT/ameba-rtos-pro2/tree/main/project/realtek_amebapro2_v0_example/GCC-RELEASE)

```bash
rm -rf build
mkdir build
cd build

```

compile toolchain

```bash
cmake .. -G\"Unix Makefiles\" -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake -DVIDEO_EXAMPLE=ON 

```

compile flash

```bash
cmake --build . --target flash 

```

7, upload bin into board

use the image tool to upload the “flash\_ntz.bin” to board.

8, connect WiFi and RTSP streaming

AT command

```bash
ATW0=[SSID]
ATW1=[Password]
ATWC

```

find the IP address and display device connect to the IP, then start RTSP streaming.

9, SD card and snapshot.

make sure the SD card are insert correctly.

AT command for snapshot and save as jpg inside SD card

```auto
SNAP=SNAPS

```

---

<div class="post-metadata">

**Author:** ![ravinder](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/ravinder/32/3030_2.png) [@ravinder](https://forum.amebaiot.com/u/ravinder)\
**Post date:** [November 26, 2025, 12:24pm UTC](https://forum.amebaiot.com/t/snapshot-example-not-working/4485/8 "2025-11-26T12:24:18Z")

</div>

Hi @M-ichae-l,

I followed all the steps you provided exactly.  
I also uploaded screenshots showing the changes I made and the log output.

 ![snap_log](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/2/20288538a3e787401cff677e66d024c90b5fe2af.png)

![enable sd snap](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/d/d6772653c57568d49c0cb7065549583bd8c9e658.png)

![framework.c](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/2X/2/26ff1743fc80c4ff903161df0ce567ed43c6f612.png)

RTSP is working fine, but when I try the snapshot command `SNAP=SNAPS`, I still get this error:

```auto
[VID Wrn]VOE CH0 JPG queue full (queue/used/out/rsvd) 0/0KB
Warn: get snapshot buffer failed

```

Even after enabling `ENABLE_SD_SNAPSHOT` and selecting the correct example, the issue remains.

Could you please check why the snapshot JPEG queue is not initialized

Thanks.

---

<div class="post-metadata">

**Author:** ![M-ichae-l](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/m-ichae-l/32/33_2.png) [@M-ichae-l](https://forum.amebaiot.com/u/M-ichae-l)\
**Post date:** [November 27, 2025, 8:33am UTC](https://forum.amebaiot.com/t/snapshot-example-not-working/4485/9 "2025-11-27T08:33:05Z")

</div>

[flash\_ntz.zip](https://forum.amebaiot.com/uploads/short-url/oLObhjb8aOAd4u2NQOnEiOfYUh1.zip) (1.7 MB)

Would you like to try my firmware to help to narrow down if it is a HW issue?

And provide yours to me, thanks.

---

<div class="post-metadata">

**Author:** ![ravinder](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/ravinder/32/3030_2.png) [@ravinder](https://forum.amebaiot.com/u/ravinder)\
**Post date:** [November 27, 2025, 10:35am UTC](https://forum.amebaiot.com/t/snapshot-example-not-working/4485/10 "2025-11-27T10:35:28Z")

</div>

Hi @M-ichae-l,

Thank you for your support.

Right now I am able to get the snapshot output.  
Thanks again for your help!

---

<div class="post-metadata">

**Author:** ![ravinder](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/ravinder/32/3030_2.png) [@ravinder](https://forum.amebaiot.com/u/ravinder)\
**Post date:** [December 1, 2025, 6:17am UTC](https://forum.amebaiot.com/t/snapshot-example-not-working/4485/11 "2025-12-01T06:17:29Z")

</div>

Hi @M-ichae-l,

Thank you for your support.

Right now I am able to get the snapshot output — thanks again for your help!

I noticed one thing during testing:  
If I set `#define ENABLE_FCS 0`, the snapshot works correctly.  
But if I keep `#define ENABLE_FCS 1`, the snapshot does not work.

Could you please clarify why the snapshot fails when FCS is enabled, and what the exact purpose of FCS is in this firmware?

Thanks again for your guidance.

* * *

---

<div class="post-metadata">

**Author:** ![M-ichae-l](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/m-ichae-l/32/33_2.png) [@M-ichae-l](https://forum.amebaiot.com/u/M-ichae-l)\
**Post date:** [December 2, 2025, 8:03am UTC](https://forum.amebaiot.com/t/snapshot-example-not-working/4485/12 "2025-12-02T08:03:03Z")

</div>

> [@ravinder](#):
>
> ENABLE\_FCS

Hi @ravinder,

I see. The `#define ENABLE_FCS`with enabled will cause the “queue“ issue. Thanks for finding it out.

FCS mode will start init the camera module before the application start, that happens at the boot stage. The queue length set at boot stage may not suitable for this example, which the default example does not include FCS option.

Currently, we can just disable the FCS to let the function work, or update/adjust the queue length at boot stage for snapshot (not recommended). There will be more specific and detail FCS guide in future. Therefore, currently I suggest we can processed with no FCS.

And actually, on/off FCS dose not important for this example working well (snapshot).
