[
https://issues.apache.org/jira/browse/TIKA-2935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18110435#comment-18110435
]
Dominik Schmidt commented on TIKA-2935:
---------------------------------------
Still reproducible on main. With DefaultDetector and a TikaInputStream,
file-backed as well as streamed, Tika's own fixtures come back as
video/quicktime: testMP4Video.mp4 and testMP4AudioOnly.mp4 both carry the isom
brand, and the magic for video/mp4 only matches mp41 and mp42. A file whose
major brand happens to be mp42 is detected correctly, which may be why this
looked fixed. testMP4.m4a works for the same reason, its own brand has an entry.
Adding isom to the video/mp4 magic would not do either: testMP4AudioOnly.mp4
carries it too and would then be detected as video. PR #3114 reads the track
handlers instead.
> MP4 content type identified as application/mp4 rather than video/mp4
> --------------------------------------------------------------------
>
> Key: TIKA-2935
> URL: https://issues.apache.org/jira/browse/TIKA-2935
> Project: Tika
> Issue Type: Bug
> Components: detector, mime
> Affects Versions: 1.21
> Reporter: Steven Baskin
> Priority: Minor
> Attachments: Smile_Doctors_-_Team_Members.mp4
>
>
> Im currently trying to use Tika detector to identify the content type of the
> file attached to this ticket. Using both the default detector with default
> config in java and the {{tika-app-1.21 }}jar the type is being returned as
> {{application/mp4}}.
> According to [https://tools.ietf.org/html/rfc4337]::
> {quote}Selection of MIME Types for MP4 Files
> The MIME types to be assigned to MP4 files are selected according to
> the contents. Basic guidelines for selecting MIME types are as
> follows:
> a) if the file contains neither visual nor audio presentations, but
> only, for example, MPEG-J or MPEG-7, use application/mp4;
> b) for all other files, including those that have MPEG-J, etc., in
> addition to video or audio streams, video/mp4 should be used;
> however:
> c) for files with audio but no visual aspect, including those that
> have MPEG-J, etc., in addition to audio streams, audio/mp4 may be
> used.
> {quote}
> As the file has both video and audio components, it seems this file type
> should be identified as {{video/mp4.}}
> I was hoping to get some help in working out whether this a bug that can be
> fixed or if there is a problem on my end.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)