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

Eyevinn / mp4ff
82%
master: 82%

Build:
Build:
LAST BUILD BRANCH: sphericalv1
DEFAULT BRANCH: master
Repo Added 01 Nov 2024 09:40PM UTC
Files 169
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: stream-process
CHANGE BRANCH
x
Reset
  • stream-process
  • avs3
  • codespell
  • dac4
  • decode-box-body-sr
  • 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
  • flac
  • fuzz-box
  • golangci-lint-v2
  • handle-trailing-avc1-bytes
  • iMro0t-feature-encryption-boxes
  • iMro0t-fix-avcdecoderconfig
  • improved-crypt-tools
  • master
  • mdhd-dur-info
  • minimal-ac4
  • mp4-blackbox-test
  • mpeg-h
  • new-pssh-func
  • opus
  • patch-1
  • return-partial-files
  • sampleflags-test
  • sphericalv1
  • 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 stream-process
  • 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
See All Builds (182)
  • 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

© 2026 Coveralls, Inc