[ 
https://issues.apache.org/jira/browse/TIKA-3646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18110465#comment-18110465
 ] 

ASF GitHub Bot commented on TIKA-3646:
--------------------------------------

dschmidt commented on PR #3114:
URL: https://github.com/apache/tika/pull/3114#issuecomment-5501558113

   Honestly, having sat with this for a bit: I am not sure any more that it is 
worth it.
   
   I built it for #3115, where the video trailing a motion photo has to be 
typed before it is emitted. It turns out not to buy anything there, because the 
embedded parse runs `MP4Parser`, which sets the type correctly anyway.
   
   That is the general picture, too. `MP4Parser` already does what this 
detector does: `isAudioOnly` marks an audio-only file as `audio/mp4`, and the 
compatible brand list gets `testMP4Video.mp4` to `video/mp4`, which 
`MP4ParserTest` asserts today. Both files attached to TIKA-3646 are already 
typed correctly after a parse. What is left over is detect-only callers, and I 
do not have a real use case for that beyond tidiness.
   
   So folding it into the parser would mostly mean writing what the parser 
already does. As I see it:
   
   1. Close this, and answer TIKA-3646 with "the parse gets it right, detection 
alone does not".
   2. Keep the detector, but opt-in only (`spi = false`, the way 
`Pkcs7Detector` is), for callers that need the type without a parse.
   3. Keep only the `Mp4Boxes` extraction, which shares the box primitives 
instead of leaving a third copy of a box walk around, and drop the detector.
   
   I lean towards 1, or 3 if the shared primitives are worth keeping on their 
own. Your call.
   




> MP4 files have their mime type detected as video/quicktime
> ----------------------------------------------------------
>
>                 Key: TIKA-3646
>                 URL: https://issues.apache.org/jira/browse/TIKA-3646
>             Project: Tika
>          Issue Type: Bug
>          Components: detector
>            Reporter: Apachae Tika User
>            Priority: Major
>         Attachments: Video.mp4
>
>
> I was using ScreenToGif tool which allos to record screen and create gifs or 
> MP4 files (with ffmpeg). I've tried to use Tika Detector for such files but 
> the file is being detected asĀ  video/quicktime with .qt extension. How is 
> that?
> Attaching small video for example which was generated with ScreenToGif and 
> saved as mp4.
> I see some other people complaining for same thing here
> [https://stackoverflow.com/questions/48021617/use-apache-tika-get-mp4-file-contenttype-got-video-quicktime]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to