<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div style="margin: 0;">hi Nicolas:</div><div style="margin: 0;"><br></div><div style="margin: 0;">Thanks for your replay.</div><div style="margin: 0;">According to your suggestion, the problem is solved, thank you.</div><p style="margin: 0;"><br></p><div style="margin: 0;">regrads,</div><div style="margin: 0;">Dave</div><p style="margin: 0;"><br></p><p style="margin: 0;"><br></p><div style="position:relative;zoom:1"></div><div id="divNeteaseMailCard"></div><p style="margin: 0;"><br></p><p>At 2023-08-18 21:40:41, "Nicolas Dufresne via gstreamer-devel" <gstreamer-devel@lists.freedesktop.org> wrote:</p><blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div dir="auto"><div>Hi,<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 18 août 2023, 00 h 15, dave via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div><p style="margin:0px 0px 1.1em;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-variant-alternates:inherit;font-stretch:inherit;line-height:inherit;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-kerning:inherit;font-feature-settings:inherit;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both;color:rgb(35,38,41)">I have a 426x240 nv12 data file. I use the following command to play it, the resulting playback picture is distorted:</p><pre style="margin-top:0px;margin-bottom:calc(1.5em);padding:var(--su12);border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-variant-alternates:inherit;font-stretch:inherit;line-height:var(--lh-md);font-family:var(--ff-mono);font-kerning:inherit;font-feature-settings:inherit;font-size:var(--fs-body1);vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;background-color:var(--highlight-bg);border-radius:var(--br-md);color:var(--highlight-color)"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:var(--ff-mono);font-kerning:inherit;font-feature-settings:inherit;font-size:var(--_pr-code-fs);vertical-align:baseline;box-sizing:inherit;background-color:transparent;white-space:inherit;color:var(--black-800);border-radius:0px"><span style="background-color:rgb(216,216,216)">gst-launch-1.0 filesrc location=426x240-nv12-25fps-5s.yuv ! videoparse format=nv12 width=426 height=240 framerate=1/1 ! videoconvert ! autovideosink</span></code></pre><p style="margin:0px 0px 1.1em;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-variant-alternates:inherit;font-stretch:inherit;line-height:inherit;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-kerning:inherit;font-feature-settings:inherit;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both;color:rgb(35,38,41)">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:</p><pre style="margin-top:0px;margin-bottom:calc(1.5em);padding:var(--su12);border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-variant-alternates:inherit;font-stretch:inherit;line-height:var(--lh-md);font-family:var(--ff-mono);font-kerning:inherit;font-feature-settings:inherit;font-size:var(--fs-body1);vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;background-color:var(--highlight-bg);border-radius:var(--br-md);color:var(--highlight-color)"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:var(--ff-mono);font-kerning:inherit;font-feature-settings:inherit;font-size:var(--_pr-code-fs);vertical-align:baseline;box-sizing:inherit;background-color:transparent;white-space:inherit;color:var(--black-800);border-radius:0px"><span style="background-color:rgb(216,216,216)">gst-launch-1.0 filesrc location=428x240-nv12-25fps-5s.yuv ! videoparse format=nv12 width=428 height=240 framerate=1/1 ! videoconvert ! autovideosink</span></code></pre><p style="margin:0px 0px 1.1em;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-variant-alternates:inherit;font-stretch:inherit;line-height:inherit;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-kerning:inherit;font-feature-settings:inherit;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both;color:rgb(35,38,41)">my question is :</p><p style="margin:0px 0px 1.1em;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-variant-alternates:inherit;font-stretch:inherit;line-height:inherit;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-kerning:inherit;font-feature-settings:inherit;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both;color:rgb(35,38,41)">1.Is my guess correct? (Non-4-byte alignment causes playback exception)</p><p style="margin:0px 0px 1.1em;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-variant-alternates:inherit;font-stretch:inherit;line-height:inherit;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-kerning:inherit;font-feature-settings:inherit;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both;color:rgb(35,38,41)">2.How to use the gst-launch to play such a video file?</p></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Indeed, GStreamer default alignment is non zero. Though, rawvideoparse element have plane-offsets, plane-strides and frame-size property to work around this.</div><div dir="auto"><br></div><div dir="auto">Nicolas</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div><p style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-variant-alternates:inherit;font-stretch:inherit;line-height:inherit;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-kerning:inherit;font-feature-settings:inherit;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both;color:rgb(35,38,41)"><br></p></div></div></blockquote></div></div></div>
</blockquote></div>