Re:Re: How to use the gst-launch to play unaligned raw video data files?
dave
hzbhlz at 163.com
Tue Aug 22 02:56:53 UTC 2023
hi Nicolas:
Thanks for your replay.
According to your suggestion, the problem is solved, thank you.
regrads,
Dave
At 2023-08-18 21:40:41, "Nicolas Dufresne via gstreamer-devel" <gstreamer-devel at lists.freedesktop.org> wrote:
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/20230822/3e63f3ca/attachment-0001.htm>
More information about the gstreamer-devel
mailing list