<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi Stefan, thank you for your e-mail. I understand what you mean now. I will try to do both and will tell you the result.<br><br>Thank you again for the support.<br><br>- Zelalem S. <br><br><br>&gt; Date: Sat, 18 Jul 2009 22:51:03 +0300<br>&gt; From: ensonic@hora-obscura.de<br>&gt; To: gstreamer-devel@lists.sourceforge.net<br>&gt; Subject: Re: [gst-devel] How can I synchronize video and audio<br>&gt; <br>&gt; Zelalem Sintayehu schrieb:<br>&gt; &gt; Hi Stefan, thank you for your response. You know when I didn't get help for some time, I had lost my hope and abandon it. 2 second is considerable time. Anyway, I am sorry for my sily question, but I don't understnad what you mean by "narrow it down"? Also how can I "Check if you receive the material properly timestamped"?.<br>&gt; &gt; <br>&gt; &gt; Thank you again for your help.<br>&gt; <br>&gt; Don't expect that everything is ready. I don't have an explanation for the<br>&gt; problem you see. As nobody else was answering, it seems that you will have to<br>&gt; figure our what the probelm is. With "narrow it down", I was suggsting to try to<br>&gt; make simpler/different variants to see if you can pinpoint the problem. E.g.<br>&gt; recod to a mp4 with mp4mux to see if it might be a problem in avimux.<br>&gt; <br>&gt; Also you should not start two pipelines on the src side, instead of<br>&gt; Source:<br>&gt; Audio:<br>&gt; gst-launch-0.10<br>&gt; -v alsasrc ! queue ! audio/x-raw-int,rate=8000,channels=1,depth=8 !<br>&gt; audioconvert ! alawenc ! rtppcmapay ! udpsink port=5002<br>&gt; Video:<br>&gt; gst-launch<br>&gt; v4l2src ! video/x-raw-rgb,width=320,height=240 ! queue ! videorate !<br>&gt; video/x-raw-rgb,rate=15/1 ! ffmpegcolorspace! ffenc_h263p ! rtph263ppay<br>&gt; ! udpsink port=5000<br>&gt; <br>&gt; just do<br>&gt; <br>&gt; Source:<br>&gt; gst-launch-0.10<br>&gt; -v alsasrc ! queue ! audio/x-raw-int,rate=8000,channels=1,depth=8 !<br>&gt; audioconvert ! alawenc ! rtppcmapay ! udpsink port=5002<br>&gt; v4l2src ! video/x-raw-rgb,width=320,height=240 ! queue ! videorate !<br>&gt; video/x-raw-rgb,rate=15/1 ! ffmpegcolorspace! ffenc_h263p ! rtph263ppay<br>&gt; ! udpsink port=5000<br>&gt; <br>&gt; Then both livesource use the same clock to timestamp buffers.<br>&gt; <br>&gt; Stefan<br>&gt; <br>&gt; <br>&gt; &gt; <br>&gt; &gt; - Zelalem S. <br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt;&gt; Date: Sat, 18 Jul 2009 19:03:10 +0300<br>&gt; &gt;&gt; From: ensonic@hora-obscura.de<br>&gt; &gt;&gt; To: gstreamer-devel@lists.sourceforge.net<br>&gt; &gt;&gt; Subject: Re: [gst-devel] How can I synchronize video and audio<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Zelalem Sintayehu schrieb:<br>&gt; &gt;&gt;&gt; Hi guys, I wanted to record video coming from network into avi file,<br>&gt; &gt;&gt;&gt; and wrote some code. The file is created but it is unsynchronized (by<br>&gt; &gt;&gt;&gt; almost 2 second) and it is annoying. I am using avimuxer. I also used<br>&gt; &gt;&gt;&gt; buffer for the audio source hoping to reduce the time difference. The<br>&gt; &gt;&gt;&gt; following is the source and destination codes (the command line version<br>&gt; &gt;&gt;&gt; of my code). Is there anything that I should consider to avoid this<br>&gt; &gt;&gt;&gt; problem. Please help me. If you think that I should use other file<br>&gt; &gt;&gt;&gt; formats and video muxer, please advice me.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Source:<br>&gt; &gt;&gt;&gt; Audio: <br>&gt; &gt;&gt;&gt; gst-launch-0.10<br>&gt; &gt;&gt;&gt; -v alsasrc ! queue ! audio/x-raw-int,rate=8000,channels=1,depth=8 !<br>&gt; &gt;&gt;&gt; audioconvert ! alawenc ! rtppcmapay ! udpsink port=5002<br>&gt; &gt;&gt;&gt; Video:<br>&gt; &gt;&gt;&gt; gst-launch<br>&gt; &gt;&gt;&gt; v4l2src ! video/x-raw-rgb,width=320,height=240 ! queue ! videorate !<br>&gt; &gt;&gt;&gt; video/x-raw-rgb,rate=15/1 ! ffmpegcolorspace! ffenc_h263p ! rtph263ppay<br>&gt; &gt;&gt;&gt; ! udpsink port=5000<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Destination:<br>&gt; &gt;&gt;&gt; gst-launch-0.10 -v<br>&gt; &gt;&gt;&gt; avimux name=mux ! filesink location=videoandaudio.avi sync=true {udpsrc<br>&gt; &gt;&gt;&gt; port=5000<br>&gt; &gt;&gt;&gt; caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998" <br>&gt; &gt;&gt;&gt; ! queue ! rtph263pdepay !<br>&gt; &gt;&gt;&gt; 'video/x-h263,width=320,height=240,framerate=(fraction)25/1' ! queue} !<br>&gt; &gt;&gt;&gt; mux.video_0 {udpsrc port=5002<br>&gt; &gt;&gt;&gt; caps="application/x-rtp,media=(string)audio,payload=(int)96,<br>&gt; &gt;&gt;&gt; rate=(int)8000, encoding-name=(string)PCMA" num-buffers=5000 ! queue !<br>&gt; &gt;&gt;&gt; rtppcmadepay ! 'audio/x-alaw, rate=(int)8000, channels=(int)1' ! queue}<br>&gt; &gt;&gt;&gt; ! mux.audio_0;<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt; try to narrow it down. Check if you receive the material properly timestamped.<br>&gt; &gt;&gt; Check if avimux handles timestamping correctly when muxing.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; STefan<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;&gt; Thank you.<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; - Zelalem S. <br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt;<br>&gt; <br>&gt; ------------------------------------------------------------------------------<br>&gt; Enter the BlackBerry Developer Challenge  <br>&gt; This is your chance to win up to $100,000 in prizes! For a limited time, <br>&gt; vendors submitting new applications to BlackBerry App World(TM) will have<br>&gt; the opportunity to enter the BlackBerry Developer Challenge. See full prize  <br>&gt; details at: http://p.sf.net/sfu/Challenge<br>&gt; _______________________________________________<br>&gt; gstreamer-devel mailing list<br>&gt; gstreamer-devel@lists.sourceforge.net<br>&gt; https://lists.sourceforge.net/lists/listinfo/gstreamer-devel<br><br /><hr />With Windows Live, you can organize, edit, and  <a href='http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx' target='_new'>share your photos.</a></body>
</html>