openpreserve / jhove

File validation and characterisation.
http://jhove.openpreservation.org
Other
171 stars 79 forks source link

Odd behavior in Text vs XML handler for WAVE-hul #881

Open thorsted opened 1 year ago

thorsted commented 1 year ago

I noticed while using the WAVE-hul 1.8.2 I get different results with a text based handler than I do with XML. Test output shows time duration correctly, but XML does not, only zeros.

  Duration:
   FrameCount: 30
   TimeBase: 1000
   VideoField: FIELD_1
   CountingMode: NTSC_NON_DROP_FRAME
   Hours: 0
   Minutes: 1
   Seconds: 30
   Frames: 0
   Samples: 
    SampleRate: S44100
    NumberOfSamples: 0
<aes:timeRange>
         <tcf:startTime tcf:frameCount="30" tcf:timeBase="1000" tcf:videoField="FIELD_1" tcf:countingMode="NTSC_NON_DROP_FRAME">
          <tcf:hours>0</tcf:hours>
          <tcf:minutes>0</tcf:minutes>
          <tcf:seconds>0</tcf:seconds>
          <tcf:frames>0</tcf:frames>
         </tcf:startTime>
         </aes:timeRange>

output.zip

carlwilson commented 1 year ago

Thanks @thorsted I suspect that there might be a similar issue to this logged. We're doing some triage work in the next 2 weeks and will try to group this if possible.

thorsted commented 1 year ago

Thanks Carl, I noticed it would work when I used a Broadcast wave with TimeReference added, but never could get the XML to give duration otherwise. Let me know if you need samples.

samalloing commented 1 year ago

Hi @carlwilson and @thorsted

After a quick look, I expect that duration is processed in the TextHandler (https://github.com/openpreserve/jhove/blob/d74599048ead2797ca9887900976b624cefbb575/jhove-core/src/main/java/edu/harvard/hul/ois/jhove/handler/TextHandler.java#L1025) and in the XMLHandler this is not: https://github.com/openpreserve/jhove/blob/d74599048ead2797ca9887900976b624cefbb575/jhove-core/src/main/java/edu/harvard/hul/ois/jhove/handler/XmlHandler.java#L4430

Sam

thorsted commented 4 months ago

@carlwilson Just checking in on this issue.

samalloing commented 4 months ago

Hi @carlwilson

Can this issue be added to the jHove 1.32 release?

Thanks

Sam