Synchronising audio and video in gnonlin
Ralph
ralph.gucwa at racelogic.co.uk
Tue Jan 17 09:16:31 PST 2012
I'm using gnonlin to play a sequence of video file fragments. I constructed a
pipeline containing two gnlcomposition objects - one for video and the other
for audio, they are playing the same video files. In order to be able to
have gaps between the files, I created videotestsrc and audiotestsrc and
added them through gnlsources (priority: uint.MaxValue) to gnlcomposition
objects.
My "timeline" looks like this:
659.24s file, start position 2s (2s gap before the file)
881.04s file, start position 661.24s (4s gap before the file)
When I disable the audio part, the video works nicely - the file fragments
are played exactly when scheduled and the gaps between them are precisely
the required length. Perfect! The problems occur when I enable the audio
section - the gaps become much shorter, strange things start to happen.
When I try to play both video and audio, the first file begins after just
0.4s, and when it ends, the video skips the second gap and jumps many
seconds into the second file and the video remains frozen, it waits for the
audio (which is playing nicely except for the 1.6 second shorter gap) to
that position and then continues.
What's interesting the length of the initial gap is always 1.6 seconds
shorter than it should be - when the gap should be 20s, it is played within
18.4 seconds. The second gap is always completely wrong.
It's not the problem with the video, if I disable the video section, the
audio is wrong, the gaps are shorter than scheduled.
What's wrong with my pipeline?
My video files are:
video: Xvid ISO MPEG-4 720x576 25fps
audio: MPEG-1 Layer 2 48kHz 192kb/s stereo
The audio gnlcomposition runs at 48kHz, the audio is then converted using
audioconvert.
The audiotestsrc runs at 44.1kHz.
The autoaudiosink runs at 44.1kHz.
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Synchronising-audio-and-video-in-gnonlin-tp4303968p4303968.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list