<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi all, I wanted to save a networked stream in an avi file and I got a very unsynchronized file.
The audio finishes almost 3 second ahead of the video. I even used the sync=true option for the filesink
element, but the result is the same. So, I want to ask an advice on how to get a synchronized video file. The following is the source and destination commands that I used:<br><br>Source commands:<br><br><u>for the audio channel</u><br>gst-launch-0.10
-v alsasrc ! queue ! audio/x-raw-int,rate=8000,channels=1,depth=8 !
audioconvert ! alawenc !&nbsp; rtppcmapay ! queue ! udpsink port=5002<br><u>for the video channel;</u><br>gst-launch
v4l2src ! video/x-raw-rgb,width=320,height=240 ! queue ! videorate !
video/x-raw-rgb,rate=15/1 ! ffmpegcolorspace! ffenc_h263p ! rtph263ppay
! udpsink port=5000<br><br>Output command:<br>gst-launch-0.10 -v avimux
name=mux ! filesink location=videoandaudio.avi sync=true {udpsrc
port=5000
caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998"
num-buffers=5000 ! queue ! rtph263pdepay !
'video/x-h263,width=320,height=240,framerate=(fraction)25/1' ! queue} !
mux.video_0 {udpsrc port=5002
caps="application/x-rtp,media=(string)audio,payload=(int)96,
rate=(int)8000, encoding-name=(string)PCMA" ! queue ! rtppcmadepay !
'audio/x-alaw, rate=(int)8000, channels=(int)1' ! queue} ! mux.audio_0;<br><br>Do you think the result
will be different if I use a different file container (like mp4)
instead of avi? <br><br>Thank you.<br><br>- Zelalem S. <br><br><br><br><br><br /><hr />See all the ways you can stay connected <a href='http://www.microsoft.com/windows/windowslive/default.aspx' target='_new'>to friends and family</a></body>
</html>