GStreamer 'rawvideoparse' 元素读取了错误的字节数

GStreamer 'rawvideoparse' element reads wrong amount of bytes

我正在使用以下命令使用 Gstreamer 从文件中读取 972x720 像素的字节流 YUV420:

gst-launch-1.0 filesrc location=testfile blocksize=1049760 ! rawvideoparse width=972 height=720  framerate=1/1 ! xvimagesink

到目前为止,这仍然有效,我得到了一张图片,但显示不正确。使用命令单独导出帧时:

gst-launch-1.0 filesrc location=testfile blocksize=1049760 ! rawvideoparse width=972 height=720  framerate=1/1 ! multifilesink location="rvp_%d.raw"

我看到当使用元素 'rawvideoparse' 时,它会创建一个每帧 1051200 字节的文件,而不是预期的 1049760。当我删除 'rawvideoparse' 时,帧导出正确但我的 objective 是直接从文件中读入 'xvimagesink'

我哪里搞砸了?

感谢 GStreamer Development mailing list 我得到了答案。问题在于 rawvideoparse 元素无法处理此分辨率。当我切换到 976 宽度时,它起作用了。