h264 audio-video synchronisation

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

h264 audio-video synchronisation

Ralph
I'm writing a C# WPF application using GStreamer 0.10.35 (OSSBuild-vs2010 2012.06.15 with .NET4 C# bindings).

The audio-video synchronisation for 720x576 XVID ISO MPEG-4 files is satisfactory, but when I try to play 1280x720 H.264/MPEG-4 AVC files, the video lags behind the audio around 0.3 seconds, which is a show stopper for me as good A/V sync is critical for my application.  I have searched this mailing list and didn't find anything that would help me achieving better synchronisation, could anyone suggest what I can do?

My pipeline contains two chains: one for audio and the other for video.

audiotestsrc - capsfilter - gnlsource  \
                                gnlfilesource  -  gnlcomposition - audioconvert - audioresample - volume - autoaudiosink
                                gnlfilesource  /
                                ...              /

videotestsrc - capsfilter - gnlsource  \                                                          / queue - dshowvideosink
                                gnlfilesource  -  gnlcomposition - ffmpegcolorspace - tee
                                gnlfilesource  /                                                          \ queue - dshowvideosink
                                ...              /
Reply | Threaded
Open this post in threaded view
|

Re: h264 audio-video synchronisation

Ralph
Does anyone have any idea how to solve this problem?

Ralph wrote
I'm writing a C# WPF application using GStreamer 0.10.35 (OSSBuild-vs2010 2012.06.15 with .NET4 C# bindings).

The audio-video synchronisation for 720x576 XVID ISO MPEG-4 files is satisfactory, but when I try to play 1280x720 H.264/MPEG-4 AVC files, the video lags behind the audio around 0.3 seconds, which is a show stopper for me as good A/V sync is critical for my application.  I have searched this mailing list and didn't find anything that would help me achieving better synchronisation, could anyone suggest what I can do?

My pipeline contains two chains: one for audio and the other for video.

audiotestsrc - capsfilter - gnlsource  \
                                gnlfilesource  -  gnlcomposition - audioconvert - audioresample - volume - autoaudiosink
                                gnlfilesource  /
                                ...              /

videotestsrc - capsfilter - gnlsource  \                                                          / queue - dshowvideosink
                                gnlfilesource  -  gnlcomposition - ffmpegcolorspace - tee
                                gnlfilesource  /                                                          \ queue - dshowvideosink
                                ...              /