<div>thanks all for the tips,</div><div>I noticed that in the "muxing.c" example the "pts" value is only set to the AVFrame of video stream.Is it possible to do the same for Audio stream?</div><div>I am sorry but I dont have clear idea on how to use "pts" .I know for single stream(video) is it used to arrange the decoded frames in correct order. (?) . but whats the connection when we consider both audio and video stream ?</div>
<div><br><br> </div><div class="gmail_quote">On Thu, Apr 12, 2012 at 4:06 PM, NITIN GOYAL <span dir="ltr"><<a href="mailto:nitinkumgoyal@gmail.com">nitinkumgoyal@gmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">
I think it is always not necessary have to both audio and video with same size. I have seen the videos which are greater in length that audio and there was silence at the end of the video.  If there is no silence in the end of your video then you need to track the PTS values of the audio and check where it got shortened.<div class="HOEnZb">
<div class="h5"><div>
<br><br><div class="gmail_quote">On Thu, Apr 12, 2012 at 12:28 PM, ashika umanga <span dir="ltr"><<a href="mailto:umanga.forums@gmail.com" target="_blank">umanga.forums@gmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">

<div>I mean, I used "muxing.c" to generate the OGG file.That means both audio and video stream should have the same length,isnt it ?</div><div><div><div><br><br> </div><div class="gmail_quote">
On Thu, Apr 12, 2012 at 3:31 PM, Gagandeep Bawa <span dir="ltr"><<a href="mailto:gagandeep.bawa@ironroad.com" target="_blank">gagandeep.bawa@ironroad.com</a>></span> wrote:<br>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><font color="#000066">You have to check your video frame rate. I worked on IPhone recorded videos files and it varies between 15 to 30. </font><div>


<div><br><br><div class="gmail_quote">On Thu, Apr 12, 2012 at 11:58 AM, ashika umanga <span dir="ltr"><<a href="mailto:umanga.forums@gmail.com" target="_blank">umanga.forums@gmail.com</a>></span> wrote:<br>

<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div>When I encode an OGG file with Theora+Speex , my video length is longer than the audio playback.</div>


<div>Anytips on this ?</div>
<div><div></div><div><div> </div><div class="gmail_quote">On Thu, Apr 12, 2012 at 2:51 PM, Gagandeep Bawa <span dir="ltr"><<a href="mailto:gagandeep.bawa@ironroad.com" target="_blank">gagandeep.bawa@ironroad.com</a>></span> wrote:<br>




<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><font color="#000066">Hi,</font><div><font color="#000066"><br>




</font></div><div><font color="#000066">These PTS and DTS used for sync between audio and video data while encoding and presentation. Check below link for more details.</font></div>
<div><font color="#000066"><br></font></div><div><font color="#000066"><b><a href="http://dranger.com/ffmpeg/tutorial05.html" target="_blank">http://dranger.com/ffmpeg/tutorial05.html</a></b></font></div>
<div><br></div><div><font color="#000066">Thanks,</font></div><div><font color="#000066">Gagan</font><br><br><div class="gmail_quote"><div><div>On Thu, Apr 12, 2012 at 11:14 AM, ashika umanga <span dir="ltr"><<a href="mailto:umanga.forums@gmail.com" target="_blank">umanga.forums@gmail.com</a>></span> wrote:<br>





</div></div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div><div><p>Greetings all,</p><p>
I am writing a wrapper class for video/audio encoding by following the "muxing.c".<br>
<a href="http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html" target="_blank">http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html</a></p>
<p>I see in the example that before writing frames to the file ,is checks whether the PTS value of audiostream is <br>lesser than that of videostream.</p><p>code snippet:</p><p> if (!video_st || (video_st && audio_st && audio_pts < video_pts)) {<br>






            write_audio_frame(oc, audio_st);<br>        } else {<br>            write_video_frame(oc, video_st);<br>            picture->pts++;<br>        }</p><p>Can someone explain why this test is done? Whats the connection between PTS values ?</p>






<p> </p>
<br></div></div>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br><br>
</div>
<br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><p style="margin:0px"><font color="#000066">Thanks & Regards,<span><br>
</span><font>Gagandeep, </font></font><span style="color:rgb(0,0,102)">Tech Lead Mobility</span></p>
<p style="margin:0px"><span><font color="#000066"><a href="tel:%2B91-%207307470044" target="_blank" value="+917307470044">+91- 7307470044</a></font></span></p>
<p style="margin:0px"><font color="#000066">-------------------------------------------------------------------------------</font></p>
<p style="margin:0px"><font color="#000066">Ironroad IT India Pvt. Ltd.</font></p>
<p style="margin:0px"><font color="#000066">IT-6, C-6,SEBIZ SQUARE, Sector-67, Mohali, Punjab, India</font></p><br>
</font></span><br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br>