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

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

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

   Thanks, all addressed:
   
   1. Protected entries now report the original codec from `sinf`/`frma`; a 
bare entry without `sinf` still reports the protected format. Since there was 
no real sample, the fixtures are synthetic, built per ISO/IEC 14496-12 8.12 and 
cross-checked against FFmpeg's and GPAC's writers: a FairPlay `drms` (esds + 
sinf/frma mp4a) and testMP4Video.mp4 with its `avc1` turned into `encv` (sinf 
before btrt).
   2. Kept last-entry-wins, consistent with `audio:bitrate`/`video:bitrate`; 
it's documented in the javadoc and now guarded by a two-entry fixture (mp4a 
then ac-3).
   3. FourCCs are only exposed when all bytes are printable ASCII, with 
QuickTime's trailing padding trimmed (`raw `, `rle `).
   5. Renamed to `audio:fourcc` / `video:fourcc`. FourCCs aren't MP4-specific 
(QuickTime, AVI, ...), so no container prefix, but the name now says what the 
value is. A human-readable codec name would need the esds objectTypeIndication 
and a mapping table, so I'd keep that for a follow-up.
   6. Dropped the cross-reference to `xmpDM:audioCompressor`/`videoCompressor`.
   7. Both handlers share `Mp4SampleEntries` for the stsd walk, which now also 
handles size 0 and largesize entries (unit-tested).
   8. Trimmed the test comment, restored the ISO common encryption anchor.
   
   Not sure which item 4 was, happy to look if you paste it.
   




> 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