Audio playback not sync with video playback

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

Audio playback not sync with video playback

ericcardmanNo3
playing avi (mpeg4/mp3) files result in a bit faster video playback than audio playback.
does anyone know such problem? how to solve it?

i do:

gst-launch filesrc location=/home/out_CR.avi ! avidemux name=demux demux.audio
_00 ! mad ! volume volume=0.5 ! alsasink  demux.video_00 ! queue ! video
/mpeg,scalewidth=512,scaleheight=288 ! mympeg4dec ! ximagesink

if i do:

gst-launch filesrc location=/home/out_CR.avi ! avidemux name=demux demux.audio
_00 ! queue ! mad ! volume volume=0.5 ! alsasink  demux.video_00 ! queue ! video
/mpeg,scalewidth=512,scaleheight=288 ! mympeg4dec ! ximagesink

audio is more behind video than in first pipeline.

the mympeg4dec decodes frames in hardware.

thx.
Reply | Threaded
Open this post in threaded view
|

Re: Audio playback not sync with video playback

Rodney Dowdall
Hello Eric

I think you need to set sync=true on the video and audio syncs, so try:

gst-launch filesrc location=/home/out_CR.avi ! avidemux name=demux demux.audio_00 ! queue ! mad ! volume volume=0.5 ! alsasink sink=true  demux.video_00 ! queue ! video mpeg,scalewidth=512,scaleheight=288 ! mympeg4dec ! ximagesink sync=true
I think that should work.

Rodney

On 10-06-16 05:13 AM, ericcardmanNo3 wrote:
playing avi (mpeg4/mp3) files result in a bit faster video playback than
audio playback. 
does anyone know such problem? how to solve it?

i do:

gst-launch filesrc location=/home/out_CR.avi ! avidemux name=demux
demux.audio
_00 ! mad ! volume volume=0.5 ! alsasink  demux.video_00 ! queue ! video
/mpeg,scalewidth=512,scaleheight=288 ! mympeg4dec ! ximagesink

if i do:

gst-launch filesrc location=/home/out_CR.avi ! avidemux name=demux
demux.audio
_00 ! queue ! mad ! volume volume=0.5 ! alsasink  demux.video_00 ! queue !
video
/mpeg,scalewidth=512,scaleheight=288 ! mympeg4dec ! ximagesink

audio is more behind video than in first pipeline.

the mympeg4dec decodes frames in hardware.

thx.

  


--


Rodney Dowdall
Crank Software Inc.
Office: 613-595-1999
Online: www.cranksoftware.com
Check out: Crank Software’s Blog



------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Audio playback not sync with video playback

michael smith-6-3
In reply to this post by ericcardmanNo3
On Wed, Jun 16, 2010 at 2:13 AM, ericcardmanNo3 <[hidden email]> wrote:

>
> playing avi (mpeg4/mp3) files result in a bit faster video playback than
> audio playback.
> does anyone know such problem? how to solve it?
>
> i do:
>
> gst-launch filesrc location=/home/out_CR.avi ! avidemux name=demux
> demux.audio
> _00 ! mad ! volume volume=0.5 ! alsasink  demux.video_00 ! queue ! video
> /mpeg,scalewidth=512,scaleheight=288 ! mympeg4dec ! ximagesink

GStreamer handles synchronising the audio and video for you,
automatically - you don't need to do anything special.

However, in order to do this, it needs correct timestamps on the
buffers - since you're using a private element here ("mympeg4dec"), my
guess would be that you have a bug in there, and that you're putting
incorrect (or no) timestamps on the buffers being pushed out.

It should work correctly once you put correct timestamps on your buffers.

Mike

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel