wojiushiwn / mp4parser

Automatically exported from code.google.com/p/mp4parser
0 stars 0 forks source link

"tfhd" flags interpretation #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1.Open file foo3.mp4
2.Examine moof > traf > tfhd
3.flags is 11 and defaultSampleDuration is displayed.

Per my understanding of ISO/IEC 14496-12, flags 11 should mean 
base-data-offset-present and default-sample-size-present

I am using 1.0 on Win7

Original issue reported on code.google.com by hz01...@gmail.com on 25 Jun 2011 at 12:35

Attachments:

GoogleCodeExporter commented 9 years ago
The value is calculated and not actually read! Please always keep in mind that 
the parser interprets the boxes. It may show things that are actually not in 
the file.

Original comment by Sebastian.Annies on 10 Jul 2011 at 7:47

GoogleCodeExporter commented 9 years ago
sorry - I misunderstood your comment. 

The default value is 0. But there is no value! 0 is just the default. I just 
changed it to -1 to make clear that there is no value

Original comment by Sebastian.Annies on 10 Jul 2011 at 8:03

GoogleCodeExporter commented 9 years ago
Hi Sebastian, thanks for looking into this.

I am not sure that I fully understand what you mean by "there is no value". The 
flags are 11, both baseDataOffset and defaultSampleSize are present.  I am 
using isoviewer-1.1-SNAPSHOT.jar to look at the file now and it looks fine. In 
other words isoviewer-1.1-SNAPSHOT.jar works pretty much as expected. It seems 
it displays all fields regardless of the flags.  

Original comment by hz01...@gmail.com on 10 Jul 2011 at 9:03

GoogleCodeExporter commented 9 years ago
The Object has a field 'defaultSampleSize'. The type of the field is 'long'. I 
cannot make the value disappear. The field always contains a value and by 
default '0'. I could switch to 'Long' to have the possibility to put a 'null' 
into the field but I think it's ok to have a '-1' to represent 'no value 
available'.

Original comment by Sebastian.Annies on 11 Jul 2011 at 6:42

GoogleCodeExporter commented 9 years ago
Sebastian, I think there is some misunderstanding or miscommunication here.
What I meant is the following:
When the flags are 11, the following should be present:
 1. baseDataOffset 
 2. defaultSampleSize
The other fields such as defaultSampleDuration should not be present.

The original version of isoviewer does NOT show baseDataOffset, 
defaultSampleSize, but shows defaultSampleDuration. I thought this is incorrect.

isoviewer-1.1-SNAPSHOT.jar shows baseDataOffset, defaultSampleSize correclty, 
and shows 0 for other fields such as defaultSampleDuration.  I think this is 
not desirable, but it is OK if someone knows that 0 may mean the field is not 
present.

Original comment by hz01...@gmail.com on 11 Jul 2011 at 9:10

GoogleCodeExporter commented 9 years ago
I'm not going to change anything here but will accept patches.

Original comment by Sebastian.Annies on 5 Sep 2011 at 10:27