After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791871 - Video and sound are out of sync when it is written to file
Video and sound are out of sync when it is written to file
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: dont know
1.4.4
Other other
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-12-22 13:00 UTC by gen.kato
Modified: 2018-01-18 21:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description gen.kato 2017-12-22 13:00:16 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
Comment 1 Tim-Philipp Müller 2017-12-22 13:09:54 UTC
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).
Comment 2 gen.kato 2017-12-22 13:50:58 UTC
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
Comment 3 Tim-Philipp Müller 2017-12-22 14:07:36 UTC
For general support please go to the gstreamer-devel mailing list.
Comment 4 Tim-Philipp Müller 2018-01-18 21:12:21 UTC
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!