xvidenc + libmp3lame out of sync...

Tim-Philipp Müller t.i.m at zen.co.uk
Sat May 19 04:05:09 PDT 2012


On Wed, 2012-05-16 at 17:10 +0200, andrea wrote:

Hi,

> I'm using the following command line (with reference to some shell
> variables) to download streams from Italian broadcast RAI.TV:
> 
> gst-launch-0.10 rtspsrc location="$URL" \
>   ! decodebin2 name=decoder \
>   decoder. \
>   ! queue \
>   ! xvidenc bitrate=$VBT \
>   ! mux. \
>   decoder. \
>   ! audioconvert \
>   ! audioresample \
>   ! audio/x-raw-int, rate=44100 \
>   ! lamemp3enc target=bitrate cbr=true bitrate=128 \
>   ! queue \
>   ! mux. \
>   avimux name=mux \
>   ! filesink location="$DEST"
> 
> It usually works, but sometimes the resulting videos go out of sync
> after some minutes. Some other times audio and video are slightly out of
> sync constantly throughout the show.
> Any hint would be very much appreciated.

If you're muxing into AVI, you might need the following:

 * audiorate tolerance=40000000 before the audio encoder

 * videorate before the video encoder

Cheers
 -Tim



More information about the gstreamer-devel mailing list