AS-DCP File Access Library
asdcplib is an open source implementation of
SMPTE and the MXF Interop
"Sound & Picture Track File" format. It was originally developed with support from
DCI. Development is currently supported by
CineCert and other D-Cinema manufacturers. See the bundled README file for more information.
asdcplib is implemented in C++ and builds on Win32 and most unix platforms that support GCC.
The following SMPTE standards (and their normative references) are supported:
- 377M-2004
- 381M-2005
- 382M-2007
- 429-3-2006
- 429-4-2006
- 429-5-2008
- 429-6-2006
- 429-10-2008
asdcplib supports reading and writing MXF files containing sound (PCM),
picture (JPEG 2000 or MPEG-2) and timed-text (XML) essence. Plaintext and ciphertext are both supported
using OpenSSL for cryptographic support.
An object-oriented API is provided along with a command-line program
asdcp-test that provides access to most of the API.
For answers to questions, please send a message to
asdcplib@cinecert.com.
Current stable version
Download version 1.8.44
MD5 digest value: = 493f9d3656b76eff973ade07cb2b74c7
change log:
2011-11-30 - bug fixes v1.8.44
- Corrected a wrong decryption UL selection when unwrapping MXF.
- Corrected broken Essence UL matching. (fixed in v1.8.43)
- Added missing HFR support for PCM essence reader/writer. (fixed in v1.8.42)
------------
A set of files has been prepared to demonstrate the Timed Text features.
Download example Timed Text files
MD5 digest value: = ed5267427940f37f8fe07c0fcc6e4a95
Older versions
Download version 1.8.41
MD5 digest value: = 028158c06299dccbc9b83ad4e9d56b58
change log:
2011-08-30 - bug fixes, enhancements v1.8.41
- UL version byte now ignored when comparing UL values.
- Changed the version byte in the TimedTextEssence UL to 0x01. There
is no published Essence Keys registry so it can't have a maintained
version number.
- JP2K Sequence Parser modified to skip directory entries that
are not files in the case where the parser is initialized with
a directory path. When initialized with a list of file names
this check is not performed. Based on a hint by Steve Quartly.
- Increased the size of the MPEG header parser buffer.
- Added missing FrameType() implementation to ASDCP::MPEG2::MXFReader.
- Added missing Close() implementations to MXF reader classes.
- Added missing Timestamp::Timestamp(const char* datestr) implementation.
(Thanks to Matt Sheby for this and the previous three items.)
- Fixed error in Kumu::FortunaRNG::FillRandom() that was returning the
end of the random buffer instead of the front (Mike Radford).
- Added support for proposed sound channel format identifiers
'7.1DS' and 'WTF'. Optimistically chose version '0x0c'.
- Added support for stereoscopic images in JP2K files at edit
rates of 48, 50 and 60 eups (96, 100 and 120 fps).
Download version 1.7.40
MD5 digest value: = f6dd480b95fdefc9251a68c0df991e16
change log:
2010.11.15 - bug fixes, enhancements v1.7.40
- Fixed bug in long KLV packet support (Thanks to Jim R.)
- Fixed AvgBps in PCM files, *again*. Sorry for the crazy.
- More fixes and changes in support of 25, 30, 50, 60 fps.
(Thanks to Hans K. for the TC rate bug).
- Updated KLVFill UL version element to 0x02.
- Type change to support Xerces-C 3.x. (Thanks to Matt S.)
- Some internal API changes to KLV types. Does not affect
operation.
- Added NetworkLocator type to MXF metadata types.
- Added file offset display to klvwalk.
Download version 1.6.37
MD5 digest value: = 22fc511fe7ec98c0d76292ee674ba4d8
change log:
2010.07.20 - bug fix, v1.6.37
- Fixed TimedTextResourceSubDescriptor UL value.
Download version 1.6.36
MD5 digest value: = 73d9b3ce11bdd6da146eee607eb1adfa
change log:
2010.06.15 - bug fixes, enhancements, v1.6.36
- Added support for new Edit Rates to asdcp-test.cpp.
- Expanded timed-text file reader in asdcp-test.cpp.
- Fixed large BER value encoding (plaintext) and decoding
(plaintext and ciphertext). This feature was introduced in
v1.5.31).
- Fixed AvgBps value for multi-channel Wave input.
Download version 1.6.34
MD5 digest value: = 539e8fcebd0abb8795ee40fdc73411f8
change log:
2010.05.13 - bug fixes, enhancements, v1.6.34
- ST 429-5 files have corrected ULs for DCTimedTextDescriptor and
GenericStream DataElement. Files made with previous versions of
the library are incompatible with this and future versions.
- Fixed File Package TrackNumber values. Thanks to Sankar.
- Added edit rate constants to AS_DCP.h (25, 30, 50, 60).
- Changed AudioDescriptor "SampleRate" element name to "EditRate"
to make it consistent with the other types.
- Now builds with XercesC 3.x.
- KM_memio.h has better const behavior.
- Fixed a bug in KM_memio.h string archiving.
Download version 1.5.32
MD5 digest value: = 5e68c15c56e9483edeca1cf08767d3ef
change log:
2010.01.05 - bug fixes and enhancements, v1.5.32
- Re-fixed swapped Interop and SMPTE OP Atom UL values. The swap
introduced in v1.5.31 was done in error.
- Added -z,-Z options to asdcp-test (j2c parameter checking)
- Reformed jp2k-test as j2c-test, added help and list processing,
added to standard install target.
Version 1.5.31. (not available for download)
Note: This version should not be used.
change log:
2009.12.31 - bug fixes and enhancements, v1.5.31
- Fixed swapped Interop and SMPTE OP Atom UL values.
- Added get_BER_length_for_value() subroutine.
- Modified ASDCP::h__Writer::WriteEKLVPacket() to allow larger BER
lengths for KLV packets larger than 16 MB. This was required to
support large font files in the SMPTE 429-5 implementation.
Download version 1.5.29
MD5 digest value: = 3f827278b203c81521e0c7c8a0858805
change log:
2009.11.06 - bug fixes and enhancements, v1.5.29
- Fixed a bug that could cause HMAC values to be incorrectly
stored in MXF files. Files created with versions of asdcplib
prior to this version may have incorrect HMAC values.
- Improved handing of XML files for MXF wrapping.
- Jpeg2000 codestream EditRate and SampleRate mismatches
now warns instead of returning an error.
- Improved error handling in Jpeg2000 sequence parsing routines.
- Added two methods to Kumu::Timestamp, AddSeconds(), to add (or subtract)
seconds to a time value, and GetSecondsSinceEpoch() to get the number of
seconds since the unix epoch.
- Added new option to asdcp-test, '-a', to specify a UUID when creating MXF files.
- Added support for specifying the intrinsic duration of MXF files containing
timed text.
- Added new option to wavesplit, '-i', to display WAV file metadata.
Download version 1.4.24
MD5 digest value: = 2950e29e053a602b781368031993615c
change log:
2009.05.21 - bug fixes, v.1.4.24
-
Fixed a bug that caused incorrect SubDescriptors UL values to be
written into interop format MXF track files. Note that this involved
a substantial reorganization of MXF internals. Please test thoroughly
in your application before using in production. Note that this is a
significant bug fix and track files created with 1.4.22 may be incompatible
with other systems.
Download version 1.4.22
MD5 digest value: = be22bbc14f108e91cf76b668dd795ecc
Note that v1.4.22 contains a bug that could cause track files
created with it to be incompatible with other systems. This version has
been deprecated in favor of v1.4.24.
change log:
2009.04.09 - SMPTE format fixes, enhancements and bug fixes, v.1.4.22
- asdcplib now uses GNU autotools on POSIX systems to configure
and build. See "./configure" for details. Note that two options,
--enable-freedist and --with-python are not enabled in the free
version of asdcplib and should not be used.
- Added build option (CONFIG_RANDOM_UUID) to enable mixed case UUID
generation when environment variable KM_USE_RANDOM_UUID is defined.
- Fixed a condition that could cause an error to occur when wrapping
SMPTE format timed text track files that do not define a starting
frame.
- Updated ULs for SMPTE format track files.
- SampleRate added to JP2K metadata
- Support for wrapping 96kHz WAV files added.
- Updated ULs for audio channel formats (ChannelFormat)
- Updated font subdescriptor MIME Types for TimedText Trackfiles.
- Changed time implementation to support dates beyond Jan 19th, 2038.
- Xerces-C XML parser support added.
- New build method for Windows (see win32/README.txt for details).
- Added new functionality in Kumu to recursively create and delete files
and directories, and get free disk space for a given volume path.
- Added a method to Kumu::Timestamp, AddMinutes(), to add (or subtract)
minutes to a time value.
- Improved how Kumu::Timestamp parses timestamps with offsets.
- Fixed a bug that caused incorrect HMAC values to be calculated.
Download version 1.3.18 (development version)
MD5 digest value: = d619ac9c86c30b2ceaf00fe47cda81d7
change log:
2008.02.16 - SMPTE format fixes, bug fixes v.1.3.18
- Added correct SMPTE UL for StereoscopicPictureSubDescriptor.
- Exposed JP2K metadata parser as ParseMetadataIntoDesc().
- Added simple stereoscopic framebuffer to support paired ReadFrame()
and WriteFrame() methods (allows simpler integration with other
single-buffer code).
- Improved detection of JPEG Interop stereoscopic files.
- Win32 build fixes (Thanks to Mike Crowe at DTS).
- Added the WITH_MD macro to the makefile. Set this value to one
to build Win32 with /MD[d] instead of /MT[d].
- The Generic Container UL has been added to the EssenceContainers
set in the header partition pack for encrypted files. It has always
been there in plaintext files.
Below this point the changes are internal and should not affect you
unless you use Kumu directly.
- Major refactoring of KM_log.[h|cpp].
- Fixed buffer re-sizing issue in Kumu::ByteString.
- Replaced type IdentifierList with ArchivableList.
- Added COPYING file to the release bundle.
Download version 1.2.17 (development version)
MD5 digest value: = c4e43437c8e56000d99fbb422c864262
change log:
2007.12.13 - Bug fixes v.1.2.17
- Changed Result_t implementation to use int instead of long, which
was causing trouble on some 64 bit platforms.
- Fixed EKLV HMAC. NOTE: Breaks backward compatibility with older
Interop files. To validate these files, use asdcplib-1.1.14. This
should not cause too much trouble since files with broken and
non-broken HMAC have been in the wild for years without issue.
- Fixed HMAC sequence numbering in encrypted stereoscopic files.
- Finished stereoscopic test targets in the makefile.
- Fixed the win32 build, now expects VS2005 compiler by default,
use WITH_VC6=1 top get VC6 flags.
- Stereoscopic and Timed Text modes now have SMPTE UL values.
NOTE: SMPTE 429-5 and 429-10 are not yet published. It is possible
that these UL values may change before publication. Please use
caution when using these features for production work.
- Changed a bunch of symbol names in the 429-5 implementation to
better match the spec.
- Added -U option to asdcp-test to dump the UL library to stdout.
- Fixed erroneous placement of the PictureEssenceCoding UL in JP2K
files (Interop and SMPTE modes).
Download version 1.2.16 (development version)
MD5 digest value: = 959d2fd5d1c31fcfd93a9003fc93231c
KNOWN BUGS: The following issues are known to exist with this version. These bugs
will be fixed in the next release (being prepared now).
- The Win32 build is broken
- Writing encrypted track files using LS_MXF_SMPTE causes a segfault
change log:
2007.10.22 - Timed Text, Stereoscopic Picture and Bug fixes v.1.2.16
- Significant API changes have been made. Please read all entries
in this changelog to be sure you understand the changes. Also
note that some changes have been made to LS_MXF_SMPTE files that
are incompatible with earlier releases (e.g., EKLV HMAC). If
you are looking for a stable interop release, use v.1.1.14.
- Fixed RFC 2104 HMAC implementation for LS_MXF_SMPTE only. The
broken implementation has been maintained for Interop mode.
- Added support for draft SMPTE 429-5 Timed Text Track File. This
is still waiting for official SMPTE ULs, so do not use it for
shipping products. An XML parser is needed to create a Timed
Text Track File; Expat is now an optional part of the build.
Make with WITH_XML_PARSER=1 to link with Expat. If you do not
link with expat, you will get an error when using the TimedText::
DCSubtitleParser class. See also S429-5-cgi.cpp for an example
that shows how to serve plaintext MXF file elements directly via
HTTP.
- Added support for draft SMPTE 429-10 Stereoscopic Picture Track
File, including the JPEG Interop version. This is still waiting
for official SMPTE ULs, so do not use it with LS_MXF_SMPTE for
shipping products.
- Refactored the following files as a side-effect of the above
work: AS_DCP_JP2K.cpp AS_DCP_MPEG2.cpp AS_DCP_PCM.cpp
AS_DCP_MXF.cpp AS_DCP_internal.h MXF.[h|cpp] MXFTypes.[h|cpp]
Metadata.[h|cpp] h__Reader.cpp h__Writer.cpp klvwalk.cpp.
WARNING: While significant effort has been extended to make sure
that these changes do not affect existing stable file support,
users are cautioned to test this release thouroughly.
- Added a large set of filesystem path manglers to KM_fileio.h. See
path-test.cpp for example usage. The path manglers have not yet
been tested on win32 platforms (they are currently used only by
the Timed Text module.
- The PathIsFile(), PathIsDirectory() and FileSize() subroutines
have been modified to accept const std::string& instead of
const char*.
- Added namespace and parsing support (Expat) to Kumu::XMLElement
(currently used only for Timed Text support). Also added some
new accessors.
- Altered MXF::UTF16String to use mbtowc() and wctomb().
Download version 1.1.14
MD5 digest value: = c6a741d005256b306a9a97518f518b3c
change log:
2007.03.31 - Bug fixes v.1.1.14
- Fixed KeyFrameOffset value in MPEG wrapping to have negative
value. This is probably not yet complete for handling all
types of GOPs. Please send chunks of MPEG-2 VES that you
find which break this. Thanks to Doremi.
** no other file format changes in this release **
- Fixed error in RIP interpretation when reading arbitrary (i.e.,
non-MXF) files.
- Fixed a memory leak in ASDCP::MXF::OPAtomHeader when used
in read mode. Thanks to Mahesh Bajaj for pointing out this
bug and the one above.
- Removed asserts from KM_fileio, replaced with RESULT_WRITEFAIL
return value statements.
- Added -s and -p to the makefile install target.
- Altered ByteString behavior to use target Length() in copy
operations (instead of Capacity()).
- Added new Set() method to ByteString.
- Fixed a bug in ByteString::Unarchive() that caused the operation
to fail when the buffer was smaller than the read (i.e., when
Capacity() was called).
- Added IdentifierList class to KM_util.
- Changed some Error() messages to Debug() in Wav.cpp
- Revived jp2k-test.cpp and asdcp-mem-test.cpp (they both had
stale #includes).
Download version 1.1.13
MD5 digest value: = b793f03ac26fb8ee46140b3883f37d5e
change log:
2007.02.15 - Bug fixes v1.1.13
- Removed 'VDescObj->SampleRate.Numerator = VDesc.FrameRate;'
from MPEG2_VDesc_to_MD() in AS_DCP_MPEG2.cpp, was line 76.
- Added KM_TEST_NULL_STR_L() and KM_TEST_NULL_L() macros to
KM_log.h. These versions log the location of the null value.
Macros are now used in any module that includes KM_log.h.
- MPEG2 VES with run of zero values at the head is now OK.
- Increased VESHeaderBufSize to 16K.
- Added makefile support for local OpenSSL in ../openssl, if
present.
- The Kumu::PathIs*() functions now return false if a null or
empty string is given (used to be an assert).
- Cleaned up the install target in the makefile.
- Fixed SMPTE 429-6 HMAC -- FIPS 186-2 implementation was
laughably incorrect. Thanks to Doremi for pointing this out.
- Removed default parameter to HMACContext::InitKey().
- Cleaned up messages and CLI arg handling in asdcp-test.
Download version 1.1.12
MD5 digest value: 6c6fb95d3b4531b27b87bf90a87891a5
change log:
2006.11.19 - Mo better stuff v1.1.12
- Changed read-only Result_t accessor methods to const.
- Added Base64 (-B) option to kmrandgen.
- Removed 16-bit alignment restriction from kmrandgen.
- Improved WAV file extraction speed (Thanks to Jim Radford
for pointing this out).
- Added single-channel split for WAV extraction (asdcp-test -1).
- Fixed remainder bug in h__RNG::fill_rand().
Download version 1.1.11
MD5 digest value: 02f30819c1be69cf52b2fe5510e553dc
change log:
2006.11.03 - Bug fixes v1.1.11
- Increased index table entry list size to 5000.
- Added length checking to TLV writer (returns error if TLV
payload exceeds 64kB).
- Fixed partition header and RIP errors related to 2-partition
files (MXF Interop mode).
- Added -t option to asdcp-test (SHA-1 digest with Base64 output
on stdout).
- Fixed Sub Descriptor reference bug (Thanks to Denis Leconte
for dogged determination).
- Added directory-of-wav detection to RawEssenceType()
- Modified MXF::Partition::AddChildObject() to only generate
a UUID if the InstanceID is unset.
- Added ComponentMaxRef & ComponentMinRef to RGBAEssenceDescriptor.
More to follow.
- Added detection of 2K/4K jp2c, writing correct 4K metadata.
Download version 1.1.10
MD5 digest value: f1b9830a7bd60da4ad38519f7203db18
change log:
2006.10.05 - Bug fixes v1.1.10
- Changed RM_RELEASE to RL_RELEASE in MXFTypes.h.
- Changed the MXF writer to use RL_RELEASE (was RL_DEVELOPMENT).
- Really fixed source reference chain.
- Updated JP2K file package label.
- Changed location of JPEG2000PictureSubDescriptor in the
header (was erroneously before Preface).
- Altered LS_MXF_INTEROP to produce 2-partition files.
Download version 1.1.9b
MD5 digest value: cfe4d49bcb1bc255275ba1a40db3b252
Change log:
2006.09.25 - Bug fixes v1.1.9
- Fixed SourcePackageID value. All files will be 'original',
i.e. SourcePackageID will be all zeros. Let me know if you
want to set SourcePackageID.
- Fixed compiler warnings on some Linux platforms
- Fixed the build so that BUILD_DIR is no longer created
as a dependency.
- Added duration detection to the raw essence parsers. The
MPEG parser uses a nasty approximation so don't use it
without paying close attention to the result.
- Modified PCMParserList to make it more useful as a base
class.
- Fixed bugs and re-organized command-line help in asdcp-test
and klvwalk.
- Fixed two-partition file reads.
- Fixed Win32 PRNG initialization.
- Renamed asdcp-lf-test as kmfilegen.
- Added kmrandgen and kmuuidgen.
- Added string retrieval mechanism to Result_t.
- Refactored Kumu::Identifier and its sub-classes.
is a symbolic link (unix only).
- Altered Kumu::FileWriter::OpenWrite to use file creation
mode 0664 (was 0644) (unix only).
- Added Kumu::WriteStringIntoFile() subroutine.