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

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

tballison commented on PR #3062:
URL: https://github.com/apache/tika/pull/3062#issuecomment-5431655063

   From my claude:
   ```
   Worth acting on
     1. Protected entries report the wrapper fourcc, not the codec 
(TikaMp4SoundHandler.java:94, same in Video). For drms/enca/encv/drmi, ISO 
14496-12 puts the real codec in
        the child sinf/frma box; the handler already walks child boxes for 
esds/btrt, so frma is reachable. As-is a FairPlay .m4p gives audio:format=drms 
— and audio:has-drm
        already carries that fact. Once released, the value semantics are 
frozen. (The testMP4_drm.m4a fixture's drms entry is a bare stub with no sinf, 
so a real sample is
        needed to test.)
     2. Last-entry/last-track wins, undocumented (TikaMp4SoundHandler.java:94). 
FORMAT is overwritten per stsd entry and per track, HAS_DRM is set on any 
entry. [enca, mp4a]
        → has-drm=true, format=mp4a; AAC+E-AC-3 tracks → format=ec-3 while 
bitrate comes from the AAC track. Pick first-entry or document it; no 
multi-entry test guards it.
     3. fourcc emitted verbatim with no printability check 
(TikaMp4VideoHandler.java:108). Previously only compared; now a public metadata 
value. Corrupt bytes 00 01 02 03
        land as control chars in XML output. Gate on printable ASCII 0x20–0x7E 
and trim QuickTime trailing spaces (raw , rle ).
     4 

> Expose the MP4 audio and video track codecs (audio:format, video:format)
> ------------------------------------------------------------------------
>
>                 Key: TIKA-4838
>                 URL: https://issues.apache.org/jira/browse/TIKA-4838
>             Project: Tika
>          Issue Type: New Feature
>            Reporter: Dominik Schmidt
>            Priority: Major
>
> The MP4/QuickTime parser does not expose the per-track codec identifiers. 
> TikaMp4SoundHandler and TikaMp4VideoHandler read the sample-entry format 
> fourcc but only use it for other purposes (audio: DRM detection; video: 
> nothing).
> Add audio:format and video:format, each carrying the four-character codec 
> identifier from the track's sample description (audio mp4a/alac/ac-3, video 
> avc1/hev1). For protected streams (drms/enca, encv/drmi) the original codec 
> is recovered from the nested frma box.
> The existing xmpDM:audioCompressor only fires for audio-typed files and 
> carries the container major brand, and xmpDM:videoCompressor carries the 
> compressor name (encoder string, e.g. "Lavc… libx264"), so neither gives the 
> per-track codec fourcc for video/* files.
> Rounds out the per-track metadata added in TIKA-4779, TIKA-4800 and TIKA-4802.



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

Reply via email to