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 626740 - mpegpsmux(?): audio and video out of sync, when playing segments
mpegpsmux(?): audio and video out of sync, when playing segments
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-12 15:06 UTC by Vladimir Eremeev
Modified: 2015-06-30 13:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Code (6.63 KB, application/octet-stream)
2010-08-12 15:06 UTC, Vladimir Eremeev
Details
Log of the program run with --gst-debug=mpegpsmux:4,lame:4 (146.07 KB, application/x-gzip)
2010-08-12 15:59 UTC, Vladimir Eremeev
Details
uridecodebin_test.c - somewhat ported to 1.0 - but does not work properly (6.71 KB, application/octet-stream)
2013-01-01 13:45 UTC, Tim-Philipp Müller
Details

Description Vladimir Eremeev 2010-08-12 15:06:22 UTC
Created attachment 167739 [details]
Code

I've developed a simple program (code attached), which saves two pieces of the MPEG2-PS file to another MPEG-2 PS file.

It constructs a pipeline: 
uridecodebin -> twolame  -> multiqueue -> mpegmux -> filesink
             -> mpeg2enc ->

Then it issues two segment seeks: one from 5th through 25th second, and another one from 90th to 125th seconds.

Therefore, the resulting file should be 55 second long and contain two fragments of the source file.

When the resulting file is played using any media player either GStreamer based, or not, when the second fragment begins, sound and video are out of sync.
First, the picture appears, and then, after some seconds, sound appears.
Comment 1 Vladimir Eremeev 2010-08-12 15:59:36 UTC
Created attachment 167744 [details]
Log of the program run with --gst-debug=mpegpsmux:4,lame:4

Looks like the muxer has hold the audio packets
Comment 2 Vladimir Eremeev 2010-08-12 16:01:22 UTC
Look in the attached log for the second appearance of "segment seek"

Replacing twolame with lame doesn't change anything.
Comment 3 Vladimir Eremeev 2010-08-18 13:46:50 UTC
Replacing encoding and muxing chain with autoaudiosink and autovideosink gives correct playback where audio and video are in sync.

(  uridecodebin -> autoaudiosink )
(               -> autovideosink )
Comment 4 Tim-Philipp Müller 2013-01-01 13:45:17 UTC
Created attachment 232447 [details]
uridecodebin_test.c - somewhat ported to 1.0 - but does not work properly

I've tried to quickly port the test program to 1.0, but it doesn't work yet and I haven't debugged it further.
Comment 5 Tim-Philipp Müller 2013-01-01 13:46:42 UTC
I believe this bug is obsolete, since muxers now mux based on running time, which should fix your issue if I understand it correctly.

Any chance you could you re-test with GStreamer 1.x please? If not, let's close this as obsolete - if there are still issues someone will file a new bug :)
Comment 6 Alexandre Franke 2015-06-30 13:32:17 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!