GNOME Bugzilla – Bug 791871
Video and sound are out of sync when it is written to file
Last modified: 2018-01-18 21:12:21 UTC
I wrote video and sound to file with following command. gst-launch-1.0 -v v4l2src ! video/x-raw,width=640,height=480,framerate=10/1 ! videorate ! clockoverlay ! omxh264enc ! mux. alsasrc device=plughw:1 ! audio/x-raw,rate=8000,channels=1,depth=16 ! queue ! audioresample ! audioconvert ! lamemp3enc ! mux. avimux name=mux ! filesink location=measure.avi Video and sound are out of sync. What is wrong? Hardware : Raspberry pi (BCM2709 Revision:a22082) OS: Raspbian GNU/Linux 8 (jessie) Webcam: Logitech HD WEBCAM C270
1.4 is very old, please try with a newer version. AVI is not a good container format for H.264 (or for anything really), I would recommend you try something else first, e.g. Matroska or MP4. You may also need an audiorate in front of the encoder here (depends on whether alsasrc overruns sometimes or not).
Dear Tim. Thank you for reply. > 1.4 is very old, please try with a newer version. How can I get a new version? This article says "Use apt-get command" https://gstreamer.freedesktop.org/documentation/installing/on-linux.html The version of gstreamer installed with apt-get was 1.4. Also I tried to build from source code. I succeeded in building version 1.10, but it did not include an audioresample plugin. It should be included in the Base Plugins... https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-audioresample.html
For general support please go to the gstreamer-devel mailing list.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment. Thanks!