Re:Re: How to use the gst-launch to play unaligned raw video data files?
dave via gstreamer-devel <[email protected]>
| Newsgroups | gmane.comp.video.gstreamer.devel |
|---|---|
| Message-ID | <[email protected]> |
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" <[email protected]> wrote: Hi, Le ven. 18 août 2023, 00 h 15, dave via gstreamer-devel <[email protected]> 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