GithubHelp home page GithubHelp logo

bbc / bmx Goto Github PK

View Code? Open in Web Editor NEW
57.0 9.0 16.0 15.9 MB

Library and utilities to read and write broadcasting media files. Primarily supports the MXF file format

License: BSD 3-Clause "New" or "Revised" License

C++ 89.18% Shell 0.06% C 6.07% Dockerfile 0.03% CSS 0.01% HTML 0.15% JavaScript 0.12% CMake 4.38%
broadcasting mxf video audio

bmx's Introduction

bmx Library and Utilities

bmx is a library and set of utilities to read and write the SMPTE ST 377-1 MXF file format.

bmx is used to support standardisation efforts in the broadcast industry. It provides utilities for creating standard compliant sample files. It serves as an example implementation for MXF file format standards.

bmx includes the libMXF low-level MXF C library and the libMXF++ C++ wrapper library.

bmx provides a set of commandline applications:

  • raw2bmx: create MXF files from raw essence files
  • bmxtranswrap: re-wrap from one MXF file to another MXF file
  • mxf2raw: output MXF file metadata and raw essence
  • bmxparse: text dump raw essence files using the bmx library's parser class

bmx provides a set of file format text dumper and essence extraction tools:

  • h264dump: text dump raw H.264 bitstream files
  • j2cdump: text dump raw JPEG 2000 codestreams
  • jp2extract: extract JPEG 2000 codestream from a JP2 file (ISO/IEC 15444-1 / ITU T.800 Annex I)
  • movdump: text dump Quicktime / MP4 files
  • rdd36dump: text dump SMPTE RDD 36 (Apple ProRes) bitstream files
  • vc2dump: text dump SMPTE ST 2042 VC-2 bitstream files
  • MXFDump: text dumper for MXF files from the AAF SDK. This utility is made available and built as part of libMXF.

The following input and output wrapper formats and flavours are supported:

The following essence formats are supported:

Topics

A number of topics are described in more detail in the docs/ directory, including the following:

Build, Test and Install

bmx is developed on Ubuntu Linux but is supported on other Unix-like systems and Windows.

The cmake build system is used, with minimum version 3.12. The build requires the git tool along with the C/C++ compilers.

The build process has been tested on Ubuntu, Debian, MacOS and Windows (Microsoft Visual C++ 2017 v15.9.51 and later versions).

Dependencies

The libMXF and libMXF++ libraries are provided in the deps/ directory.

The uriparser and expat libraries are required. These libraries are typically provided as software packages on Unix-like systems; the Ubuntu / Debian package names are liburiparser-dev and libexpat1-dev. The libraries are built from the GitHub source when building on Windows using Microsoft Visual Studio C++.

The uuid library (Ubuntu / Debian package name uuid-dev) is also required for non-Apple Unix-like systems.

The libcurl (Ubuntu / Debian package name libcurl4-openssl-dev) library is an optional dependency for Unix-like systems. It enables support for reading MXF files over HTTP(S). Add the -DBMX_BUILD_WITH_LIBCURL=ON option to the cmake configure command to include it in the build.

Commands

A basic commandline process is described here for platforms that default to the Unix Makefiles or Visual Studio cmake generators. See build.md for more detailed build options.

Replace <build type> in the commandlines below with Debug or Release. Note that the Visual Studio generator supports multiple build types for a configuration, which is why the build type is selected after configuration.

The default generator can be overridden using the cmake -G option. The list of available generators is shown at the end of the output of cmake --help.

Start by creating a build directory and change into it. The commandlines below use a out/build build directory in the working tree, which follows the approach taken by Microsoft Visual Studio C++.

Unix-like (Unix Makefiles)

Build and test using

mkdir -p out/build
cd out/build
cmake ../../ -DCMAKE_BUILD_TYPE=<build type>
cmake --build .
make test

Install using

sudo make install

The installation may require root permissions. Add -DCMAKE_INSTALL_PREFIX=<install dir> (fill in <install dir>) to the first cmake command above to change the installation directory.

If not using macOS, run ldconfig to update the runtime linker cache. This avoids library link errors similar to "error while loading shared libraries".

sudo /sbin/ldconfig

Windows (Visual Studio)

Build and test using

mkdir out\build
cd out\build
cmake ..\..\
cmake --build . --config <build type>
ctest -C <build type>

Install using

cmake --build . --config <build type> --target install

The installation may require administrator privileges. Add -DCMAKE_INSTALL_PREFIX=<install dir> (fill in <install dir>) to the first cmake command above to change the installation directory.

Building External Applications

External applications that require bmx can be built using cmake similar to the simple executable example shown below.

cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
project(example_project LANGUAGES CXX)

include(FetchContent)
FetchContent_Declare(bmx
    GIT_REPOSITORY "https://github.com/bbc/bmx"
    GIT_TAG "origin/main"
)
FetchContent_GetProperties(bmx)
if(NOT bmx_POPULATED)
    FetchContent_Populate(bmx)
    add_subdirectory(${bmx_SOURCE_DIR} ${bmx_BINARY_DIR})
endif()

add_executable(example example.cpp)
target_link_libraries(example bmx)

The BMX_BUILD_LIB_ONLY cmake option can be set to ON to avoid building the apps and examples in bmx, libMXF and libMXF++. Setting the option to ON will disable the bmx tests because they requires the apps. Add this line to the cmake

set(BMX_BUILD_LIB_ONLY ON CACHE BOOL "Build bmx, MXF and MXF++ libraries only")

Docker

The bmxtools Docker images are made available in the GitHub Container Registry. Pull the latest version using,

docker pull ghcr.io/bbc/bmxtools:latest

The docker/bmx_docker.sh shell script is provided to make it easier to run the Docker container. Run

./docker/bmx_docker.sh

See Docker Run for more details on the script.

Docker Build

The Dockerfile is used for building a Docker image containing a set of tools from bmx, libMXF and AAF SDK.

The Dockerfile contains a build and runtime layer:

  • build: builds and checks the libMXF, libMXF++ and bmx code.
  • runtime: provides the commandline tool executables built in the build layer.

The runtime Docker image can be built in the top-level directory using docker build,

DOCKER_BUILDKIT=1 docker build -t bmxtools .

If you are behind a proxy then remember to use the --build-arg commandline arguments to set the Docker proxy ARGS.

Docker Run

The docker/bmx_docker.sh shell script is provided to make it easier to run the Docker container. Run

./docker/bmx_docker.sh

to see the usage and list of available tools.

The script maps the file user and group ID so that files have the user's identity when written to the output directory on the host. This is needed if Docker runs the container as the root user.

The script bind mounts input and output directories on the host to /input and /output directories on the container. The default is to set input and output directories to the current host directory.

If the input and output directories are the same then that directory is also bind mounted to the container's working directory. If the input or output directory is the current directory then it is also bind mounted to the container's working directory.

This example runs bmxtranswrap from input ./in.mxf to output ./out.mxf.

./docker/bmx_docker.sh bmxtranswrap -o out.mxf in.mxf

This example runs bmxtranswrap from input ./in.mxf to output /tmp/out.mxf.

./docker/bmx_docker.sh --output /tmp bmxtranswrap -o /output/out.mxf in.mxf

This example runs bmxtranswrap from input ./sources/in.mxf to output ./dests/out.mxf.

./docker/bmx_docker.sh --input ./sources --output ./dests bmxtranswrap -o /output/out.mxf /input/in.mxf

Source and Binary Distributions

Source distributions, including dependencies, and binaries are made available in the Releases on GitHub. Older distributions can be found on SourceForge.

Source and binary distributions are generally only created when a new feature is required for creating standard compliant sample files for example, or when a release hasn't been made for a long time.

Conan

Additionally bmx (including MXF and MXF++) is available via the Conan package manager for C/C++: bmx Conan recipe. Conan Center Index offers precompiled packages for many target systems and otherwise allows to build locally according to a local conan build profile. Follow the code snippets and documentation on the linked page for integrating it.

License

The bmx library is provided under the BSD 3-clause license. See the COPYING file provided with this library for more details.

bmx's People

Contributors

1480c1 avatar akharkev avatar andrewbonney avatar irieger avatar marcantoine-arnaud avatar ngaullier avatar nichot20 avatar nishabfhg avatar pchapmanvc avatar philipdenier avatar philipnbbc avatar phygon avatar thomasheritage avatar uilianries avatar wiiaboo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bmx's Issues

Index table must be complete before repeating

SMPTE ST 377-1:2019, section 11.2.1 (Index Table Segments), item 6 states "If repetition of the Index Table is required, then the previous Index Table shall be completed before the repetition starts. A repetition of an Index Table shall commence in a new Partition.".

If the bmx OP1a writer is configured to combine essence and index segments in body partitions (OP1A_BODY_PARTITIONS_FLAVOUR define and --body-part commandline option) will write any remaining index table segments to the footer partition. That should be changed to always write remaining segments to a body partition (with no essence). Any index table repetition will then occur after the index table has been completed.

Check that the default flavour that uses separate partitions for index table segments does the right thing.

Note: SMPTE RDD 9:2013 follows 377-1:2004 as explained in section 8.2.1.1: "Note: The last Index Table Segment (e.g., #2 shown in Figure 8) is not repeated but is placed in the Complete Index Table in the Footer. This mechanism conflicts with rule 6 of Section 11.2.1 'Index Table Segments' in SMPTE ST 377-1. In order to maintain compatibility with legacy products, RDD 9 inherits the mechanism used in its initial implementation in conformance with SMPTE ST 377:2004 which does not include the aforementioned rule."

Building static binaries and .so files

I am trying to use the BUILD_SHARED_LIBS=OFF flag to build a static library of bmx v 1.1 for include in a project. I cannot figure out how to generate the .so files by reading your docs though. When I combine that flag with the steps in the readme, it still ends up installing in /usr/local/bin and no intermediate step seems to give me .so files. What am I missing?

I am on Unix with gcc 8.5 and cmake 3.20.2.

AddressSanitizer: global-buffer-overflow in updateAAFLocalKey function of MXFDump.cpp

Description:
I found a global-buffer-overflow when testing the MXFDump binary within bmx, specifically in the updateAAFLocalKey function.

Affected Software:

Software: bmx
Version: 1.2
Operating System: Debian 11
Kernel: Linux debian 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64 GNU/Linux

Impact:
A global-buffer-overflow vulnerability can lead to application crashes, data corruption, security vulnerabilities, and system instability.

Steps to Reproduce:

Build the affected software (bmx) with AddressSanitizer enabled.
Execute MXFDump with provided poc that triggers the vulnerable code path.
Observe the AddressSanitizer report indicating a global-buffer-overflow error.

Example Output (AddressSanitizer):

[ K = Header ( 0000000000000000 )
06.0e.2b.34.02.05.01.01.0d.01.02.01.01.02.04.00, L =        120 (78), LL = 4 ]
       Major Version = 0001
       Minor Version = 0002
             KAGSize = 00000001
       ThisPartition = 0000000000000000
   PreviousPartition = 0000000000000000
     FooterPartition = 0000000000022198
     HeaderByteCount = 0000000000003f74
      IndexByteCount = 0000000000000000
            IndexSID = 00000000
          BodyOffset = 0000000000000000
             BodySID = 00000000
 Operational Pattern = 06.0e.2b.34.04.01.01.02.0d.01.02.01.10.00.00.00
                     = [ Atom ]
   EssenceContainers = [ count =          2 ]
                   0 = 06.0e.2b.34.04.01.01.03.0d.01.03.01.02.7f.01.00
                     = [ Not recognized ]
                   1 = 06.0e.2b.34.04.01.01.07.0d.01.03.01.02.0b.01.00
                     = [ Not recognized ]

[ K = Primer ( 000000000000008c )
06.0e.2b.34.02.05.01.01.0d.01.02.01.01.05.01.00, L =       1268 (4f4), LL = 4 ]
  [ Number of entries =         70, Entry size        =         18 ]
  Local Tag      UID
  3c.0a     :    06.0e.2b.34.01.01.01.01.01.01.15.02.00.00.00.00
  3b.02     :    06.0e.2b.34.01.01.01.02.07.02.01.10.02.04.00.00
  3b.05     :    06.0e.2b.34.01.01.01.02.03.01.02.01.05.00.00.00
  3b.07     :    06.0e.2b.34.01.01.01.02.03.01.02.01.04.00.00.00
  3b.08     :    06.0e.2b.34.01.01.01.04.06.01.01.04.01.08.00.00
  3b.06     :    06.0e.2b.34.01.01.01.02.06.01.01.04.06.04.00.00
  3b.03     :    06.0e.2b.34.01.01.01.02.06.01.01.04.02.01.00.00
  3b.09     :    06.0e.2b.34.01.01.01.05.01.02.02.03.00.00.00.00
  3b.0a     :    06.0e.2b.34.01.01.01.05.01.02.02.10.02.01.00.00
  3b.0b     :    06.0e.2b.34.01.01.01.05.01.02.02.10.02.02.00.00
  3c.09     :    06.0e.2b.34.01.01.01.02.05.20.07.01.01.00.00.00
  3c.01     :    06.0e.2b.34.01.01.01.02.05.20.07.01.02.01.00.00
  3c.02     :    06.0e.2b.34.01.01.01.02.05.20.07.01.03.01.00.00
  3c.03     :    06.0e.2b.34.01.01.01.02.05.20.07.01.04.00.00.00
  3c.04     :    06.0e.2b.34.01.01.01.02.05.20.07.01.05.01.00.00
  3c.05     :    06.0e.2b.34.01.01.01.02.05.20.07.01.07.00.00.00
  3c.06     :    06.0e.2b.34.01.01.01.02.07.02.01.10.02.03.00.00
  3c.07     :    06.0e.2b.34.01.01.01.02.05.20.07.01.0a.00.00.00
  3c.08     :    06.0e.2b.34.01.01.01.02.05.20.07.01.06.01.00.00
  19.01     :    06.0e.2b.34.01.01.01.02.06.01.01.04.05.01.00.00
  19.02     :    06.0e.2b.34.01.01.01.02.06.01.01.04.05.02.00.00
  27.01     :    06.0e.2b.34.01.01.01.02.06.01.01.06.01.00.00.00
  3f.06     :    06.0e.2b.34.01.01.01.04.01.03.04.05.00.00.00.00
  3f.07     :    06.0e.2b.34.01.01.01.04.01.03.04.04.00.00.00.00
  44.01     :    06.0e.2b.34.01.01.01.01.01.01.15.10.00.00.00.00
  44.02     :    06.0e.2b.34.01.01.01.01.01.03.03.02.01.00.00.00
  44.05     :    06.0e.2b.34.01.01.01.02.07.02.01.10.01.03.00.00
  44.04     :    06.0e.2b.34.01.01.01.02.07.02.01.10.02.05.00.00
  44.03     :    06.0e.2b.34.01.01.01.02.06.01.01.04.06.05.00.00
  48.01     :    06.0e.2b.34.01.01.01.02.01.07.01.01.00.00.00.00
  48.04     :    06.0e.2b.34.01.01.01.02.01.04.01.03.00.00.00.00
  48.02     :    06.0e.2b.34.01.01.01.02.01.07.01.02.01.00.00.00
  48.03     :    06.0e.2b.34.01.01.01.02.06.01.01.04.02.04.00.00
  4b.01     :    06.0e.2b.34.01.01.01.02.05.30.04.05.00.00.00.00
  4b.02     :    06.0e.2b.34.01.01.01.02.07.02.e1.03.01.03.00.00
  02.01     :    06.0e.2b.34.01.01.01.02.04.07.01.00.00.00.00.00
  02.02     :    06.0e.2b.34.01.01.01.02.07.02.02.01.01.03.00.00
  10.01     :    06.0e.2b.34.01.01.01.02.06.01.01.04.06.09.00.00
  15.02     :    06.0e.2b.34.01.01.01.02.04.04.01.01.02.06.00.00
  15.01     :    06.0e.2b.34.01.01.01.02.07.02.01.03.01.05.00.00
  15.03     :    06.0e.2b.34.01.01.01.01.04.04.01.01.05.00.00.00
  06.01     :    06.0e.2b.34.01.01.01.02.07.02.01.03.03.03.00.00
  61.01     :    06.0e.2b.34.01.01.01.05.06.01.01.04.02.0c.00.00
  47.01     :    06.0e.2b.34.01.01.01.02.06.01.01.04.02.03.00.00
  06.01     :    ea.0e.2b.34.01.01.01.02.05.30.04.04.01.00.00.00
  ff.ff     :    06.0e.2b.34.01.01.01.09.06.01.01.04.02.0d.00.00
MXFDump : Warning : Cannot remap static local key as specified by Primer Pack (property "EditUnitByteCount" has local key 3f05 in the MXF dictionary and 0000 in the Primer)
=================================================================
==1180388==ERROR: AddressSanitizer: global-buffer-overflow on address 0x56355f6e5fe8 at pc 0x56355f6b49be bp 0x7ffeeba4f940 sp 0x7ffeeba4f938
READ of size 2 at 0x56355f6e5fe8 thread T0
    #0 0x56355f6b49bd in updateAAFLocalKey /mnt/fast/DCP/bmx/deps/libMXF/tools/MXFDump/MXFDump.cpp:3320
    #1 0x56355f6b49bd in printPrimer /mnt/fast/DCP/bmx/deps/libMXF/tools/MXFDump/MXFDump.cpp:6389
    #2 0x56355f6b49bd in mxfDumpKLV /mnt/fast/DCP/bmx/deps/libMXF/tools/MXFDump/MXFDump.cpp:6663
    #3 0x56355f68dd19 in mxfDumpKLV /mnt/fast/DCP/bmx/deps/libMXF/tools/MXFDump/MXFDump.cpp:3577
    #4 0x56355f68dd19 in mxfDumpFile /mnt/fast/DCP/bmx/deps/libMXF/tools/MXFDump/MXFDump.cpp:6746
    #5 0x56355f68dd19 in main /mnt/fast/DCP/bmx/deps/libMXF/tools/MXFDump/MXFDump.cpp:7550
    #6 0x7f48e01a6d09 in __libc_start_main ../csu/libc-start.c:308
    #7 0x56355f69a199 in _start (/mnt/fast/DCP/bmx/out/build-asan/_deps/libmxf-build/tools/MXFDump/MXFDump+0x2f199)

Address 0x56355f6e5fe8 is a wild pointer.
SUMMARY: AddressSanitizer: global-buffer-overflow /mnt/fast/DCP/bmx/deps/libMXF/tools/MXFDump/MXFDump.cpp:3320 in updateAAFLocalKey
Shadow bytes around the buggy address:
  0x0ac72bed4ba0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0ac72bed4bb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0ac72bed4bc0: 00 00 00 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9
  0x0ac72bed4bd0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0ac72bed4be0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
=>0x0ac72bed4bf0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9[f9]f9 f9
  0x0ac72bed4c00: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0ac72bed4c10: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0ac72bed4c20: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0ac72bed4c30: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
  0x0ac72bed4c40: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==1180388==ABORTING

POC:
bmx-poc.zip

Disclosure Timeline:

Date of Discovery: 27/05/2024
Date Reported to Vendor: 27/05/2024

Acknowledgments:
This vulnerability was discovered and reported by 0xd4n.

Include "macOS" in ApplicationPlatform of Identification

It appears that in MXF files created with the macOS build of bmx, the ApplicationPlatform (aka "platform") field of the Identification is libMXF (Unknown). I think libMXF (macOS) (or similar) would be expected?

MXF files made using bmx on other platforms have values such as libMXF (Win32) or libMXF (Linux 64-bit)

Add ContainerConstraintsSubDescriptor

This is mandated by SMPTE ST 379-2 although is often not implemented in practice.

Suggested actions:

  • Confirm that bmx operations are always compliant with ST 379-2
  • Add a command line flag to enable addition of a ContainerConstraintsSubDescriptor instance to an MXF file
  • Automatically include a ContainerConstraintsSubDescriptor instance in any (OP1a?) MXF file that includes ProRes essence
    • Motivated by the fact that SMPTE RDD 44 specifically mentions the ContainerConstraintsSubDescriptor and real MXF files produced by the authors of RDD 44 appear to always contain the ContainerConstraintsSubDescriptor

Note:

  • I don't think we'd want the ContainerConstraintsSubDescriptor to be added whenever -t imf is used because IMF Track Files often don't contain the ContainerConstraintsSubDescriptor in practice, not least because some Track Files are defined with reference to ST 379-1 instead of ST 379-2

Sample rate restriction via MXFDescriptorHelper::SetSampleRate

Hey,

I'd like to understand what the reasoning is to restrict the sample rate very strictly in the MXFDescriptorHelper::SetSampleRate method?

I was experimenting with some different frame rates - while maybe not as common - there is use cases using for example 48fps (HFR cinema) or experimenting with "real" HFR at 100/120fps. Also is there something specifying that a MXF can't hold arbitrary frame sample rates? While I don't see a specific use to use something like 42fps or whatever, I'd be curious why the container is preventing it. Also for like time lapse or slow motion data to me it would be more logical to define the actual fps to represent the content semantically the way it was captured and then in editing adapt to the required project rate.

Did a quick test by commenting the following part out and creating a clip at an arbitrary frame rate (just hit two numbers on the keyboard and landed on 27fps). Was no problem to get Resolve to read the file with the "correct" fps emerging from that and reassigning the needed project rate to it is also straight forward.

    BMX_CHECK(sample_rate == FRAME_RATE_23976 ||
              sample_rate == FRAME_RATE_24 ||
              sample_rate == FRAME_RATE_25 ||
              sample_rate == FRAME_RATE_2997 ||
              sample_rate == FRAME_RATE_30 ||
              sample_rate == FRAME_RATE_50 ||
              sample_rate == FRAME_RATE_5994 ||
              sample_rate == FRAME_RATE_60 ||
              (IsSound() && sample_rate == SAMPLING_RATE_48K));

And should the standard discourage such frame rates, would it maybe still be acceptable to have a parameter or setting to allow skipping this check? I thought about raising a PR but wanted to get some more background before. My idea would be to do one of the following, maybe with 1. being the more straight forward approach:

  1. Add a second, optional parameter to SetSampleRate landing at something like:
    virtual void SetSampleRate(mxfRational sample_rate, bool skip_sample_rate_check = false);. This could just be the first point in the chain of ||s to lazy evaluate to true if requested.

  2. Introduce a seperate method to the class, something like MXFDescriptorHelper::ApplyStrictSampleRateCheck.

P.S. Btw. thanks for the fix interaction on my two PRs. It is really a warming experience to have quick turnaround in PRs and makes it so much fun to contribute. Got to my main goal of being able to read and write MXF clips by looking how mxf2raw and raw2bmx work.

Check for consistent VideoLineMaps

#32 reminded that there are differences in VideoLineMap and the line numbers for 525-line were changed / fixed to be {20,283}. Check the bmx codebase to see if there are more inconsistencies that are not a result of a explicit choice by a manufacturer. E.g. VC2 has it set to {23, 285}, but there is a comment above saying it needs checking!

Write last index segment in footer for body partitions flavour

#30 changed OP1a to always write the last index table segment in a index-only body partition and not in the footer partition. That change needs to be partially reverted because it broke compatibility with RDD 44 section 5.3.2 which states that for files that are not segmented "In such a file, all Index Tables shall be stored in the Footer Partition, the Header Partition, or both.".

For the body partition flavour, if there are multiple index table segments and the index is repeated, then the last index table segment is written to a index-only body partition. Otherwise the last index table segment is written to the footer partition. If there is only 1 index table segment then it will be written to the footer partition, whether index repetition is selected or not.

Check signal standard is "none" when using non-BT709 colorimetry for HD

One of the changes made to improve compliance with RDD 44 (ProRes in MXF) was to default to the "None" signal standard for HD video that doesn't have BT709 colorimetry (color primaries, transfer characteristic or matrix coefficients). This is because SMPTE 296M and 274M require (it should be) BT709. If it's not then it shouldn't be labelled as SMPTE 296M or 274M.

The code should be checked to see if there are video formats that don't follow this logic. Keep in mind that certain products / companies may have or had a different view on this and bmx should follow whatever they do.

mxf2raw: check value of frames parameter for rdd6 option

Minor - please feel free to wontfix. You can put any old rubbish in the frames mxf2raw commandline parameter and as long as there's a number in there it seems to be happy. Specifically, if you put in a range separated by a comma rather than a hyphen, it doesn't complain but it doesn't do what you might expect either. Should only allow digits and optional hyphen.

RDD9 partition segmentation and index size not compliant with RDD 9:2013

The calculation at RDD9File.cpp:112
mPartitionInterval = 10 * frame_rate.numerator / frame_rate.denominator;
does not comply with RDD 9:2013, which says (Annex B, B.6 Table B.2) the partition length should be exactly 10.01s or 9.6s depending on the frame rate (23.98p/25p/50i: 240 frames, 29.97p/59.94i: 300 frames, 50p: 480 frames, 59.94p: 600 frames).

And the test at RDD9File.cpp:769,
mPartitionFrameCount + MAX_GOP_SIZE >= mPartitionInterval
means the partitions are all 15 frames shorter than expected.

Under RDD 9-2009, these would both be compliant, since it specifies โ€œup to approximately 10 secondsโ€ (Table 1) and โ€œup to 10 secondsโ€ (8.2).

Reviving DNxHR support?

Howdy all - Just curious if there's been any ongoing discussion around DNxHR since Thomas Gritzan did his work a few years ago (thread, repo)? I'd love to make use of bmxtranswrap for generating DNxHR opatom files, and looked at pulling Thomas' branch into the current project - it seems mostly fine, though the files aren't working in Avid at the moment.

I couldn't find much more discussion about DNxHR though, so I'm curious if there's a philosophical reason it isn't covered in this project?

DisplayF2Offset change in 2023 version of SMPTE ST 2067-21

https://github.com/bbc/bmx/blob/main/docs/imf_track_files.md says that in the IMF flavour:

add the Display F2 Offset and sets it to 0 for progressive JPEG 2000 and RDD 36 video (--display-f2-offset 0)

This was appropriate for the 2020 version of SMPTE ST 2067-21. However, the 2023 version says for DisplayF2Offset:

Shall be present if interlaced structure is used and should not be present if progressive structure is used.

For now it's probably best to take no action (to avoid backwards compatibility issues, and because this is not significant), but perhaps leave this issue open as a reminder.

strdup implicitly defined when building libMXF using -std=c11

When running my app on Rocky Linux 8.10 I got a crash in mxf_free_data_model() via the ClipWriter destructor, which I tracked down to the pointer returned by strdup() in register_set_def() in mxf_data_model.c getting trashed.

Turns out that when building using gcc (tried 9.2.1 & 12.2.1) and -std=c11, strdup() is not defined unless defining e.g. _POSIX_C_SOURCE >= 200809L before including string.h (man strdup). Without this you'll end up with the implicit declaration which returns 32-bit int. This all works fine until you start getting heap addresses that don't fit in 32-bits.

To reproduce, I build libMXF like this:
CFLAGS="-std=c11 " cmake bmx/deps/libMXF/ -DLIBMXF_BUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=ON

Then built and ran my sample app (source attached):
gcc bmxheap.c -ggdb -o bmxheap -I bmx/deps/libMXF/ -L ./mxf -lMXF
bmxheap.c.gz

LD_LIBRARY_PATH=./mxf:$LD_LIBRARY_PATH ./bmxheap

Failing to build shared libraries on Windows

Hey,

while working the conan recipe to integrate bmx into the offical conan recipe repository (conan-io/conan-center-index#23955), the CI discovered a problem when trying to build as a shared library for Windows. At first it tried to link a non-existing MXF.lib. After some reading and trying - I normally work only on Linux and macOS - I now got a bit further. As I learned, for Windows symbols need a manual export. So I found that it could be done with a CMake property with. Without that, the required lib would not be created:

set_target_properties(MXF PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)

With that set for all three libraries, the MXF.lib gets created, but linking fails with:

...
  TextBasedObjectBase.cpp
  TextLocatorBase.cpp
  TimecodeComponentBase.cpp
  TrackBase.cpp
  UTF16TextBasedSetBase.cpp
  UTF8TextBasedSetBase.cpp
  VBIDataDescriptorBase.cpp
  VC2SubDescriptorBase.cpp
  WaveAudioDescriptorBase.cpp
  Auto build dll exports
     Creating library C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/build/_deps/libmxfpp-build/libMXF++/Release/MXF++.
  lib and object C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/build/_deps/libmxfpp-build/libMXF++/Release/MXF++.exp
HeaderMetadata.obj : error LNK2019: unresolved external symbol mxf_get_version referenced in function "public: static s
truct mxfProductVersion __cdecl mxfpp::HeaderMetadata::getToolkitVersion(void)" (?getToolkitVersion@HeaderMetadata@mxfp
p@@SA?AUmxfProductVersion@@XZ) [C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxfpp-build\libMXF++\MXFp
p.vcxproj]
HeaderMetadata.obj : error LNK2019: unresolved external symbol mxf_get_platform_string referenced in function "public:
static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl mxfpp::HeaderMet
adata::getPlatform(void)" (?getPlatform@HeaderMetadata@mxfpp@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D
@2@@std@@XZ) [C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxfpp-build\libMXF++\MXFpp.vcxproj]
HeaderMetadata.obj : error LNK2019: unresolved external symbol mxf_log referenced in function "public: class mxfpp::Met
adataSet * __cdecl mxfpp::HeaderMetadata::wrap(struct MXFMetadataSet *)" (?wrap@HeaderMetadata@mxfpp@@QEAAPEAVMetadataS
et@2@PEAUMXFMetadataSet@@@Z) [C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxfpp-build\libMXF++\MXFpp.
vcxproj]
Identification.obj : error LNK2019: unresolved external symbol mxf_generate_uuid referenced in function "public: void _
_cdecl mxfpp::Identification::initialise(class std::basic_string<char,struct std::char_traits<char>,class std::allocato
r<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_stri
ng<char,struct std::char_traits<char>,class std::allocator<char> >,struct mxfUUID)" (?initialise@Identification@mxfpp@@
QEAAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00UmxfUUID@@@Z) [C:\Users\ingmar\.conan2\p\b\bmxac2f
b25ee2e96\b\build\_deps\libmxfpp-build\libMXF++\MXFpp.vcxproj]
Identification.obj : error LNK2019: unresolved external symbol mxf_get_timestamp_now referenced in function "public: vo
id __cdecl mxfpp::Identification::initialise(class std::basic_string<char,struct std::char_traits<char>,class std::allo
cator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_
string<char,struct std::char_traits<char>,class std::allocator<char> >,struct mxfUUID)" (?initialise@Identification@mxf
pp@@QEAAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00UmxfUUID@@@Z) [C:\Users\ingmar\.conan2\p\b\bmx
ac2fb25ee2e96\b\build\_deps\libmxfpp-build\libMXF++\MXFpp.vcxproj]
C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxfpp-build\libMXF++\Release\MXF++.dll : fatal error LNK1
120: 5 unresolved externals [C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxfpp-build\libMXF++\MXFpp.v
cxproj]
  Building Custom Rule C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/src/test/CMakeLists.txt
  create_test_essence.cpp
  create_test_essence.vcxproj -> C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\test\Release\create_test_essence.
  exe
  Building Custom Rule C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/src/test/CMakeLists.txt
  file_truncate.cpp
  file_truncate.vcxproj -> C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\test\Release\file_truncate.exe
  Building Custom Rule C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/src/deps/libMXFpp/tools/gen_classes/CMakeLists.tx
  t
  gen_metadata_classes.cpp
  gen_classes.vcxproj -> C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxfpp-build\tools\gen_classes\Re
  lease\gen_classes.exe
  Building Custom Rule C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/src/tools/CMakeLists.txt
  h264dump.c
  h264dump.vcxproj -> C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\tools\Release\h264dump.exe
  Building Custom Rule C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/src/tools/CMakeLists.txt
  j2cdump.c
  j2cdump.vcxproj -> C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\tools\Release\j2cdump.exe
  Building Custom Rule C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/src/tools/CMakeLists.txt
  jp2extract.c
  jp2extract.vcxproj -> C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\tools\Release\jp2extract.exe
  Building Custom Rule C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/src/tools/CMakeLists.txt
  movdump.cpp
  movdump.vcxproj -> C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\tools\Release\movdump.exe
  Building Custom Rule C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/src/tools/CMakeLists.txt
  rdd36dump.c
  rdd36dump.vcxproj -> C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\tools\Release\rdd36dump.exe
  Building Custom Rule C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/src/deps/libMXF/test/CMakeLists.txt
  test_datamodel.c
  test_datamodel.vcxproj -> C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxf-build\test\Release\test_d
  atamodel.exe
  Building Custom Rule C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/src/deps/libMXF/test/CMakeLists.txt
  test_essencecontainer.c
  test_essencecontainer.vcxproj -> C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxf-build\test\Release
  \test_essencecontainer.exe
  Building Custom Rule C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/src/deps/libMXF/test/CMakeLists.txt
  test_file.c
  test_file.vcxproj -> C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxf-build\test\Release\test_file.e
  xe
  Building Custom Rule C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/src/deps/libMXF/test/CMakeLists.txt
  test_headermetadata.c
test_headermetadata.obj : error LNK2019: unresolved external symbol mxf_get_version referenced in function test_create_
and_write [C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxf-build\test\test_headermetadata.vcxproj]
C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxf-build\test\Release\test_headermetadata.exe : fatal er
ror LNK1120: 1 unresolved externals [C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxf-build\test\test_
headermetadata.vcxproj]
  Building Custom Rule C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/src/deps/libMXF/test/CMakeLists.txt
  test_indextable.c
test_indextable.obj : error LNK2019: unresolved external symbol mxf_generate_uuid referenced in function test_create_an
d_write [C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxf-build\test\test_indextable.vcxproj]
C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxf-build\test\Release\test_indextable.exe : fatal error
LNK1120: 1 unresolved externals [C:\Users\ingmar\.conan2\p\b\bmxac2fb25ee2e96\b\build\_deps\libmxf-build\test\test_inde
xtable.vcxproj]
  Building Custom Rule C:/Users/ingmar/.conan2/p/b/bmxac2fb25ee2e96/b/src/deps/libMXF/test/CMakeLists.txt
  test_mxf_cache_file.c
...

As said, I have no clue about Windos peculiarities so maybe it is just a simple thing. For now I changed the Conan recipe to not build shared on Windows.

Unresolved symbol bmx_git_AnyUncommittedChanges / bmx_git_Describe / bmx_git_DescribeTag

I have successfully built bmx on windows with the following commands:
bmx\build> cmake -G "Visual Studio 15 2017 Win64" ..
cmake --build . --config Release --target install

However, when it comes to linking the libraries I have 6 unresolved symbols.

bmx

A search of the codebase finds the use of these functions in various places but I cannot find the implementation of them in any of the source files but instead a patch cmake\git_version_904dbda.patch

Is there a step missing in the build instructions?

MPEG-2 SD 4:3 flagged files are being tagged 16:9 thus ignoring the bitstream flag

When an MPEG-2 4:2:0 SD file is encoded with the flag 4:3 and remuxed with BMX then the flag always defaults to 16:9 thus leading to a mismatch between the flag in the bitstream and the flag in the container.

Here you're gonna find the following files:
sd_4x3_omneon.zip
sd_4x3_ffmpeg.zip
sd_wrong_ar_bmx.zip

The first one is the original SD 4:3 source muxed in .mxf by ommcp (the Harmonic Omneon muxer).
The second one is the remuxed version with FFMpeg which is still 4:3.
The third one is the bad remuxed output produced by BMX version 1.2 (latest).

SD 4:3 Omneon Mediainfo:

General
Complete name : A:\MEDIA\temp\sd_4x3_omneon.mxf
Format : MXF
Format version : 1.3
Format profile : OP-1a
Format settings : Closed / Complete
File size : 3.07 MiB
Duration : 1 s 440 ms
Overall bit rate : 17.9 Mb/s
Frame rate : 25.000 FPS
Encoded date : 2024-04-18 17:06:02.624
Writing application : Omneon Inc. Omneon Media Subsystem 9.8.0.0.1
Writing library : Omneon Media Api (windows)

Video
ID : 2
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings : BVOP
Format settings, BVOP : Yes
Format settings, Matrix : Default
Format settings, picture structure : Frame
Format settings, wrapping mode : Frame
Codec ID : 0D01030102046001-0401020201011100
Duration : 1 s 440 ms
Bit rate mode : Constant
Bit rate : 12.0 Mb/s
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Frame rate : 25.000 FPS
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 1.157
Time code of first frame : 00:00:00:15
Time code source : Group of pictures header
Stream size : 2.06 MiB (67%)
Color range : Limited
Color primaries : BT.601 PAL
Transfer characteristics : BT.601
Matrix coefficients : BT.470 System B/G

SD 4:3 FFMpeg Mediainfo:

General
Complete name : A:\MEDIA\temp\sd_4x3_ffmpeg.mxf
Format : MXF
Format version : 1.3
Format profile : OP-1a
Format settings : Closed / Complete
File size : 2.95 MiB
Duration : 1 s 440 ms
Overall bit rate : 17.2 Mb/s
Frame rate : 25.000 FPS
Encoded date : 0-00-00 00:00:00.000
Writing application : FFmpeg OP1a Muxer 61.0.100.0.0
Writing library : Lavf (mingw32) 61.0.100.0.0

Video
ID : 2
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings : BVOP
Format settings, BVOP : Yes
Format settings, Matrix : Default
Format settings, picture structure : Frame
Format settings, wrapping mode : Frame
Codec ID : 0D01030102046001-0401020201011100
Duration : 1 s 440 ms
Bit rate mode : Constant
Bit rate : 12.0 Mb/s
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Frame rate : 25.000 FPS
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 1.157
Time code of first frame : 00:00:00:15
Time code source : Group of pictures header
Stream size : 2.06 MiB (70%)
Color range : Limited
Color primaries : BT.601 PAL
Transfer characteristics : BT.709
transfer_characteristics_Original : BT.601
Matrix coefficients : BT.601
matrix_coefficients_Original : BT.470 System B/G

BBC BMX Transwrap wrong aspect ratio (16:9 instead of 4:3) mediainfo:

General
Complete name : A:\MEDIA\temp\sd_test_bmx.mxf
Format : MXF
Format version : 1.3
Format profile : OP-1a
Format settings : Closed / Complete
File size : 2.92 MiB
Duration : 1 s 400 ms
Overall bit rate : 17.5 Mb/s
Frame rate : 25.000 FPS
Encoded date : 2024-04-18 17:07:09.336
Writing application : BBC bmx 1.2.0.0.0
Writing library : libMXF (Win64) 1.2.0.0.0

Video
ID : 1001
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings : BVOP
Format settings, BVOP : Yes
Format settings, Matrix : Default
Format settings, picture structure : Frame
Format settings, wrapping mode : Frame
Codec ID : 0D01030102046001-0401020201011100
Duration : 1 s 400 ms
Bit rate mode : Constant
Bit rate : 12.0 Mb/s
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 16:9
Original display aspect ratio : 4:3
Frame rate : 25.000 FPS
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 1.157
Time code of first frame : 00:00:00:15
Time code source : Group of pictures header
Stream size : 2.00 MiB (69%)
Title : V1
Color range : Limited
Color primaries : BT.601 PAL
Transfer characteristics : BT.601
Matrix coefficients : BT.601
matrix_coefficients_Original : BT.470 System B/G

How to reproduce:

bmxtranswrap.exe -p -t op1a -o "sd_test_bmx.mxf" "sd_4x3_ffmpeg.mxf"

Expected behavior:
The muxer follows the bitstream flag, thus flagging the output as 4:3.

Actual behavior:
The muxer is defaulting to 16:9 thus causing a mismatch between the bitstream aspect ratio flag and the container aspect ratio flag.

Tasks

No tasks being tracked yet.

pmr and mdb files

Does any of the built tools allow to open PMR or MDB files in "Avid Media Files" folder?
Thank you

RDD 6 extraction: add `frames` suggestion to help

frames commandline parameter processing was updated in #38

After discussion with @matthewmarks-bbc:
However, it's still difficult for the user to know what the value should be. Perhaps just add a suggested value to the help e.g. 0-500? (why not make it very large like this?) or 0-50?

Is there any automatic checking that a complete description_text value has been extracted?

XAVC Intra Class 100 50p files with BT2020 matrix are erroneously being flagged as BT709

As simple as that, when an XAVC Intra Class 100 50p file with BT2020nc matrix, BT2020 primaries and HLG (arib-std-b67) transfer in both the codec header and the container is remuxed with BMX Transwrap 1.1.0.0.0, the matrix gets erroneously changed to BT709.

How to reproduce:

  • Take a BT2020 XAVC Intra Class 100 50p file
  • Remux with the following BMX Transwrap command

bmxtranswrap.exe -p -y 00:00:00:00 -t op1a --track-map stereo -o "Test_BBC_BMX.mxf" "Test_Omneon.mxf"

  • Check the mediainfo of the container being erroneously changed by BMX.

Sample (Source & Remuxed files): https://we.tl/t-jRK6xnR1Ky

Mediainfo of the source:

General

Complete name : A:\MEDIA\temp\Test_Omneon.mxf
Format : MXF
Format version : 1.3
Format profile : OP-1a
Format settings : Closed / Complete
File size : 55.9 MiB
Duration : 2 s 0 ms
Overall bit rate : 235 Mb/s
Frame rate : 50.000 FPS
Encoded date : 2023-08-29 11:21:12.380
Writing application : Omneon Inc. Omneon Media Subsystem 9.8.0.0.1
Writing library : Omneon Media Api (windows)

Video

ID : 2
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 4:2:2 [email protected]
Format settings, CABAC : No
Format settings, GOP : N=1
Format settings, wrapping mode : Frame
Codec ID : 0D01030102106001-0401020201323104
Duration : 2 s 0 ms
Bit rate : 228 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 50.000 FPS
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 2.195
Stream size : 54.3 MiB (97%)
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : HLG
Matrix coefficients : BT.2020 non-constant
Delay_SystemScheme1 : 0

Audio

ID : 3
Format : PCM
Format settings : Little
Format settings, wrapping mode : Frame (BWF)
Codec ID : 0D01030102060100
Duration : 2 s 0 ms
Bit rate mode : Constant
Bit rate : 6 912 kb/s
Channel(s) : 6 channels
Sampling rate : 48.0 kHz
Frame rate : 50.000 FPS (960 SPF)
Bit depth : 24 bits
Stream size : 1.65 MiB (3%)
Delay_SystemScheme1 : 0
Locked : Yes

Other #1

ID : 1-Material
Type : Time code
Format : MXF TC
Frame rate : 50.000 FPS
Time code of first frame : 00:00:00:00
Time code of last frame : 00:00:01:49
Time code settings : Material Package
Time code, stripped : Yes

Other #2

ID : 1-Source
Type : Time code
Format : MXF TC
Frame rate : 50.000 FPS
Time code of first frame : 00:00:00:00
Time code of last frame : 00:00:01:49
Time code settings : Source Package
Time code, stripped : Yes

Other #3

Type : Time code
Format : SMPTE TC
Muxing mode : System scheme 1
Time code of first frame : 00:00:00:00

Mediainfo of the remuxed file:

General

Complete name : A:\MEDIA\temp\Test_BBC_BMX.mxf
Format : MXF
Format version : 1.3
Format profile : OP-1a
Format settings : Closed / Complete
File size : 55.9 MiB
Duration : 2 s 0 ms
Overall bit rate : 235 Mb/s
Frame rate : 50.000 FPS
Encoded date : 2023-08-29 11:23:12.740
Writing application : BBC bmx 1.1.0.0.0
Writing library : libMXF (Win64) 1.1.0.0.0

Video

ID : 1001
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 4:2:2 [email protected]
Format settings, CABAC : No
Format settings, GOP : N=1
Format settings, wrapping mode : Frame
Codec ID : 0D01030102106001-0401020201323104
Duration : 2 s 0 ms
Bit rate : 228 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 50.000 FPS
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 2.195
Stream size : 54.3 MiB (97%)
Title : V1
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : HLG
Matrix coefficients : BT.709
matrix_coefficients_Original : BT.2020 non-constant

Audio #1

ID : 2001
Format : PCM
Format settings : Little
Format settings, wrapping mode : Frame (BWF)
Codec ID : 0D01030102060100
Duration : 2 s 0 ms
Bit rate mode : Constant
Bit rate : 2 304 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Frame rate : 50.000 FPS (960 SPF)
Bit depth : 24 bits
Stream size : 562 KiB (1%)
Title : A1
Locked : Yes

Audio #2

ID : 2002
Format : PCM
Format settings : Little
Format settings, wrapping mode : Frame (BWF)
Codec ID : 0D01030102060100
Duration : 2 s 0 ms
Bit rate mode : Constant
Bit rate : 2 304 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Frame rate : 50.000 FPS (960 SPF)
Bit depth : 24 bits
Stream size : 562 KiB (1%)
Title : A2
Locked : Yes

Audio #3

ID : 2003
Format : PCM
Format settings : Little
Format settings, wrapping mode : Frame (BWF)
Codec ID : 0D01030102060100
Duration : 2 s 0 ms
Bit rate mode : Constant
Bit rate : 2 304 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Frame rate : 50.000 FPS (960 SPF)
Bit depth : 24 bits
Stream size : 562 KiB (1%)
Title : A3
Locked : Yes

Other #1

ID : 901-Material
Type : Time code
Format : MXF TC
Frame rate : 50.000 FPS
Time code of first frame : 00:00:00:00
Time code of last frame : 00:00:01:49
Time code settings : Material Package
Time code, stripped : Yes
Title : TC1

Other #2

ID : 901-Source
Type : Time code
Format : MXF TC
Frame rate : 50.000 FPS
Time code of first frame : 00:00:00:00
Time code of last frame : 00:00:01:49
Time code settings : Source Package
Time code, stripped : Yes
Title : TC1

As you can see, although the info in the header of the stream still says BT2020nc, the one in the container inserted by BMX says "BT.709", which, of course, is wrong.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.