如何使用gst-launch播放未对齐的原始视频数据文件?

问题描述 投票:0回答:1

我有一个426x240的nv12数据文件,我使用以下命令播放它,得到的播放画面失真。

gst-launch-1.0 filesrc location=426x240-nv12-25fps-5s.yuv ! videoparse format=nv12 width=426 height=240 framerate=1/1 ! videoconvert ! autovideosink

我怀疑这个问题与字节对齐有关。上面文件的宽度是426,不是4字节对齐的;对于其他一些4字节对齐的文件,如428x240、640x480等,使用这样的命令可以正确播放:

gst-launch-1.0 filesrc location=428x240-nv12-25fps-5s.yuv ! videoparse format=nv12 width=428 height=240 framerate=1/1 ! videoconvert ! autovideosink

我想知道我是否在某个地方犯了错误;或者这根本无法播放这样的文件。

有人可以帮帮我吗,非常感谢

gstreamer gst-launch
1个回答
0
投票

rawvideoparse 元素具有plane-offsets、plane-strides 和frame-size 属性来解决这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.