pyaaf2 icon indicating copy to clipboard operation
pyaaf2 copied to clipboard

Embed External MXF vs. Link External MXF

Open ndeshpande2022 opened this issue 1 year ago • 0 comments

Hi there,

We're using PyAAF2 to link external MXF Files with 608/708 closed caption data. One thing we've found is that even after linking, we still need to keep the MXF file around. We're guessing this is because the MXF file is linked instead of being embedded.

Our question is if it's possible to embed the MXF file into the AAF instead of just linking.

Our current code for linking looks like this:

from __future__ import (
    unicode_literals,
    absolute_import,
    print_function,
    division,
    )
import aaf2
import sys
import argparse

def main():
    parser = argparse.ArgumentParser(description='Link MXF file to AAF file.')
    parser.add_argument('input_file', help='Input MXF file')
    parser.add_argument('output_file', help='Output AAF file')
    args = parser.parse_args()

    with aaf2.open(args.output_file, 'w') as f:
        for mob in f.content.link_external_mxf(args.input_file):
            print(mob.name)

if __name__ == "__main__":
    main()

ndeshpande2022 avatar Oct 18 '24 15:10 ndeshpande2022