<div dir="auto"><div>Hi,<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 30 août 2023, 03 h 15, Aviv Hurvitz 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 dir="ltr"><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'm using Gstreamer to record audio+video from a webcam to a file, and their sync is <br>off. I can see a delay in playback from the MKV file.<br><br>Note: It's important that I don't lose any frames over time from audio or video.<br><br>Can someone see a problem with my command?<br><br></p><pre style="margin-top:0px;margin-bottom:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-variant-alternates:inherit;font-stretch:inherit;font-kerning:inherit;font-feature-settings:inherit;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-kerning:inherit;font-feature-settings:inherit;vertical-align:baseline;box-sizing:inherit;background-color:transparent;white-space:inherit;border-radius:0px">C:\gstreamer\1.0\msvc_x86_64\bin\gst-launch-1.0 -m -e -v 
mfvideosrc device-name="Logitech MeetUp"  do-timestamp=true
! "image/jpeg," "width=3840," "height=2160," "framerate=30/1," "pixel-aspect-ratio=1/1"
! queue ! nvjpegdec ! queue ! nvh264enc preset=hp qp-min=23 ! queue ! h264parse ! queue ! mkv.

wasapisrc device="{audio_device_stringified}"
! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 ! mkv. 

matroskamux name=mkv 
! queue max-siz see-buffers=0 max-size-time=0 max-size-bytes=0</code></pre></div></blockquote></div></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 dir="ltr"><pre style="margin-top:0px;margin-bottom:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-variant-alternates:inherit;font-stretch:inherit;font-kerning:inherit;font-feature-settings:inherit;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-kerning:inherit;font-feature-settings:inherit;vertical-align:baseline;box-sizing:inherit;background-color:transparent;white-space:inherit;border-radius:0px"> ! filesink location=out.mkv</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)"></p></div></blockquote></div></div><div dir="auto">I don't see anything wrong with the pipeline. I would suspect a timestamp bug in wasapisrc or mfvideosrc. The only way to achieve lipsync is to have these two elements produce time that correlate. If it's not the case, it's likely a bug (or missing platform feature).</div><div dir="auto"><br></div><div dir="auto">P.s. if the delay is constant, you can probably workaround with a ts-offset setting.</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 dir="ltr"><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)"><br></p></div>
</blockquote></div></div></div>