Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

tkhd should parse track height and width as fixed point numbers

Open
#178 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
backend

Research direction

Start in mp4parse/src/lib.rs around the tkhd parser at line 1098, then compare the C API handling at mp4parse_capi/src/lib.rs:725 and the MPEG4 specification. Determine how the fixed-point width and height should be represented and parsed; done means the values are no longer off by a factor of 65536 without relying on unsupported assumptions about the fixed crate.

Written by the indexing model from the issue text.

Description

compliance

the tkhd parser currently parses the width and height fields of a track as u32.

According to the MPEG4 spec, these fields are fixed-points.

This leads to the parsed values being off by a factor of 65536.

It looks like this is handled in the C API by shifting the number right 16 bits

Unfortunately, Rust doesn't provide built-in fixed-point support but it looks like a couple of crates implement it (see fixed), but this would require adding a dependency. I'm also not sure if that crate provides an interface for parsing fixed-point numbers from binary.

Dominant language
Rust
Stars
448
Forks
72
Avg merge
20d 3h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla/mp4parse-rust

All issues in mozilla/mp4parse-rust

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.