Re: How to use the gst-launch to play unaligned raw video data files?

Nicolas Dufresne nicolas at ndufresne.ca
Fri Aug 18 13:40:41 UTC 2023


Hi,

Le ven. 18 août 2023, 00 h 15, dave via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> a écrit :

> I have a 426x240 nv12 data file. I use the following command to play it,
> the resulting playback picture is distorted:
>
> gst-launch-1.0 filesrc location=426x240-nv12-25fps-5s.yuv ! videoparse format=nv12 width=426 height=240 framerate=1/1 ! videoconvert ! autovideosink
>
> I suspect that this problem is related to byte alignment. The width of the
> above file is 426, which is not 4-byte aligned; for some other
> 4-byte-aligned files, such as 428x240, 640x480, etc., using such commands
> can be played correctly:
>
> gst-launch-1.0 filesrc location=428x240-nv12-25fps-5s.yuv ! videoparse format=nv12 width=428 height=240 framerate=1/1 ! videoconvert ! autovideosink
>
> my question is :
>
> 1.Is my guess correct? (Non-4-byte alignment causes playback exception)
>
> 2.How to use the gst-launch to play such a video file?
>

Indeed, GStreamer default alignment is non zero. Though, rawvideoparse
element have plane-offsets, plane-strides and frame-size property to work
around this.

Nicolas


>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230818/35a72a17/attachment.htm>


More information about the gstreamer-devel mailing list