error when use h264/256_rkmpp codec write SEI information #203

Closed
opened 2025-12-23 10:35:48 +01:00 by backuprepo · 4 comments
Owner

Originally created by @wxd9199 on GitHub (Aug 15, 2025).

Description
When using h264_rkmpp encoder with udu_sei=1 and prefix_mode=1, SEI data attached to AVFrame via AV_FRAME_DATA_SEI_UNREGISTERED is not written into the output bitstream.
The same code works with libx264 encoder.

This makes it impossible to embed custom SEI (user data unregistered) in H.264/H.265 streams when using the Rockchip MPP hardware encoder through FFmpeg.

Environment

SoC: RK3588

OS: Debian (arm64)

Encoder: h264_rkmpp (also tested with hevc_rkmpp)
[test_example]
Steps to reproduce

Create a decoded frame.

Call:

AVFrameSideData* sd = av_frame_new_side_data(frame, AV_FRAME_DATA_SEI_UNREGISTERED, uuid_size + payload_size);
memcpy(sd->data, uuid, 16);
memcpy(sd->data + 16, payload, payload_size);

Enable SEI in encoder:

av_opt_set_int(encCtx->priv_data, "udu_sei", 1, 0);
av_opt_set_int(encCtx->priv_data, "prefix_mode", 1, 0);

Encode with h264_rkmpp.

Inspect output stream — no matching SEI NAL units are found.

Expected behavior
When udu_sei=1, prefix_mode=1, and AV_FRAME_DATA_SEI_UNREGISTERED is present in the frame, h264_rkmpp should pass this data to MPP via MppMeta (e.g., KEY_USER_DATA_UNREGISTERED) and the output bitstream should contain a corresponding SEI NAL unit.

Actual behavior
No SEI NAL units are present in the output, even though the frame side_data contains correct UUID and payload.

Additional context / Possible fix
Looking at the FFmpeg libavcodec/h264_rkmpp.c source, there is no code that extracts AV_FRAME_DATA_SEI_UNREGISTERED from AVFrame and passes it to the MPP API.
A possible fix would be:

In rkmpp_encode_frame(), check for AV_FRAME_DATA_SEI_UNREGISTERED side_data.

Call:

mpp_meta_set_ptr(meta, KEY_USER_DATA_UNREGISTERED, side_data->data);
mpp_meta_set_s32(meta, KEY_USER_DATA_UNREGISTERED_SIZE, side_data->size);

Ensure udu_sei and prefix_mode options are honored.

Originally created by @wxd9199 on GitHub (Aug 15, 2025). Description When using h264_rkmpp encoder with udu_sei=1 and prefix_mode=1, SEI data attached to AVFrame via AV_FRAME_DATA_SEI_UNREGISTERED is not written into the output bitstream. The same code works with libx264 encoder. This makes it impossible to embed custom SEI (user data unregistered) in H.264/H.265 streams when using the Rockchip MPP hardware encoder through FFmpeg. Environment SoC: RK3588 OS: Debian (arm64) Encoder: h264_rkmpp (also tested with hevc_rkmpp) [[test_example]](https://pastebin.com/XQA9AfSj) Steps to reproduce Create a decoded frame. Call: AVFrameSideData* sd = av_frame_new_side_data(frame, AV_FRAME_DATA_SEI_UNREGISTERED, uuid_size + payload_size); memcpy(sd->data, uuid, 16); memcpy(sd->data + 16, payload, payload_size); Enable SEI in encoder: av_opt_set_int(encCtx->priv_data, "udu_sei", 1, 0); av_opt_set_int(encCtx->priv_data, "prefix_mode", 1, 0); Encode with h264_rkmpp. Inspect output stream — no matching SEI NAL units are found. Expected behavior When udu_sei=1, prefix_mode=1, and AV_FRAME_DATA_SEI_UNREGISTERED is present in the frame, h264_rkmpp should pass this data to MPP via MppMeta (e.g., KEY_USER_DATA_UNREGISTERED) and the output bitstream should contain a corresponding SEI NAL unit. Actual behavior No SEI NAL units are present in the output, even though the frame side_data contains correct UUID and payload. Additional context / Possible fix Looking at the FFmpeg libavcodec/h264_rkmpp.c source, there is no code that extracts AV_FRAME_DATA_SEI_UNREGISTERED from AVFrame and passes it to the MPP API. A possible fix would be: In rkmpp_encode_frame(), check for AV_FRAME_DATA_SEI_UNREGISTERED side_data. Call: mpp_meta_set_ptr(meta, KEY_USER_DATA_UNREGISTERED, side_data->data); mpp_meta_set_s32(meta, KEY_USER_DATA_UNREGISTERED_SIZE, side_data->size); Ensure udu_sei and prefix_mode options are honored.
backuprepo 2025-12-23 10:35:48 +01:00
  • closed this issue
  • added the
    invalid
    label
Author
Owner

@nyanmisaka commented on GitHub (Aug 15, 2025):

Looking at the FFmpeg libavcodec/h264_rkmpp.c source, there is no code that extracts AV_FRAME_DATA_SEI_UNREGISTERED from AVFrame and passes it to the MPP API.

I'm not sure where you came to this conclusion. The source code only contains libavcodec /rkmppenc.c, not libavcodec/h264_rkmpp.c. Therefore, I suspect you're not using ffmpeg from this repository.

e2bbfe4b31/libavcodec/rkmppenc.c (L643-L700)

@nyanmisaka commented on GitHub (Aug 15, 2025): > Looking at the FFmpeg libavcodec/h264_rkmpp.c source, there is no code that extracts AV_FRAME_DATA_SEI_UNREGISTERED from AVFrame and passes it to the MPP API. I'm not sure where you came to this conclusion. The source code only contains `libavcodec /rkmppenc.c`, not `libavcodec/h264_rkmpp.c`. Therefore, I suspect you're not using ffmpeg from this repository. https://github.com/nyanmisaka/ffmpeg-rockchip/blob/e2bbfe4b31fc5328a625e266344a0bf3c2c45f60/libavcodec/rkmppenc.c#L643-L700
Author
Owner

@wxd9199 commented on GitHub (Aug 15, 2025):

@nyanmisaka Oh, I wrote it wrongly. It should be libavcodec /rkmppenc.c
The repository I use is the latest version and can currently write sei to frame. But I feel that the underlying MPP does not use sei information, so I didn't find where to use it.
testcode

@wxd9199 commented on GitHub (Aug 15, 2025): @nyanmisaka Oh, I wrote it wrongly. It should be libavcodec /rkmppenc.c The repository I use is the latest version and can currently write sei to frame. But I feel that the underlying MPP does not use sei information, so I didn't find where to use it. [testcode](https://gist.github.com/wxd9199/be302c146dd65b06a0fbbea38e9e805c)
Author
Owner

@nyanmisaka commented on GitHub (Aug 15, 2025):

Apply this debug patch to ffmpeg, and then run the following command, you will find that SEI info has been written correctly. This proves that MPP applies SEI information to the bitstream, rather than ignoring it.

diff --git a/libavcodec/rkmppenc.c b/libavcodec/rkmppenc.c
index 5288d09ea7..0104185af6 100644
--- a/libavcodec/rkmppenc.c
+++ b/libavcodec/rkmppenc.c
@@ -737,6 +737,32 @@ static MPPEncFrame *rkmpp_submit_frame(AVCodecContext *avctx, AVFrame *frame)
         return mpp_enc_frame;
     }

+#if 1
+    {
+        AVFrameSideData *sd;
+
+        static struct {
+            uint8_t uuid[16];
+            char    message[1000];
+        } sei_data = {
+            .uuid = {
+                0x57, 0x68, 0x97, 0x80, 0xe7, 0x0c, 0x4b, 0x65,
+                0xa9, 0x06, 0xae, 0x29, 0x94, 0x11, 0xcd, 0x9a
+            },
+        };
+
+        sprintf(sei_data.message, "Frame PTS: [%ld]", frame->pts);
+
+        sd = av_frame_new_side_data(frame, AV_FRAME_DATA_SEI_UNREGISTERED,
+                                    16*sizeof(uint8_t)+strlen(sei_data.message));
+        if (!sd) {
+            av_log(avctx, AV_LOG_ERROR, "Failed to new udu_sei side data\n");
+            goto exit;
+        }
+        memcpy(sd->data, &sei_data, 16*sizeof(uint8_t)+strlen(sei_data.message));
+    }
+#endif
+
     if (avctx->pix_fmt == AV_PIX_FMT_DRM_PRIME) {
         drm_frame = frame;
         mpp_enc_frame->frame = av_frame_clone(drm_frame);
./ffmpeg -f lavfi -i nullsrc=s=1920x1080,format=nv12 -c:v h264_rkmpp -udu_sei 1 -prefix_mode 1 -v
frames 10 -y /tmp/1.mp4
./ffmpeg -i /tmp/1.mp4 -an -sn -dn -vf showinfo=udu_sei_as_ascii=1 -f null -

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf61.7.100
  Duration: 00:00:00.40, start: 0.000000, bitrate: 53 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, 33 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 12800 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        encoder         : Lavc61.19.101 h264_rkmpp
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
[Parsed_showinfo_0 @ 0xffff840022f0] config in time_base: 1/12800, frame_rate: 25/1
[Parsed_showinfo_0 @ 0xffff840022f0] config out time_base: 0/0, frame_rate: 0/0
[Parsed_showinfo_0 @ 0xffff840022f0] n:   0 pts:      0 pts_time:0       duration:    512 duration_time:0.04    fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:1 type:I checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0]
[Parsed_showinfo_0 @ 0xffff840022f0]   side data - H.26[45] User Data Unregistered SEI message: UUID=3d076d45-730f-41a8-b1c4-25d7976bf1ac
[Parsed_showinfo_0 @ 0xffff840022f0] User Data=e5f505a2 author: nyanmisaka    2025-07-04 fix[vproc]: Fix unit tests cannot be disabled
[Parsed_showinfo_0 @ 0xffff840022f0]
[Parsed_showinfo_0 @ 0xffff840022f0]   side data - H.26[45] User Data Unregistered SEI message: UUID=d7dc03c3-c56f-40e0-8ea9-171ad2ef5e23
[Parsed_showinfo_0 @ 0xffff840022f0] User Data=default:cbr-b:2000000[1875000:2125000]-g:250-q:26:[0:48]:[0:48]:2\x0a
[Parsed_showinfo_0 @ 0xffff840022f0]
[Parsed_showinfo_0 @ 0xffff840022f0]   side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a
[Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [0]
[Parsed_showinfo_0 @ 0xffff840022f0]
[Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown
Output #0, null, to 'pipe:':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf61.7.100
  Stream #0:0(und): Video: wrapped_avframe, yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        encoder         : Lavc61.19.101 wrapped_avframe
[Parsed_showinfo_0 @ 0xffff840022f0] n:   1 pts:    512 pts_time:0.04    duration:    512 duration_time:0.04    fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0]
[Parsed_showinfo_0 @ 0xffff840022f0]   side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a
[Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [1]
[Parsed_showinfo_0 @ 0xffff840022f0]
[Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0xffff840022f0] n:   2 pts:   1024 pts_time:0.08    duration:    512 duration_time:0.04    fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0]
[Parsed_showinfo_0 @ 0xffff840022f0]   side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a
[Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [2]
[Parsed_showinfo_0 @ 0xffff840022f0]
[Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0xffff840022f0] n:   3 pts:   1536 pts_time:0.12    duration:    512 duration_time:0.04    fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0]
[Parsed_showinfo_0 @ 0xffff840022f0]   side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a
[Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [3]
[Parsed_showinfo_0 @ 0xffff840022f0]
[Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0xffff840022f0] n:   4 pts:   2048 pts_time:0.16    duration:    512 duration_time:0.04    fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0]
[Parsed_showinfo_0 @ 0xffff840022f0]   side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a
[Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [4]
[Parsed_showinfo_0 @ 0xffff840022f0]
[Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0xffff840022f0] n:   5 pts:   2560 pts_time:0.2     duration:    512 duration_time:0.04    fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0]
[Parsed_showinfo_0 @ 0xffff840022f0]   side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a
[Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [5]
[Parsed_showinfo_0 @ 0xffff840022f0]
[Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0xffff840022f0] n:   6 pts:   3072 pts_time:0.24    duration:    512 duration_time:0.04    fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0]
[Parsed_showinfo_0 @ 0xffff840022f0]   side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a
[Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [6]
[Parsed_showinfo_0 @ 0xffff840022f0]
[Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0xffff840022f0] n:   7 pts:   3584 pts_time:0.28    duration:    512 duration_time:0.04    fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0]
[Parsed_showinfo_0 @ 0xffff840022f0]   side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a
[Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [7]
[Parsed_showinfo_0 @ 0xffff840022f0]
[Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0xffff840022f0] n:   8 pts:   4096 pts_time:0.32    duration:    512 duration_time:0.04    fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0]
[Parsed_showinfo_0 @ 0xffff840022f0]   side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a
[Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [8]
[Parsed_showinfo_0 @ 0xffff840022f0]
[Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown
[Parsed_showinfo_0 @ 0xffff840022f0] n:   9 pts:   4608 pts_time:0.36    duration:    512 duration_time:0.04    fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0]
[Parsed_showinfo_0 @ 0xffff840022f0]   side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a
[Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [9]
[Parsed_showinfo_0 @ 0xffff840022f0]
[Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown
[out#0/null @ 0xaaaaedd07600] video:4KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown
frame=   10 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=3.15x
@nyanmisaka commented on GitHub (Aug 15, 2025): Apply this debug patch to ffmpeg, and then run the following command, you will find that SEI info has been written correctly. This proves that MPP applies SEI information to the bitstream, rather than ignoring it. ```diff diff --git a/libavcodec/rkmppenc.c b/libavcodec/rkmppenc.c index 5288d09ea7..0104185af6 100644 --- a/libavcodec/rkmppenc.c +++ b/libavcodec/rkmppenc.c @@ -737,6 +737,32 @@ static MPPEncFrame *rkmpp_submit_frame(AVCodecContext *avctx, AVFrame *frame) return mpp_enc_frame; } +#if 1 + { + AVFrameSideData *sd; + + static struct { + uint8_t uuid[16]; + char message[1000]; + } sei_data = { + .uuid = { + 0x57, 0x68, 0x97, 0x80, 0xe7, 0x0c, 0x4b, 0x65, + 0xa9, 0x06, 0xae, 0x29, 0x94, 0x11, 0xcd, 0x9a + }, + }; + + sprintf(sei_data.message, "Frame PTS: [%ld]", frame->pts); + + sd = av_frame_new_side_data(frame, AV_FRAME_DATA_SEI_UNREGISTERED, + 16*sizeof(uint8_t)+strlen(sei_data.message)); + if (!sd) { + av_log(avctx, AV_LOG_ERROR, "Failed to new udu_sei side data\n"); + goto exit; + } + memcpy(sd->data, &sei_data, 16*sizeof(uint8_t)+strlen(sei_data.message)); + } +#endif + if (avctx->pix_fmt == AV_PIX_FMT_DRM_PRIME) { drm_frame = frame; mpp_enc_frame->frame = av_frame_clone(drm_frame); ``` ``` ./ffmpeg -f lavfi -i nullsrc=s=1920x1080,format=nv12 -c:v h264_rkmpp -udu_sei 1 -prefix_mode 1 -v frames 10 -y /tmp/1.mp4 ``` ``` ./ffmpeg -i /tmp/1.mp4 -an -sn -dn -vf showinfo=udu_sei_as_ascii=1 -f null - Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/1.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf61.7.100 Duration: 00:00:00.40, start: 0.000000, bitrate: 53 kb/s Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080, 33 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 12800 tbn (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] encoder : Lavc61.19.101 h264_rkmpp Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native)) Press [q] to stop, [?] for help [Parsed_showinfo_0 @ 0xffff840022f0] config in time_base: 1/12800, frame_rate: 25/1 [Parsed_showinfo_0 @ 0xffff840022f0] config out time_base: 0/0, frame_rate: 0/0 [Parsed_showinfo_0 @ 0xffff840022f0] n: 0 pts: 0 pts_time:0 duration: 512 duration_time:0.04 fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:1 type:I checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0] [Parsed_showinfo_0 @ 0xffff840022f0] side data - H.26[45] User Data Unregistered SEI message: UUID=3d076d45-730f-41a8-b1c4-25d7976bf1ac [Parsed_showinfo_0 @ 0xffff840022f0] User Data=e5f505a2 author: nyanmisaka 2025-07-04 fix[vproc]: Fix unit tests cannot be disabled [Parsed_showinfo_0 @ 0xffff840022f0] [Parsed_showinfo_0 @ 0xffff840022f0] side data - H.26[45] User Data Unregistered SEI message: UUID=d7dc03c3-c56f-40e0-8ea9-171ad2ef5e23 [Parsed_showinfo_0 @ 0xffff840022f0] User Data=default:cbr-b:2000000[1875000:2125000]-g:250-q:26:[0:48]:[0:48]:2\x0a [Parsed_showinfo_0 @ 0xffff840022f0] [Parsed_showinfo_0 @ 0xffff840022f0] side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a [Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [0] [Parsed_showinfo_0 @ 0xffff840022f0] [Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown Output #0, null, to 'pipe:': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf61.7.100 Stream #0:0(und): Video: wrapped_avframe, yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] encoder : Lavc61.19.101 wrapped_avframe [Parsed_showinfo_0 @ 0xffff840022f0] n: 1 pts: 512 pts_time:0.04 duration: 512 duration_time:0.04 fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0] [Parsed_showinfo_0 @ 0xffff840022f0] side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a [Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [1] [Parsed_showinfo_0 @ 0xffff840022f0] [Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown [Parsed_showinfo_0 @ 0xffff840022f0] n: 2 pts: 1024 pts_time:0.08 duration: 512 duration_time:0.04 fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0] [Parsed_showinfo_0 @ 0xffff840022f0] side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a [Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [2] [Parsed_showinfo_0 @ 0xffff840022f0] [Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown [Parsed_showinfo_0 @ 0xffff840022f0] n: 3 pts: 1536 pts_time:0.12 duration: 512 duration_time:0.04 fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0] [Parsed_showinfo_0 @ 0xffff840022f0] side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a [Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [3] [Parsed_showinfo_0 @ 0xffff840022f0] [Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown [Parsed_showinfo_0 @ 0xffff840022f0] n: 4 pts: 2048 pts_time:0.16 duration: 512 duration_time:0.04 fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0] [Parsed_showinfo_0 @ 0xffff840022f0] side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a [Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [4] [Parsed_showinfo_0 @ 0xffff840022f0] [Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown [Parsed_showinfo_0 @ 0xffff840022f0] n: 5 pts: 2560 pts_time:0.2 duration: 512 duration_time:0.04 fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0] [Parsed_showinfo_0 @ 0xffff840022f0] side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a [Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [5] [Parsed_showinfo_0 @ 0xffff840022f0] [Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown [Parsed_showinfo_0 @ 0xffff840022f0] n: 6 pts: 3072 pts_time:0.24 duration: 512 duration_time:0.04 fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0] [Parsed_showinfo_0 @ 0xffff840022f0] side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a [Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [6] [Parsed_showinfo_0 @ 0xffff840022f0] [Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown [Parsed_showinfo_0 @ 0xffff840022f0] n: 7 pts: 3584 pts_time:0.28 duration: 512 duration_time:0.04 fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0] [Parsed_showinfo_0 @ 0xffff840022f0] side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a [Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [7] [Parsed_showinfo_0 @ 0xffff840022f0] [Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown [Parsed_showinfo_0 @ 0xffff840022f0] n: 8 pts: 4096 pts_time:0.32 duration: 512 duration_time:0.04 fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0] [Parsed_showinfo_0 @ 0xffff840022f0] side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a [Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [8] [Parsed_showinfo_0 @ 0xffff840022f0] [Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown [Parsed_showinfo_0 @ 0xffff840022f0] n: 9 pts: 4608 pts_time:0.36 duration: 512 duration_time:0.04 fmt:yuv420p cl:left sar:1/1 s:1920x1080 i:P iskey:0 type:P checksum:00000000 plane_checksum:[00000000 00000000 00000000] mean:[0 0 0] stdev:[0.0 0.0 0.0] [Parsed_showinfo_0 @ 0xffff840022f0] side data - H.26[45] User Data Unregistered SEI message: UUID=57689780-e70c-4b65-a906-ae299411cd9a [Parsed_showinfo_0 @ 0xffff840022f0] User Data=Frame PTS: [9] [Parsed_showinfo_0 @ 0xffff840022f0] [Parsed_showinfo_0 @ 0xffff840022f0] color_range:unknown color_space:unknown color_primaries:unknown color_trc:unknown [out#0/null @ 0xaaaaedd07600] video:4KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown frame= 10 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.40 bitrate=N/A speed=3.15x ```
Author
Owner

@wxd9199 commented on GitHub (Aug 18, 2025):

@nyanmisaka 我发现了问题:UUID设置得不合规范,
随机的UUID不工作:
uint8_t uuid[16] = {
0x41, 0x49, 0x44, 0x45, 0x54, 0x45, 0x43, 0x54, // "AIDETECT"
0x49, 0x4F, 0x4E, 0x52, 0x45, 0x53, 0x55, 0x4C // "RESULT"
};
使用下面这个UUID,可以正常写入:
const uint8_t uuid[16] = {
0x57, 0x68, 0x97, 0x80, 0xe7, 0x0c, 0x4b, 0x65,
0xa9, 0x06, 0xae, 0x29, 0x94, 0x11, 0xcd, 0x9a
};

@wxd9199 commented on GitHub (Aug 18, 2025): @nyanmisaka 我发现了问题:UUID设置得不合规范, 随机的UUID不工作: uint8_t uuid[16] = { 0x41, 0x49, 0x44, 0x45, 0x54, 0x45, 0x43, 0x54, // "AIDETECT" 0x49, 0x4F, 0x4E, 0x52, 0x45, 0x53, 0x55, 0x4C // "RESULT" }; 使用下面这个UUID,可以正常写入: const uint8_t uuid[16] = { 0x57, 0x68, 0x97, 0x80, 0xe7, 0x0c, 0x4b, 0x65, 0xa9, 0x06, 0xae, 0x29, 0x94, 0x11, 0xcd, 0x9a };
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/ffmpeg-rockchip#203
No description provided.