scuffle icon indicating copy to clipboard operation
scuffle copied to clipboard

refactor: mp4

Open lennartkloock opened this issue 8 months ago • 3 comments

This splits the original scuffle-mp4 crate into multiple crates:

  • A new crate called isobmff which contains everything described by ISO/IEC 14496-12
  • scuffle-h264 now contains the AVC boxes described by ISO/IEC 14496-15
  • scuffle-h265 now contains the HEVC boxes described by ISO/IEC 14496-15
  • scuffle-av1 now contains the AV1 boxes described by AV1 Codec ISO Media File Format Binding
  • A new crated called scuffle-opus which contains the Opus boxes described by Encapsulation of Opus in ISO Base Media File Format
  • The original scuffle-mp4 crate now only contains the actual MP4 boxes (not ISOBMFF) described by ISO/IEC 14496-14

Other changes:

  • New derive macro to derive the new isobmff::IsoBox, zero-copy Deserialize and zero-copy Serialize traits

Note for reviewers: isobmff::boxes contains a lot of code that can only be reviewed by going through the spec step by step. Maybe start with other modules first.

CLOUD-31 CLOUD-88

lennartkloock avatar Apr 28 '25 22:04 lennartkloock

Codecov Report

:x: Patch coverage is 61.23135% with 1845 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 57.17%. Comparing base (6cafac7) to head (ee540e2).

Files with missing lines Patch % Lines
crates/isobmff/src/boxes/file_delivery_format.rs 0.00% 359 Missing :warning:
crates/isobmff/src/boxes/audio_media.rs 17.33% 267 Missing :warning:
crates/isobmff/src/boxes/sample_group.rs 40.24% 199 Missing :warning:
crates/isobmff/src/boxes/sample_groups.rs 52.63% 162 Missing :warning:
crates/isobmff/src/boxes/metadata.rs 73.73% 161 Missing :warning:
crates/isobmff/src/boxes/video_media.rs 36.48% 141 Missing :warning:
crates/isobmff/src/boxes/movie_fragments.rs 85.22% 94 Missing :warning:
crates/bytes-util/src/zero_copy/serde.rs 48.17% 71 Missing :warning:
crates/isobmff/src/common_types.rs 41.66% 70 Missing :warning:
...tes/isobmff/src/boxes/post_decoder_requirements.rs 0.00% 55 Missing :warning:
... and 21 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #442      +/-   ##
==========================================
- Coverage   61.48%   57.17%   -4.31%     
==========================================
  Files         385      359      -26     
  Lines       31171    30376     -795     
==========================================
- Hits        19165    17368    -1797     
- Misses      12006    13008    +1002     
Files with missing lines Coverage Δ
crates/av1/src/boxes.rs 100.00% <100.00%> (ø)
crates/bytes-util/src/bit_write.rs 100.00% <ø> (ø)
crates/ffmpeg/src/encoder.rs 97.26% <ø> (ø)
crates/ffmpeg/src/io/output.rs 88.12% <ø> (ø)
crates/flv/src/video.rs 100.00% <ø> (ø)
crates/flv/src/video/body.rs 100.00% <ø> (ø)
crates/flv/src/video/body/legacy.rs 100.00% <100.00%> (ø)
crates/h264/src/boxes.rs 100.00% <100.00%> (ø)
crates/h264/src/config.rs 100.00% <100.00%> (ø)
crates/h264/src/sps/sps_ext.rs 100.00% <ø> (ø)
... and 42 more

... and 58 files with indirect coverage changes

Components Coverage Δ
scuffle-aac 89.47% <ø> (ø)
scuffle-amf0 90.31% <ø> (ø)
scuffle-av1 96.70% <76.92%> (-1.71%) :arrow_down:
scuffle-batching 100.00% <ø> (ø)
scuffle-bootstrap 82.91% <ø> (ø)
scuffle-bytes-util 84.72% <63.69%> (-11.99%) :arrow_down:
scuffle-context 100.00% <ø> (ø)
scuffle-expgolomb 100.00% <ø> (ø)
scuffle-ffmpeg 90.00% <ø> (ø)
scuffle-flv 95.23% <60.00%> (-0.36%) :arrow_down:
scuffle-future-ext 50.00% <ø> (ø)
scuffle-h264 99.68% <100.00%> (+<0.01%) :arrow_up:
scuffle-h265 73.53% <100.00%> (+0.11%) :arrow_up:
scuffle-http 86.45% <ø> (-0.10%) :arrow_down:
isobmff 60.93% <60.11%> (∅)
scuffle-metrics 95.02% <ø> (ø)
scuffle-mp4 25.96% <ø> (-51.53%) :arrow_down:
nutype-enum ∅ <ø> (∅)
scuffle-opus 0.00% <ø> (∅)
postcompile 44.24% <ø> (ø)
scuffle-pprof 100.00% <ø> (ø)
scuffle-rtmp 89.95% <ø> (-0.94%) :arrow_down:
scuffle-settings 99.11% <ø> (ø)
scuffle-signal 95.41% <ø> (ø)
scuffle-transmuxer 94.65% <ø> (-0.37%) :arrow_down:
tinc 46.94% <ø> (ø)
openapiv3_1 49.74% <ø> (ø)
:rocket: New features to boost your workflow:
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Apr 28 '25 22:04 codecov[bot]

🚀 Preview Deployments

Deployment Status Preview URL
dashboard ⏭️ -
docs ⏭️ -
rustdoc https://docs-scuffle-hdrntuoj9-scufflecloud.vercel.app
cloud emails render https://scufflecloud-email-preview-jqgayzdkj-scufflecloud.vercel.app

github-actions[bot] avatar Oct 04 '25 13:10 github-actions[bot]

consider nbyte-int (or on crates.io) for the u24/u48 integers, please open issues on any functionality you may need I will try to help

vrtgs avatar Nov 09 '25 11:11 vrtgs