<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:8.0pt;
        margin-left:0in;
        line-height:105%;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:8.0pt;
        margin-left:.5in;
        mso-add-space:auto;
        line-height:105%;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
        {mso-style-priority:34;
        mso-style-type:export-only;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        line-height:105%;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
        {mso-style-priority:34;
        mso-style-type:export-only;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        mso-add-space:auto;
        line-height:105%;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
        {mso-style-priority:34;
        mso-style-type:export-only;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:8.0pt;
        margin-left:.5in;
        mso-add-space:auto;
        line-height:105%;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:554439516;
        mso-list-type:hybrid;
        mso-list-template-ids:-1028633904 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Original post --><o:p></o:p></p>
<p class="MsoNormal">The following pipeline works ok and produces an avi movie file. My development machine is windows 7 and I’m using GStreamer 1.8.2 with your windows pre-built binaries.
<o:p></o:p></p>
<p class="MsoListParagraphCxSpFirst">gst-launch-1.0.exe -e <o:p></o:p></p>
<p class="MsoListParagraphCxSpMiddle"><o:p> </o:p></p>
<p class="MsoListParagraphCxSpMiddle">avimux name=mux ! filesink location=C:/myfile.avi
<o:p></o:p></p>
<p class="MsoListParagraphCxSpMiddle">sync=true <o:p></o:p></p>
<p class="MsoListParagraphCxSpMiddle"><o:p> </o:p></p>
<p class="MsoListParagraphCxSpMiddle">rtpbin latency=6000 name=rtpbin_A <o:p></o:p></p>
<p class="MsoListParagraphCxSpMiddle"><o:p> </o:p></p>
<p class="MsoListParagraphCxSpMiddle">udpsrc address="192.168.1.101" port=5018 <o:p>
</o:p></p>
<p class="MsoListParagraphCxSpMiddle">caps="application/x-rtp,media=video,payload=97,clock-rate=90000,encoding-name=VP8" !
<o:p></o:p></p>
<p class="MsoListParagraphCxSpMiddle"><o:p> </o:p></p>
<p class="MsoListParagraphCxSpMiddle">rtpbin_A.recv_rtp_sink_0 <o:p></o:p></p>
<p class="MsoListParagraphCxSpMiddle">rtpbin_A. ! rtpvp8depay ! avdec_vp8 output-corrupt=true ! videoconvert ! videorate ! videoscale !
<o:p></o:p></p>
<p class="MsoListParagraphCxSpMiddle">capsfilter caps="video/x-raw,height=288,width=352,framerate=30/1" !
<o:p></o:p></p>
<p class="MsoListParagraphCxSpMiddle">avenc_mpeg4 ! queue ! mux. <o:p></o:p></p>
<p class="MsoListParagraphCxSpMiddle"><o:p> </o:p></p>
<p class="MsoListParagraphCxSpMiddle">udpsrc address="192.168.1.101" port=5020 <o:p>
</o:p></p>
<p class="MsoListParagraphCxSpMiddle">caps="application/x-rtp,media=audio,clock-rate=48000,encoding-name=OPUS,payload=96" !
<o:p></o:p></p>
<p class="MsoListParagraphCxSpMiddle"><o:p> </o:p></p>
<p class="MsoListParagraphCxSpMiddle">rtpbin_A.recv_rtp_sink_1 <o:p></o:p></p>
<p class="MsoListParagraphCxSpMiddle">rtpbin_A. ! rtpopusdepay ! opusdec ! audioconvert ! audiorate !
<o:p></o:p></p>
<p class="MsoListParagraphCxSpMiddle">capsfilter caps="audio/x-raw,format=S16LE,rate=8000,channels=1" !
<o:p></o:p></p>
<p class="MsoListParagraphCxSpMiddle">mulawenc ! queue ! mux.<o:p></o:p></p>
<p class="MsoListParagraphCxSpLast" style="margin-left:0in;mso-add-space:auto"><o:p> </o:p></p>
<p class="MsoNormal">I can use the standard Windows media player to play the resultant avi file. However, there are two problems:<o:p></o:p></p>
<p class="MsoListParagraphCxSpFirst" style="text-indent:-.25in;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>The avi file length is about 5 seconds longer that it should be.<o:p></o:p></p>
<p class="MsoListParagraphCxSpLast" style="text-indent:-.25in;mso-list:l0 level1 lfo1">
<![if !supportLists]><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>When I play the movie, there is about a 5 second delay in the beginning before it starts to play. The first video frame appears frozen during this initial delay.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Once the movie starts to play it is all ok. All the audio and video data is there and the audio and video are in sync.
<o:p></o:p></p>
<p class="MsoNormal">I tried changing the rtpbin latency but that did not correct the problem.
<o:p></o:p></p>
<p class="MsoNormal">Can anyone tell me what is causing this extra data in the avi file and the initial play delay, and what changes should be made to the above pipeline to eliminate it? Also, does anyone know of an open source avi file chunk viewer? I did
 a quick google search but have not found anything so far. I would like to see what data is actually in the avi file.
<o:p></o:p></p>
<p class="MsoNormal">Thanks so much for your help, <o:p></o:p></p>
<p class="MsoNormal">Bill <o:p></o:p></p>
<p class="MsoNormal" style="line-height:106%">Update --><o:p></o:p></p>
<p class="MsoNormal" style="line-height:106%">I thought maybe the standard Windows media player was responsible for the initial play delay so I tried the following gstreamer playback pipeline:<o:p></o:p></p>
<p class="MsoNormal" style="line-height:106%"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in;line-height:106%">gst-launch-1.0 -e <o:p>
</o:p></p>
<p class="MsoNormal" style="margin-left:.5in;line-height:106%">filesrc location=C:/myfile.avi !
<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in;line-height:106%">avidemux name=demux demux. ! queue ! avdec_mpeg4 ! videoconvert ! d3dvideosink
<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in;line-height:106%">demux. ! queue ! mulawdec ! audioconvert ! directsoundsink<o:p></o:p></p>
<p class="MsoNormal" style="line-height:106%"><o:p> </o:p></p>
<p class="MsoNormal" style="line-height:106%">I get the same playback response as with the Windows media player with the same two issues mentioned above in my initial post! So this play delay appears to be a gstreamer issue.<o:p></o:p></p>
<p class="MsoNormal" style="line-height:106%">I did google searches for avi file reader/viewer/chunk viewer and finally found a useful open source tool at
<a href="http://ffmpeg.org/">http://ffmpeg.org/</a>. They have a win32 command line tool named
<i>ffprobe</i> that reads an avi file and displays a lot of info about what it contains. I looked at my test recording that has the initial play delay. It was decoded without problems. The stream info is correct. The audio and video frames also looked fine.
 The file had 15 frames between key frames for video. I didn’t see anything that looked suspicious or broken. The first key frame came early in the recording – within the first half second.
<o:p></o:p></p>
<p class="MsoNormal" style="line-height:106%">Help to resolve this would be greatly appreciated!
<o:p></o:p></p>
<p class="MsoNormal" style="line-height:106%">Bill  <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>