samvera / hydra-works

A ruby gem implementation of the PCDM Works domain model based on the Samvera software stack
Other
24 stars 14 forks source link

FITS identification "CONFLICT" - Go with majority "identity" value? #390

Open conorom opened 2 years ago

conorom commented 2 years ago

I think I've seen this more than once, but recently I've seen this issue occur, causing a totally broken/inaccessible file in Fedora because:

Wouldn't it make sense to parse out the mime type with the most tools listed? Is that possible to do?

Thanks for your thoughts!

note: I downloaded fits-1.0.5 for this check as it's the reliable old version listed as supported in Hydra Derivatives. I think the app was using 1.5.5 but it's not relevant to the issue.

conorom@2379591511:~/fits-1.0.5$ ./fits.sh -v
1.0.5

conorom@2379591511:~/fits-1.0.5$ ./fits.sh -i ~/Downloads/EnglishAudioRecording.mp3
Nov 01, 2022 5:51:57 PM edu.harvard.hul.ois.jhove.JhoveBase init
SEVERE: Testing SEVERE level
<?xml version="1.0" encoding="UTF-8"?>
<fits xmlns="http://hul.harvard.edu/ois/xml/ns/fits/fits_output" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hul.harvard.edu/ois/xml/ns/fits/fits_output http://hul.harvard.edu/ois/xml/xsd/fits/fits_output.xsd" version="1.0.5" timestamp="11/1/22 5:52 PM">
  <identification status="CONFLICT">
    <identity format="MPEG 1/2 Audio Layer 3" mimetype="audio/mpeg" toolname="FITS" toolversion="1.0.5">
      <tool toolname="Droid" toolversion="6.1.5" />
      <tool toolname="Exiftool" toolversion="10.00" />
      <tool toolname="NLNZ Metadata Extractor" toolversion="3.6GA" />
      <tool toolname="ffident" toolversion="0.2" />
      <tool toolname="Tika" toolversion="1.10" />
      <version toolname="NLNZ Metadata Extractor" toolversion="3.6GA">1</version>
      <externalIdentifier toolname="Droid" toolversion="6.1.5" type="puid">fmt/134</externalIdentifier>
    </identity>
    <identity format="Audio file with ID3 version 2.2.0, contains:MPEG ADTS, layer III, v1, 160 kbps, 44.1 kHz, JntStereo MPEG ADTS, layer III, v1, 160 kbps, 44.1 kHz, JntStereo" mimetype="audio/mpegaudio/mpeg" toolname="FITS" toolversion="1.0.5">
      <tool toolname="file utility" toolversion="5.41" />
    </identity>
  </identification>
  <fileinfo>
    <filepath toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">/Users/conorom/Downloads/EnglishAudioRecording.mp3</filepath>
    <filename toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">EnglishAudioRecording.mp3</filename>
    <size toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">322571010</size>
    <md5checksum toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">46d238208b2018bb7c87662ace4016f2</md5checksum>
    <fslastmodified toolname="OIS File Information" toolversion="0.2" status="SINGLE_RESULT">1665450882870</fslastmodified>
  </fileinfo>
  <filestatus />
  <metadata>
    <audio>
      <duration toolname="NLNZ Metadata Extractor" toolversion="3.6GA" status="SINGLE_RESULT">4:28:48:541</duration>
      <bitRate toolname="Exiftool" toolversion="10.00" status="CONFLICT">160 kbps</bitRate>
      <bitRate toolname="NLNZ Metadata Extractor" toolversion="3.6GA" status="CONFLICT">160000</bitRate>
      <sampleRate toolname="Exiftool" toolversion="10.00">44100</sampleRate>
      <channels toolname="Exiftool" toolversion="10.00">2</channels>
      <milliseconds toolname="NLNZ Metadata Extractor" toolversion="3.6GA" status="SINGLE_RESULT">16128541</milliseconds>
      <title toolname="Tika" toolversion="1.10" status="SINGLE_RESULT">PDC full</title>
      <sampleRate toolname="Tika" toolversion="1.10" status="SINGLE_RESULT">44100</sampleRate>
    </audio>
  </metadata>
  <statistics fitsExecutionTime="3446">
    <tool toolname="OIS Audio Information" toolversion="0.1" status="did not run" />
    <tool toolname="ADL Tool" toolversion="0.1" status="did not run" />
    <tool toolname="VTT Tool" toolversion="0.1" status="did not run" />
    <tool toolname="Droid" toolversion="6.1.5" executionTime="595" />
    <tool toolname="Jhove" toolversion="1.11" executionTime="3400" />
    <tool toolname="file utility" toolversion="5.41" executionTime="1247" />
    <tool toolname="Exiftool" toolversion="10.00" executionTime="1298" />
    <tool toolname="NLNZ Metadata Extractor" toolversion="3.6GA" executionTime="1104" />
    <tool toolname="OIS File Information" toolversion="0.2" executionTime="1734" />
    <tool toolname="OIS XML Metadata" toolversion="0.2" status="did not run" />
    <tool toolname="ffident" toolversion="0.2" executionTime="985" />
    <tool toolname="Tika" toolversion="1.10" executionTime="1388" />
  </statistics>
</fits>