<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>
<!-- Template generated by Exclaimer Mail Disclaimers on 12:29:30 maandag, 4 december 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">P.ImprintUniqueID {
        MARGIN: 0cm 0cm 0pt
}
LI.ImprintUniqueID {
        MARGIN: 0cm 0cm 0pt
}
DIV.ImprintUniqueID {
        MARGIN: 0cm 0cm 0pt
}
TABLE.ImprintUniqueIDTable {
        MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
        page: Section1
}
</style>
<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:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
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;}
span.E-mailStijl17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></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="NL" link="#0563C1" vlink="#954F72">
<p class="ImprintUniqueID"></p>
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-GB">I have a problem understanding the mp4mux in combination with the fragment-duration option.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I have a recorder application, recording live streams to mkv files, starting a new file every hour. For a test this must be changed to mp4. There is a constraint that we want provide streaming access to an open recording,
 a file not yet finished.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">When I take the following pipeline and change the filesrc every hour (sending the h264parse, mp4mux, filesink an eos and changing the location property):<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Rtscpsrc- rtphh264depay  - h264parse - mp4mux – filesink<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Everything works fine. Also tested using the existing splitmuxsink, same behaviour.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">However when I set the fragment-duration option in the mp4mux (to support streaming), my file duration/length meta-data is incorrect. I tried both my existing setup and the splitmuxsink, but the problem is that that file
 length is set to the stream running time. An example:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Fileof1minute_1.mp4 -> video length is 1 minute<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Fileof1minute_2.mp4 -> video length is 2 minutes (the actual video is 1 minute long, however the timeline incorrect)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Fileof1minute_3.mp4 -> video length is 3 minutes (the actual video is 1 minute long, however the timeline incorrect)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">As a hack/workaround I can flush the whole pipeline, either by setting the state of the pipeline to ready, or by sending a flush start, flush stop event.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">My question is, am I doing something wrong, what is happening here and is there an elegant fix?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<br>
<font size="2" face="Arial">Met vriendelijke groet, Sincerely, <br>
<br>
</font><font style="font-family:Arial;font-size:10pt;font-weight:bold;">Lambert Veerman</font><br>
<font style="font-family:Arial;font-size:10pt;">R&D</font><br>
<br>
<p></p>
<p class="ImprintUniqueID">
<table class="5d43cb55-80a9-49d8-a689-434567663967Table" style="font-family:Calibri;">
<tbody>
<tr>
<td valign="Middle"><font style="font-family:Arial;font-size:8pt;"><font style="font-family:Calibri;"><img width="18" height="11" style="border: 0px Solid ; " src="cid:imagedd22bc.PNG@f6ed3df4.47accd57"></font></font></td>
<td valign="Middle"><font style="font-family:Arial;font-size:8pt;"><font style="font-family:Calibri;"><span style="font-family:Calibri;"><a href="mailto:lv@bigbrother.nl" title="Click to send email to Lambert Veerman" target="" style="font-family:Calibri;"><span style="font-family:Calibri;">lv@bigbrother.nl</span></a></span></font></font></td>
</tr>
</tbody>
</table>
<br>
</p>
<a href="http://www.linkedin.com/company/1241845?trk=tyah"><img id="IMG1" border="0" src="cid:imageca5f13.PNG@520653fa.48b2b98b" width="126" height="22"></a><br>
<br>
<table height="83" cellspacing="0" cellpadding="0" width="416" border="0">
<tbody>
<tr>
<td rowspan="2"><img src="cid:image797e6a.PNG@639af330.42aaea0b"></td>
<td valign="top"><a href="http://www.bigbrother.nl"><img border="0" src="cid:image87fb2a.PNG@d5356427.49bd7d2b"></a></td>
</tr>
<tr>
<td valign="bottom"><a href="http://www.bigbrother-security.be"><img border="0" src="cid:image162d09.PNG@cc6cb37c.4f965f69"></a></td>
</tr>
</tbody>
</table>
<p class="ImprintUniqueID"><br>
<font size="1" face="Arial">Disclaimer: This e-mail is intended exclusively for the addressee(s), and may not be passed on to, or made available for use by any
<br>
person other than the addressee(s). If you have received this email by error then please delete it and notify the sender by return e-mail.
<br>
In case of doubt about correctness or completeness of this e-mail, please contact the sender<i>.</i> BigBrother BV dismisses any and every
<br>
liability resulting from any electronic transmission.</font><br>
</p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
</body>
</html>