Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-3310

MP4 video detected as application/mp4

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0, 1.26
    • None
    • None

    Description

      The attached file is an MP4 video.  When running new Tika().detect() it returns video/quicktime.   But when actually running it through the MP4Parser, it returns a very generic application/mp4.

       

      Looking at the code, it seems that the generic type comes about because the majorBrand of my file is isom, which doesn’t match any of the desired values, so it defaults to application/mp4.  Now, I know absolutely nothing about mp4 encoding.  But looking further, I see there’s a list of compatibleBrands, which in my case, includes mp41, which would match the expected type of video/mp4 .

       I coded this up so that if the major brand does not match one of the desired values, it checks to see if any of the compatible brands match, and uses the first one it finds.

       Is this a proper solution?

      Attachments

        1. sample-movie.mp4
          10.06 MB
          Peter Kronenberg

        Activity

          People

            Unassigned Unassigned
            peterkronenberg Peter Kronenberg
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: