Skip to content

TIKA-4802: Expose the MP4 video bitrate (video:bitrate) - #2984

Open
dschmidt wants to merge 2 commits into
apache:mainfrom
dschmidt:mp4-video-bitrate
Open

TIKA-4802: Expose the MP4 video bitrate (video:bitrate)#2984
dschmidt wants to merge 2 commits into
apache:mainfrom
dschmidt:mp4-video-bitrate

Conversation

@dschmidt

Copy link
Copy Markdown
Contributor

JIRA: https://issues.apache.org/jira/browse/TIKA-4802

MP4Parser reads the average audio bitrate from the sound track's esds (TIKA-4779) but does not expose the video track's bitrate. A new TikaMp4VideoHandler (mirroring TikaMp4SoundHandler) reads the average bitrate from the video sample entry's btrt BitRateBox and sets it as video:bitrate.

Tested against a 1.8 KB ffmpeg-generated clip (testMP4Video.mp4, btrt avgBitrate 6536). The esds path (legacy MPEG-4 Part 2 video) is out of scope; modern H.264/HEVC carry the bitrate in btrt.

Overlaps #2982 (TIKA-4800), which adds the same Video.java and testMP4Video.mp4 fixture; whichever merges second has a trivial rebase.

@dschmidt
dschmidt marked this pull request as ready for review July 30, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant