Why can't I obtain the video using APP_GET_H264?

image

I’ve tried both uppercase and lowercase for the H264 folder, but it doesn’t work either way.

Hello, when using “APP_GET_H264” to obtain resources, the default appended suffix is “.h264”. You can make modifications as follows:

  1. Change the suffix of the resource “videos.mp4” to “videos.h264”. After making this change and recompiling, check whether the corresponding file exists under the directory “simulator\disk\images\h264\video” in your project, ensuring the file has the “.h264” suffix (if it does not exist, proceed with step 2), as shown in the image below:

  1. Ignore step 1, and directly change the suffix in the “APP_GET_H264” interface within the code to “.mp4”.

What does this “err 1” mean? I’ve successfully retrieved the file, but it can’t be played. Using lv_video_set_to_playback causes a crash.

That’s strange—you can’t see any log information from the video at all; it seems like ffmpeg isn’t enabled. Which version are you using?

If you can’t see the file “lvsf_video.c”, it means the library was built without enabling the “FFMPEG” configuration in the simulator, so it can only run on the actual hardware.

We will resolve the compatibility issue between ‘.h264’ and ‘.mp4’ file extensions in version 2.4.2, and the FFMPEG library compilation issue will also be addressed simultaneously.

Version 2.4.1 also cannot play videos on the board.

Could you help capture a log for me to take a look?

The error message is the same when using the emulator, and there’s a compilation error with the board.

Please help check if it’s due to insufficient storage space.

The video is 178 KB in H.264 format.

This is due to exceeding the SRAM space; I’ll open ffmpeg in this version and try compiling it.

Which board are you using?

Since I don’t know which board you’re using, I’ll use the 52x as an example:

  1. If the SRAM overflows after enabling FFmpeg, you can move the GPU-related code in the SCT file to PSRAM, as shown in the images below:

  1. If the code space is also exceeded, directly modify the flash map—the table shown in your screenshot above. You can reduce the size of the root partition and add that space to the code partition: