Mp4ff Versions Save

Library and tools for parsing and writing MP4 files including video, audio and subtitles. The focus is on fragmented files. Includes mp4ff-info, mp4ff-encrypt, mp4ff-decrypt and other tools.

v0.44.0

4 weeks ago

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

v0.43.0

4 weeks ago

Added

  • InitSegment.TweakSingleTrakLive changes an init segment to fit live streaming
  • Made bits.Mask() function public
  • New counter methods added to bits.Reader
  • colr box support for nclc and unknown colour_type
  • av01, encv, and enca direct pointers in stsd

Changed

  • All readers and writers in bits package now stop working at first error and provides the first error as AccError()
  • Renamed bits.AccErrReader, bits.AccErrEBSPReader, bits.AccErrWriter to corresponiding names without AccErr
  • Renamed bits.SliceWriterError to bits.ErrSliceWrite
  • colr box supports unknown colrType

Fixed

  • kind box full-box header
  • stpp support when the optional fields do not have a zero-termination byte
  • mp4ff-wvttlister now lists all boxes in a sample

v0.42.0

3 months ago

Fixed

  • Support avc3 sample description when encrypting
  • Full ProfileLevelTier parsing for HEVC
  • Make pssh UUID comparison case-insensitive

Added

  • W3C Common PSSH Box UUID
  • HEVC PicTiming SEI message parsing
  • JSON marshaling of AVC PicTiming SEI message

v0.41.0

4 months ago

Added

  • Support for decrypting PIFF-encrypted segments

Fixed

  • Parsing of AVCDecoderConfigurationRecord
  • Parsing of time offset in AVC PicTiming SEI
  • Set senc.perSampleIVSize properly

v0.40.2

6 months ago

Fixed

  • Test of AVC PicTiming SEI with cbpDbpDelay set
  • mp4ff-nallister has nicer output for annexb streams
  • mp4ff-nallister handles AVC PicTiming SEI with cbpDbpDelay set

v0.40.1

6 months ago

Fixed

  • Swap of parameters in mp4ff-decrypt

v0.40.0

6 months ago

Added

  • New CLI app: mp4ff-encrypt to encrypt segments
  • New CLI app: mp4ff-decrypt to decrypt segments
  • New encyption-related functions in mp4
    • GetAVCProtectRanges to fine protection ranges for AVC video
    • CryptSampleCenc for encrypting of decrypting with cenc scheme
    • EncryptSampleCbcs - for encrypting with cbcs scheme
    • DecryptSampleCbcs - for decrypting with cbcs scheme
    • InitProtect to protect an init segment
    • EncryptFragment to encrypt a fragment
    • DecryptInit to extract and remove decryption info from an init segment
    • DecryptFragment to decrypt a fragment
    • ExtractInitProtect to generate data needed for encryption
  • AccErrEBSPReader.NrBitsRead method
  • PsshBoxesFromBase64 and PsshBoxesFromBytes functions

Fixed

  • SPS.ChromaArrayType method
  • Makefile now builds all CLI applications with version

v0.39.0

7 months ago

Changed

  • TfraEntry Time and MoofOffset types changed to unsigned
  • TfraEntr attribute name SampleDelta corrected to SampleNumber

Added

  • MediaSegment and Fragment have new StartPos attribute
  • mp4.File now has Mfra pointer
  • MfraBox has new method FindEntry
  • MediaSegment, Fragment, and Trun method CommonSampleDuration
  • Added two MSS UUID constants

Fixed

  • mp4ff-wvttlister works with Unified Streaming wvtt ismt file
  • Fragment.GetFullSamples() allows tfdt to be absent
  • Fragment.GetFullSamples() defaults to offset being moof
  • mp4ff-wvttlister works for Unified Streaming wvtt asset
  • mp4crop now crops elst entries
  • mp4crop now handles multiple sample durations correctly
  • HEVC SPS parsing details

v0.38.1

7 months ago

Fixed

  • ReadMP4File() failed when mfro not present

v0.38.0

8 months ago

Added

  • Loudness boxes ludt, tlou, and alou
  • Description boxes desc, ©cpy, ©nam, ©ART boxes
  • GenericContainerBox struct
  • new DecFileFlags provide option to DecodeFile to look for mfra box

Changed

  • Made ©too use GenericContainerBox
  • SidxBox got new attribute AnchorPoint

Fixed

  • DecodeFile uses sidx or mfra data to find segment boundaries