• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Eyevinn / mp4ff
82%
master: 82%

Build:
Build:
LAST BUILD BRANCH: stream-process
DEFAULT BRANCH: master
Repo Added 01 Nov 2024 09:40PM UTC
Files 174
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH stream-process
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • avs3
  • codespell
  • dac4
  • feat-coll-box
  • feat-hevc-encrypt
  • feat-vp-codec-sample-box
  • feature-encryption-boxes
  • feature/exporttfhd
  • fix-avcdecoderconfig
  • fix-co64-size-overflow
  • fix-interleaved-sidx-boxes
  • fix-mime-box
  • fix-senc-robustness
  • fix-short-esds-issue-393
  • fix-sliceheader-spsid
  • fix-ssix-box
  • fix-stsc
  • fix-subs-box
  • fix-trailing-avc1-bytes
  • fix-typos
  • fuzz-box
  • golangci-lint-v2
  • handle-trailing-avc1-bytes
  • iMro0t-feature-encryption-boxes
  • iMro0t-fix-avcdecoderconfig
  • improved-crypt-tools
  • master
  • minimal-ac4
  • mp4-blackbox-test
  • mpeg-h
  • new-pssh-func
  • opus
  • patch-1
  • return-partial-files
  • sampleflags-test
  • stream-process
  • test-header-parsing
  • test-visualsampleentry
  • update-docs
  • update-make
  • v0.48.0
  • v0.49.0
  • v0.50.0
  • vtpl1-master
  • vvc
  • vvc-nal-headers
  • weird-dac3

28 Oct 2025 12:30PM UTC coverage: 81.601% (+0.1%) from 81.501%
18874849030

Pull #465

github

tobbee
feat: add streaming/incremental processing for fragmented MP4 files.

Add Copy method for StypBox and FtypBox.

Implements support for processing fragmented MP4 files incrementally without
loading entire files into memory. This is essential for handling large media
files, live streaming scenarios, and network streams where fragments arrive
over time.

Key components:

1. StreamFile API (stream.go)
   - DecodeStream/InitDecodeStream: Reads init segment (ftyp, moov) and stops
   - ProcessFragments: Iteratively processes fragments with callbacks
   - Sliding window memory management with configurable retention
   - Fragment lifecycle callbacks for processing and cleanup control

2. BoxSeekReader (boxseekreader.go)
   - Emulates seeking on non-seekable streams using buffered reading
   - Auto-growing buffer sized for current needs
   - Peek operations for looking ahead without consuming data

3. SampleAccessor interface
   - GetSample: Fetch individual samples (1-based indexing)
   - GetSampleRange: Fetch ranges of samples efficiently
   - GetSamples: Fetch all samples for a track

Buffer management:
- ReadFullBox returns a slice view of the buffer (no copy for performance)
- Callers must use data immediately before next operation
- ResetBuffer() explicitly clears buffer after parsing is complete
- Buffer clearing happens after box parsing, not during ReadFullBox
- For mdat seeks, ResetBuffer() called after seek to avoid buffer corruption

Testing:
- Comprehensive test suite using external black-box testing (mp4_test package)
- Tests cover streaming, callbacks, sliding windows, retention, sample access
- All tests use public API only per project guidelines
Pull Request #465: Stream process support with example for on-the-fly MP4 encryption and refragmentation

806 of 962 new or added lines in 7 files covered. (83.78%)

18015 of 22077 relevant lines covered (81.6%)

0.9 hits per line

Relevant lines Covered
Build:
Build:
22077 RELEVANT LINES 18015 COVERED LINES
0.9 HITS PER LINE
Source Files on master
  • Tree
  • List 174
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
18874849030 stream-process feat: add streaming/incremental processing for fragmented MP4 files. Add Copy method for StypBox and FtypBox. Implements support for processing fragmented MP4 files incrementally without loading entire files into memory. This is essential for ha... Pull #465 28 Oct 2025 12:32PM UTC tobbee github
81.6
18775892352 stream-process fix: Add trun.AddSampleDefaultValues before extracting samples, add input file option to stream-encrypt Pull #465 24 Oct 2025 09:39AM UTC tobbee github
81.6
18225472042 stream-process better test coverage Pull #465 03 Oct 2025 02:42PM UTC tobbee github
81.59
18224928217 stream-process docs: update CHANGELOG.md Pull #465 03 Oct 2025 02:20PM UTC tobbee github
81.47
18166478260 master fix: When the GroupingType of SbgpBox or SgpdBox is roll, the remaining Childen will be missing the box push 01 Oct 2025 03:03PM UTC tobbee github
81.5
18132574062 patch-1 fix: When the GroupingType of SbgpBox or SgpdBox is roll, the remaining Childen will be missing the box Pull #464 01 Oct 2025 02:59PM UTC web-flow github
81.5
17940930601 master fix: handle trailing bytes in avc1 box (issue #444) Proper fix for a bigger context with boxes after the avc1 box. New test content added. push 23 Sep 2025 09:01AM UTC tobbee github
81.5
17940757458 fix-trailing-avc1-bytes fix: handle trailing bytes in avc1 box (issue #444) Proper fix for a bigger context with boxes after the avc1 box. New test content added. Pull #461 23 Sep 2025 08:57AM UTC tobbee github
81.5
17491747882 master docs: v0.50.0 preparation push 05 Sep 2025 11:21AM UTC tobbee github
81.5
17491714443 v0.50.0 docs: v0.50.0 preparation Pull #459 05 Sep 2025 11:20AM UTC tobbee github
81.5
See All Builds (167)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc