<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri, sans-serif">
I have a program that iterative creates Flash container files with 2 streams (video h264 and audio AAC).<span style="mso-spacerun:yes"> 
</span>The format and codec contexts are allocated before and freed after each file.
<span style="mso-spacerun:yes"> </span>Calls are made to avformat_write_header() after contexts are allocated and to av_write_trailer() before contexts are freed.<span style="mso-spacerun:yes"> 
</span><o:p> </o:p></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri, sans-serif">
I am using 1 for AVFormatContext.start_time_realtime (since 0 will get current system time).
<span style="mso-spacerun:yes"> </span>How do you start from 0 when muxing?<o:p> </o:p></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri, sans-serif">
The other issue is first file shows the correct start time and duration when played thru VLC media player.<span style="mso-spacerun:yes"> 
</span>All subsequent files show a 0 start time, large duration and a black screen for a while; then the start time changes to a large start time that is correct run time below the duration and the video plays.
<span style="mso-spacerun:yes"> Any </span>ideas what I have done wrong that is causing the wrong start and duration time and the delay in video playing but only on subsequent files?<o:p> </o:p></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri, sans-serif">
<o:p> </o:p></p>
<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri, sans-serif">
Thanks<o:p> </o:p></p>
<br>
</div>
</body>
</html>