IEC61937 13 encoder example - Fraunhofer-IIS/iec61937-13 GitHub Wiki

About

The iec61937-13 repository provides a command-line program as an example to encode MPEG-H Audio bitstream into IEC61937-13 data burst format.

The example program:

  • takes a MP4 file, containing a MPEG-H audio track, as input and extracts the MPEG-H Audio frames from MP4 file format (using the mmtisobmff project).
  • encodes the extracted MPEG-H Audio frames to the IEC data bursts
  • stores the encoded IEC data bursts into a file (IEC raw format).

How to build

To build the IEC61937-13 encoder command-line example program set iec61937-13_BUILD_BINARIES variable while configuring the project using CMake :

$ cmake -S iec61937-13 -B build -DCMAKE_BUILD_TYPE=Release -Diec61937-13_BUILD_BINARIES=True

Read build instructions to learn how to configure and build the project.

If build process is successfully finished, the IEC61937-13 encoder command-line tool iec61937-13_encoder can be found:

  • in the build/bin folder
  • in the build/bin/Release folder on Windows

Usage

$ build/bin/iec61937-13_encoder <path to input file> <path to output file> <samplerate factor> <swap byte order flag>
<path to input file>
relative or absolute path to an input MP4 file containing MPEG-H audio track (in MHM1 format) to encode.
<path to output file>
relative or absolute path to an output file which will contain the encoded IEC data bursts.
<samplerate factor>
IEC61937-13 sampling rate factor (4 or 16)
<swap byte order flag>
allows to pairwise swap the IEC data burst output (1 to swap pairwise, 0 to keep the byte order)
NOTE: the default byte order is Big-Endian

Testing

To test MPEG-H decoding with the provided command-line program example or with your own implementation please use test material from test content repository.

Additionally you can:

Example to test IEC61937-13 encoding for the file provided in test content repository:

$ build/bin/iec61937-13_encoder TRI_Fileset_17_514H_D1_D2_D3_O1_24bit2160p50.audio.mp4 out.raw 4 0

Example above:

  • takes the TRI_Fileset_17_514H_D1_D2_D3_O1_24bit2160p50.audio.mp4 test item as input.
  • sets the IEC61937-13 sampling rate factor to 4x
  • keeps the byte order (no byte swapping)
  • writes the encoded IEC data bursts to out.raw file.

You can verify the created IEC data bursts file:

Remarks

  • Only the first MPEG-H Audio track will be processed, other MPEG-H Audio tracks will be ignored/skipped.
  • Other tracks than MPEG-H Audio track will be ignored/skipped.
⚠️ **GitHub.com Fallback** ⚠️