Skip to content

Releases: Eyevinn/mp4ff

v0.52.0

12 May 07:46

Choose a tag to compare

Added

  • KID-aware decryption key selection in mp4ff-decrypt via repeated --key kid:key flags (PR #490)
  • DecryptSegmentWithKeys and DecryptFragmentWithKeys functions in mp4 package for
    multi-key decryption using KID/key maps. Currently only reads KID from tenc box
    (seig sample group entry overrides are not yet supported)
  • Fragment.ParseSenc() and MediaSegment.ParseSenc() methods to parse senc boxes
    using encryption info from a separate init segment
  • SencBox.IsParsedByGuess() to check if senc was parsed by heuristic
  • Support for IAMF (Immersive Audio Model and Formats) iamf sample entry and
    iacb configuration box, including parsing of IAMF OBU headers for info dumping
  • Support for the legacy PIFF protection scheme (schm.scheme_type = 'piff')
    with PIFF TrackEncryption UUID box 8974dbce-7be7-4c51-84f9-7148f9882554.
    AlgorithmID 1/2 are mapped to cenc/cbcs respectively (issue #496)

Fixed

  • senc parsing when init segment is in a separate file (issue #492).
    The perSampleIVSize is now determined with correct priority:
    1. seig sample group entry, 2. tenc from init segment, 3. heuristic with saiz validation
  • DecodeSenc now delegates to DecodeSencSR removing duplicated code
  • Heuristic senc parsing validates candidates against saiz sample sizes,
    preventing incorrect perSampleIVSize selection
  • mp4.NewPsshBox now stores the supplied data argument on the returned
    box instead of dropping it (issue #497)
  • IV is now advanced between fragments when encrypting multiple cenc fragments
    with mp4ff-encrypt, avoiding IV/keystream reuse across fragments (issue #499)

Changed

  • Minimum Go version bumped from 1.16 to 1.17 (ARM64 macOS support)
  • mp4.EncryptFragment now returns (nextIV []byte, err error) so callers
    can chain the IV across fragments. Update call sites that previously
    captured only the error

v0.51.0

20 Feb 15:04

Choose a tag to compare

Added

  • Copy methods for FtypBox and StypBox
  • StreamFile for decoding a stream of fragmented mp4
    • BoxSeekReader to make an io.Reader available for lazy mdat processing
    • examples/stream-encrypt showing how to read and process a multi-segment file
      • On an HTTP request, a file is read, optionally further fragmented, and then encrypted
  • New functions DecodeBoxBody and similar to allow for two-step header and body parsing
  • Support for FLAC audio including fLaC and dfLa boxes
  • Support for ID32 (ID3v2) box
  • Support Spherical Video V1 Metadata

Fixed

  • AddEmptyTrack returns reference to newly added track
  • duration is printed by MdhdBox.Info()
  • extended size usage only allowed for mdat boxes
  • trackID is checked when decrypting content
  • Proper handling of trailing bytes in avc1 (VisualSampleEntryBox). Issue 444
  • Proper removal of boxes when decrypting PR 464
  • More robust decode of malformed files

v0.50.0

05 Sep 11:27

Choose a tag to compare

Added

  • Support for VVC with vvcC box and VvcDecoderConfigurationRecord
  • Support for parsing of VVC NALU headers and listing types in mp4ff-nallister
  • Support for AC-4 audio including ac-4 and dac4 boxes
  • Support for Opus and dOps boxes
  • Support for MPEG-H sample descriptors including mhaC configuration boxes
  • Support for AVS3 video sample descriptors: avs3 and av3c boxes
  • Improved error handling for too short box header

Changed

  • Makefile update to setup and run pre-commit with configuration
  • Return type of Sample.PresentationTime to int64 instead of uint64
    This may happen together with edit lists (seen for VVC video)
  • Corrected SetSyncSampleFlags and SetNonSyncSampleFlags functions
  • Allow for trailing less than 8-bytes in VisualSampleEntry. Solves issue 444
  • Allow unspecified aspect_radio_idc == 0 in avc VUI

Fixed

  • The SliceHeader parser for AVC now uses SPS ID and not PPS ID to look up the SPS

v0.49.0

05 Sep 11:08

Choose a tag to compare

Added

  • NewPsshBox function

Changed

  • mp4.DecodeFile can return a partially decoded file with an error
  • mp4ff-info may print a partially parsed box tree together with an error

Fixed

  • Handle multi-segment files with sidx without styp #430
  • Improved RemoveEncryptionBoxes function

v0.48.0

28 Mar 16:31

Choose a tag to compare

Changed

  • mp4.NewUUIDFromHex() changed to more general mp4.NewUUIDFromString()
  • cmd/mp4ff-decrypt -key option instead of -k. Takes hex or base64 value
  • cmd/mp4ff-encrypt -key and -kid options now take hex or base64 values
  • Replaced mp4.AlouBox and mp4.TlouBox with a common mp4.LoudnessBaseBox
  • mp4.Measurement changed to clearer mp4.LoudnessMeasurement

Added

  • mp4.SetUUID() can take base64 string as well as hex-encoded.
  • Support for weird dac3 box with initial 4 zero bytes (Issue #395)
  • Lots of fuzzying tests and changes to avoid panic on bad input data
  • Support for SMPTE-2086 Mastering Display Metadata Box (SmDm)
  • Support for Content Light Level Box (CoLL)
  • Better test coverage for VisualSampleEntryBox
  • IsVideoNaluType functions in both avc and hevc packages
  • Exported constants for ColrBox's ColorType
  • mp4.NewFreeBox, mp4.NewSkipBox functions
  • mp4.FreeBox.Payload method
  • mp4.SencBox methods: SetPerSampleIVSize, PerSampleIVSize, and ReadButNotParsed
  • Function mp4.CreateUnknownBox
  • Functions mp4.NewTfrfBox and mp4.NewTfxdBox
  • HEVC (hvc1) encryption
  • AppendProtectRange function is now public

Fixed

  • Support short ESDS without SLConfig descriptor (issue #393)
  • HEVC Slice Header CollocatedFromL0Flag should be true by default
  • Update to golangci-lint/v2 and fixed all warnings

v0.47.0

12 Nov 11:30

Choose a tag to compare

Changed

  • CreatePrftBox now takes flags parameter
  • PrftBox Info output
  • Removed ReplaceChild method of StsdBox
  • CreateHdlr name for timed metadata
  • extension .m4s is interpreted as MP4 file in mp4ff-pslister
  • moved mp4.GetVersion() to internal.GetVersion()

Added

  • NTP64 struct with methods to convert to time.Time
  • Constants for PrftBox flags
  • Unittest to all programs in cmd and examples.
  • Documentation in doc.go files for all packages

Fixed

  • Allow missing optional DecoderSpecificInfo
  • Avoid mp4.File.Mdat pointing to an empty mdat box
  • cmd/mp4ff-encrypt did not parse command line
  • SeigSampleGroupEntry calculated skipBytes incorrectly
  • cmd/mp4ff-pslister did not parse annex B HEVC correctly
  • error when decrypting and re-encrypting a segment (issue #378)

v0.46.0

08 Aug 19:00
e2b2aeb

Choose a tag to compare

Fixed

  • mvhd, tkhd, and mdhd timestamps were off by one day
  • allow other sbgp and sgpd types than seig with senc

Added

  • mvhd, tkhd, and mdhd methods to set and get creation and modification times
  • Event Message boxes evte, emib, emeb
  • GetBtrt method to StsdBox
  • Btrt pointer attribute in AudioSampleEnntry
  • stpp can be used as value to CreateEmptyTrak

v0.45.1

12 Jul 10:42
b4b85be

Choose a tag to compare

Added

  • Box decoder error messages include start position

Fixed

  • Overflow in calculating sample decode time
  • elng box errononously did not include full box headers

Recap of v0.45.0

tagged 6 weeks earlier, but only released the same day

Changed

  • minimum Go version 1.16.
  • ioutil imports replaced by io and os imports
  • Info (mp4ff-info) output for esds boxes
  • API of descriptors
  • Parsing and info output for url boxes

Fixed

  • support for parsing of hierarchical sidx boxes
  • handling of partially bad descriptors
  • handle url boxes missing mandatory zero-ending byte

Added

  • support for ssix box
  • support for leva box
  • details of descriptors as Info outout (mp4ff-info)

v0.45.0

12 Jul 10:39
4c795c0

Choose a tag to compare

Changed

  • minimum Go version 1.16.
  • ioutil imports replaced by io and os imports
  • Info (mp4ff-info) output for esds boxes
  • API of descriptors
  • Parsing and info output for url boxes

Fixed

  • support for parsing of hierarchical sidx boxes
  • handling of partially bad descriptors
  • handle url boxes missing mandatory zero-ending byte

Added

  • support for ssix box
  • support for leva box
  • details of descriptors as Info outout (mp4ff-info)

v0.44.0

19 Apr 13:36
c85f831

Choose a tag to compare

Added

  • New TryDecodeMfro function
  • New mp4ff-subslister tool replacing mp4ff-wvttlister. It supports wvtt and stpp
  • File.UpdateSidx() to update or add a top level sidx box for a fragmented file
  • mp4.DecStartSegmentOnMoof flag to make the Decoder interpret every moof as
    a new segment start, unless styp, sidx, or mfra boxes give that information.
  • New example add-sidx shows how on can add a top-level sidx box to a fragmented file.
    It further has the option to remove unused encryption boxes, and to interpret each
    moof box as starting a new segment.
  • New method MoovBox.IsEncrypted() checks if an encrypted codec is signaled

Fixed

  • More robust check for mfro at the end of file
  • GetTrex() return value
  • Can now write PIFF uuid box that has previously been read
  • Does now avoid the second parsing of senc box if the file is ot encrypted as seen in moov box.

Removed

  • mp4ff-wvttlister tool removed and replaced by mp4ff-subslister