Can lvgl_v8_media video playback be implemented in lvgl_v9, and what should be noted?

Want to implement the same functionality as lvgl_v8_media based on lvgl_v9, but after switching to lvgl_v9, nothing is displayed.

[100131] I/h264 main: wait media exit
[100452] I/h264 ffmpeg_r: media_read_thread
[100471] E/h264 ffmpeg_r: mediaplayer_start rock.mp4 fmt=2
ffurl_open_whitelist ret=0
[107352] I/h264 ffmpeg_r: video codec: format=0
[107376] I/h264 ffmpeg_r: video codec: h264 stream w=180 h=180,period=109
[107405] E/h264 ffmpeg_r: Could not find audio stream
[107426] E/h264 ffmpeg_r: cannot find audio stream

[107454] I/h264 aud_dec: audio decode task run

[107476] I/h264 vid_dec: video decode task run

[107495] I/h264 ffmpeg_r: mediaplayer_start ok
play resumed
play resumed
play resumed
play resumed
play resumed
play resumed
play resumed
[295073] I/h264 ffmpeg_r: read frame error eof
play end
[295408] I/h264 ffmpeg_r: wait audio dec thread exit
[295736] I/h264 ffmpeg_r: wait audio dec thread exit
[296065] I/h264 main: ffmpeg_close
[296080] I/h264 main: mediaplayer_stop async
[296146] I/h264 main: ffmpeg_open
[296163] I/h264 ffmpeg_r: wait audio dec thread exit
[296195] I/media_dec vid_dec: video drop
[296221] I/media_dec vid_dec: video drop
[296243] I/media_dec vid_dec: video drop
[296457] I/h264 main: wait media exit
[296490] I/h264 ffmpeg_r: wait audio dec thread exit
[296784] I/h264 main: wait media exit
[296817] I/h264 aud_dec: audio decode_thread exit
[296837] I/h264 ffmpeg_r: wait audio dec thread exit
[296915] I/h264 vid_dec: video decode_thread exit
[297112] I/h264 main: wait media exit
[297178] I/h264 ffmpeg_r: wait video dec thread exit
[297298] I/h264 ffmpeg_r: media exit
[297440] I/h264 main: wait media exit
[297743] I/h264 ffmpeg_r: media_read_thread
[297762] E/h264 ffmpeg_r: mediaplayer_start local.mp4 fmt=2
ffurl_open_whitelist ret=-2
[298104] I/NO_TAG ffmpeg_r: fail_2 -2
[298121] E/h264 ffmpeg_r: avformat_open_input error
[298144] I/h264 ffmpeg_r: mediaplayer_start failed
[298164] E/h264 ffmpeg_r: media start error
[301437] I/h264 main: wait ffmpeg_read exit
[304325] I/h264 main: ffmpeg_open
[304649] I/h264 ffmpeg_r: media_read_thread
[304667] E/h264 ffmpeg_r: mediaplayer_start muse.mp4 fmt=2
ffurl_open_whitelist ret=0
[310455] I/h264 ffmpeg_r: video codec: format=0
[310478] I/h264 ffmpeg_r: video codec: h264 stream w=128 h=128,period=30
[310508] E/h264 ffmpeg_r: Could not find audio stream
[310528] E/h264 ffmpeg_r: cannot find audio stream

[310556] I/h264 aud_dec: audio decode task run

[310578] I/h264 vid_dec: video decode task run

[310598] I/h264 ffmpeg_r: mediaplayer_start ok
play resumed
play resumed
play resumed
[380352] I/h264 ffmpeg_r: read frame error eof
play end
[380427] I/h264 main: ffmpeg_close
[380442] I/h264 main: mediaplayer_stop async
[380508] I/h264 main: ffmpeg_open
[380526] I/media_dec vid_dec: video drop
[380550] I/media_dec vid_dec: video drop
[380571] I/media_dec vid_dec: video drop
[380688] I/h264 ffmpeg_r: wait audio dec thread exit
[380851] I/h264 main: wait media exit
[381015] I/h264 ffmpeg_r: wait audio dec thread exit
[381179] I/h264 main: wait media exit
[381244] I/h264 vid_dec: video decode_thread exit
[381343] I/h264 aud_dec: audio decode_thread exit
[381362] I/h264 ffmpeg_r: wait audio dec thread exit
[381484] I/h264 ffmpeg_r: media exit
[381507] I/h264 main: wait media exit
[381830] I/h264 ffmpeg_r: media_read_thread
[381849] E/h264 ffmpeg_r: mediaplayer_start rock.mp4 fmt=2
ffurl_open_whitelist ret=0
[388746] I/h264 ffmpeg_r: video codec: format=0
[388769] I/h264 ffmpeg_r: video codec: h264 stream w=180 h=180,period=109
[388798] E/h264 ffmpeg_r: Could not find audio stream
[388819] E/h264 ffmpeg_r: cannot find audio stream

[388847] I/h264 aud_dec: audio decode task run

[388869] I/h264 vid_dec: video decode task run

[388888] I/h264 ffmpeg_r: mediaplayer_start ok
play resumed
play resumed

The video playback itself (middleware\media) is not problematic; it is independent code and unrelated to the LVGL version.

When porting to LVGL v9, the following points need attention:

  1. How to display the image in LVGL after video decoding is complete. The header describing the image format differs significantly between v8 and v9.
  2. After video decoding, the image data points to an array of pointers, where the first three words of this array are the addresses of the Y, U, and V buffers. This corresponds to the LV_COLOR_FORMAT_I420 format in LVGL v9. However, the official LVGL v9 implementation does not support rendering this format, and it requires external hardware rendering acceleration. Our EPIC hardware rendering acceleration also hasn’t adapted to this format yet, so some modifications are needed.
    else if (LV_IMG_CF_YUV420_PLANAR2 == src->header.cf)
    {
        uint8_t **yuv = (uint8_t **)p_fg_layer->data;
        p_fg_layer->yuv.y_buf = yuv[0];
        p_fg_layer->yuv.u_buf = yuv[1];
        p_fg_layer->yuv.v_buf = yuv[2];
    }