Re: Record webcam and keep audio-video sync
Nicolas Dufresne via gstreamer-devel <[email protected]>
| Newsgroups | gmane.comp.video.gstreamer.devel |
|---|---|
| Message-ID | <CAKQmDh-NCTgHhhzkzoqKTFaku5M3vaeU4GwXDehbibJkOA3G6A@mail.gmail.com> |
Hi, Le mer. 30 août 2023, 03 h 15, Aviv Hurvitz via gstreamer-devel < [email protected]> a écrit : > I'm using Gstreamer to record audio+video from a webcam to a file, and > their sync is > off. I can see a delay in playback from the MKV file. > > Note: It's important that I don't lose any frames over time from audio or > video. > > Can someone see a problem with my command? > > 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 > > ! filesink location=out.mkv > > 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). P.s. if the delay is constant, you can probably workaround with a ts-offset setting. >