<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>MP4 timing issue implementing a dash demux</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.17063" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=843200508-06062012><FONT face=Arial 
size=2>Hi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843200508-06062012><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=843200508-06062012><FONT face=Arial 
size=2>After discussing with DASH experts, it appears that specific DASH boxes 
have been added to address this issue.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843200508-06062012><FONT face=Arial 
size=2>The Track Fragment Decode Time (tfdt) seems in particular to be the place 
where the fragment offset is supposed to be specified.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843200508-06062012><FONT face=Arial size=2>I 
have modified the qtdemux to parse it and&nbsp;add the result to the output 
timestamps, and it solves the playback issues.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843200508-06062012><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=843200508-06062012><FONT face=Arial size=2>I 
have created a bug here: <A 
href="https://bugzilla.gnome.org/show_bug.cgi?id=677535"><FONT 
face="Times New Roman" 
size=3>https://bugzilla.gnome.org/show_bug.cgi?id=677535</FONT></A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=843200508-06062012><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=843200508-06062012><FONT face=Arial 
size=2>David</FONT>&nbsp;</SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=fr dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>De&nbsp;:</B> 
gstreamer-devel-bounces+david.corvoysier=orange.com@lists.freedesktop.org 
[mailto:gstreamer-devel-bounces+david.corvoysier=orange.com@lists.freedesktop.org] 
<B>De la part de</B> david.corvoysier@orange.com<BR><B>Envoyé&nbsp;:</B> mardi 
29 mai 2012 17:08<BR><B>À&nbsp;:</B> 
gstreamer-devel@lists.freedesktop.org<BR><B>Cc&nbsp;:</B> 
sebastian.droege@collabora.co.uk<BR><B>Objet&nbsp;:</B> MP4 timing issue 
implementing a dash demux<BR></FONT><BR></DIV>
<DIV></DIV><!-- Converted from text/rtf format -->
<P><FONT face=Arial size=2>Hi, </FONT></P>
<P><FONT face=Arial size=2>Following Sebastian advice, we have implemented an 
MPEG DASH demux based on the HLS demux code.</FONT> <BR><FONT face=Arial 
size=2>Basically, the demux fetches the MP4 data fragments and pass them 
downstream.</FONT> <BR><FONT face=Arial size=2>Whenever a new bitrate is 
selected, a new output pad is created and decodebin2 creates the appropriate 
decoding chain.</FONT> <BR><FONT face=Arial size=2>In each new chain, decodebin2 
instantiates in particular a new isomp4 demux, to which the DASH demux forwards 
an MP4 header (the initialization header), followed by as many MP4 data 
fragments.</FONT></P>
<P><FONT face=Arial size=2>The DASH demux also sends a new segment event to 
specify the playback offset for that chain.</FONT> </P>
<P><FONT face=Arial size=2>The issue we have is that the isomp4 demux ignores 
the new segment event and starts timestamping output buffers at 0.</FONT> 
<BR><FONT face=Arial size=2>This is harmless on some configurations where the 
video sink outputs frames in decoding order ignoring the timestamps, but on more 
restrictive configurations, it blocks playback until the new chain catches up 
with the playback time at which the previous one stopped (and as a nasty side 
effect, it rapidly drains our download queue, causing playback 
jerkiness).</FONT></P>
<P><FONT face=Arial size=2>I am not sure how to handle this: should we force the 
new chain to seek up to the playback position it is supposed to start ? Should 
the offset rather be encoded in the MP4 enveloppe ? If so, would it even be 
parsed by the current isomp4 demux ?</FONT></P>
<P><FONT face=Arial size=2>Thanks in advance for any explainations (I may have 
got it all wrong) and/or tips …</FONT> </P>
<P><FONT face=Arial size=2>David Corvoysier</FONT> <BR><FONT face=Arial 
size=2>Orange Labs </FONT></P></BODY></HTML>