Trying to connect video and audio mxf.mkv files created by an old Avid software

Started by huckvrni, September 27, 2020, 05:36:42 AM

Previous topic - Next topic

huckvrni

I have a lot of old files from a trip i made in 2011. All the files were recorded on VHS and later converted to digital using the Avid software.
I believe it was the Avid composer but cannot say for sure.

now I have a whole lot of mxf.mkv files, some of which are audio, some are video, and I'm trying to find a way to determine which audio belong to which video.
this is being farther complicated by the fact multiple cameras and recording equipment was used. I tried my very best to make sense of it all but I truly got almost nowhere.
If anyone here has any new idea on how i should tackle this problems idea's are always welcome.

https://drive.google.com/drive/folders/1U369SdfpcUnr0_LMb9I3T2nVB87CerGN?usp=sharing
The link above is a drive link to a couple of sample files to show you what we got.
The first file is a short video and the two files after it a it's audio, although I don't know why there are two audio files.
The last two are video and unrelated audio and I uploaded the because I could tell they were different then the first one, probably captured from a different camera.

That's all I got, if you can help and need more files I would be happy to send more.

Thanks, yuval.

StarGeek

Just to verify, the files
vidH387A450A02.4E57A494.9F21F0.mxf.mkv
vidH-41CFDCV01.54D327A8.684EB0.mxf.mkv
vidH-41CFDCA02.54D327A8.684E90.mxf.mkv

are the connected ones?  Because the first file in there has a Duration of 1:01:43, audio only.  The middle three seem more likely to be connected, as they all have the same Duration of 16 seconds.  One video, two audio, though one is almost silent.  The last one appears to be video only, Duration of 2:29.

Here's what I see in the Google Drive


One problem is that MKV files have a lot of data as TagName:TagString Key:Value pairs, so it's not easy to pick out a specific pair with exiftool, as the same pair may not appear at the same place in different files.  But looking at these files, it looks like you want to look at the TagName : REEL_UMID, as the TagString that follows is the same for the three 16 second files (0x060A2B340101010101010F001300000054D1CFDC0BB703F4060E2B347F7F2A80)
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Luuk2005

Thanks much to StarGeek finding the proper tag! Im was going to say the same, but think its misunderstood again? So I watched video and listened to sound, and this also makes it agree with StarGeek, because never there is sound like man talking or shaving, but instead like a crowd. So if only to sort, a remedial command can be like...
exiftool -ext mkv -FileOrder Matroska:Video:Main:Copy15:TagString -p "$Matroska:Video:Main:Copy15:TagString  $Matroska:Track1:Video:TrackType  $filename" .
Its ugly sort, because Im not know how to invent newlines or variables when there is new REEL_UMID.
Windows8.1-64bit,  exiftool-v12.92(standalone),  sed-v4.0.7

StarGeek

The problem is that REEL_UMID might not always be the 15th copy, so it's something to watch out for.  Though, there might be a good chance for it to be right if the save Avid software is always writing the file.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

huckvrni

Thanks a lot for the reply!. I'm sorry for taking a long time to answer it's just that I don't get time near a computer a lot.
I see what you found and I also got to similar conclusions.
I will try to use Luuk2005's code when I get home again and update you on any progress.
Thanks again :D

huckvrni

Oh and also you were right about the two audio files being out of order in my drive folder, sorry about that.

huckvrni

Thanks for all the help!.
I ended up using that command and it worked.
exiftool -Matroska:Video:Main:Copy11:TagString -filename -tracktype -filesize *.mkv -T > 1.txt
With that I will manage to continue by myself, thanks again for all the help!

Luuk2005

Greetings HuckVrni. Im not mention before because there is much confusion, but if you confirm the sort is proper, also to try the command like
exiftool -ext mkv -TestName"<${Copy15:TagString;s/.{34}(.*).{15}/\1/}--%.nc.%e"  -FileOrder Copy15:TagString .
With -FileName instead, it can make names like ...
vidH387A450A02.4E57A494.9F21F0.mxf.mkv --> 4E57A450E95900C80--1.mkv      (lonely)
vidH-41CFDCA01.54D327A8.684EA0.mxf.mkv --> 54D1CFDC0BB703F40--1.mkv    (related)
vidH-41CFDCA02.54D327A8.684E90.mxf.mkv --> 54D1CFDC0BB703F40--2.mkv    (related)
vidH-41CFDCV01.54D327A8.684EB0.mxf.mkv --> 54D1CFDC0BB703F40--3.mkv    (related)
vidG62V01.550E9051_54D550E9051.mxf.mkv -> 54D1FABCD85205AA0--1.mkv     (lonely)

It removes most REEL_UMID so not to have long filenames, but please not to try with -FileName before first to confirm the sort is proper.
Windows8.1-64bit,  exiftool-v12.92(standalone),  sed-v4.0.7

StarGeek

Thanks to the work Phil did in this post, it is now much easier to extract the data needed.

Using this config file
#------------------------------------------------------------------------------
# File:         join_tags.config
#
# Description:  ExifTool config file to generate new tags from XML name/value pairs
#
# Revisions:    2020-11-16 - P. Harvey created
#------------------------------------------------------------------------------

my $nameTag = 'TagName';
my $valueTag = 'TagString';

sub JoinTags($$)
{
    my ($val, $et) = @_;
    my $table = Image::ExifTool::GetTagTable('Image::ExifTool::Matroska::Main');
    my $i;
    for ($i=0; ;++$i) {
        my $suffix = $i ? " ($i)" : '';
        my $name = $et->GetValue("$nameTag$suffix") or last;
        my $value = $et->GetValue("$valueTag$suffix");
        last unless defined $value;
        my $tagInfo = Image::ExifTool::AddTagToTable($table, $name, {
            Name => Image::ExifTool::MakeTagName($name),
        });
        $et->FoundTag($tagInfo, $value);
    }
    return undef;
}

%Image::ExifTool::UserDefined = (
    'Image::ExifTool::Composite' => {
        JoinTags => {
            Desire => {
                0 => $nameTag,
                1 => $valueTag,
            },
            RawConv => \&JoinTags,
        },
    },
);

1; #end


You can directly pull the REEL_UMID.  Example output.  All the TagName and TagValue tags have been suppressed
C:\Programs\My_Stuff>exiftool -config join_tags.config -G1 -a -s -Matroska:all --Tag* Y:\!temp\ccccc\d\2-vidH-41CFDCV01.54D327A8.684EB0.mxf.mkv
[Matroska]      EBMLVersion                     : 1
[Matroska]      EBMLReadVersion                 : 1
[Matroska]      DocType                         : matroska
[Matroska]      DocTypeVersion                  : 4
[Matroska]      DocTypeReadVersion              : 2
[Matroska]      TimecodeScale                   : 1 ms
[Matroska]      MuxingApp                       : Lavf58.12.100
[Matroska]      WritingApp                      : Lavf58.12.100
[Matroska]      Duration                        : 16.12 s
[Track1]        TrackNumber                     : 1
[Track1]        TrackLanguage                   : und
[Track1]        CodecID                         : V_MPEG4/ISO/AVC
[Track1]        TrackType                       : Video
[Track1]        VideoFrameRate                  : 25
[Track1]        ImageWidth                      : 720
[Track1]        ImageHeight                     : 576
[Track1]        DisplayWidth                    : 4
[Track1]        DisplayHeight                   : 3
[Track1]        DisplayUnit                     : Unknown (3)
[Matroska]      DURATION                        : 00:00:16.120000000
[Matroska]      PROJECT_NAME                    : Fire Dragon - H capture
[Matroska]      UID                             : fa7c205a-fe37-4c18-b401-b692ad014174
[Matroska]      GENERATION_UID                  : b80729c1-c85c-349f-6ecf-35a8e9a241d0
[Matroska]      APPLICATION_PLATFORM            : AAFSDK (Win64)
[Matroska]      MODIFICATION_DATE               : 2015-02-05T08:19:52.000000Z
[Matroska]      PRODUCT_UID                     : acfbf03a-4f42-a231-d0b7-c06ecd3d4ad7
[Matroska]      PRODUCT_VERSION                 : Unknown version
[Matroska]      PRODUCT_NAME                    : Avid Media Composer 8.0
[Matroska]      COMPANY_NAME                    : Avid Technology, Inc.
[Matroska]      MATERIAL_PACKAGE_UMID           : 0x060A2B340101010101010F001300000054D327A884E80016060E2B347F7F2A80
[Matroska]      MATERIAL_PACKAGE_NAME           : H - 4.01
[Matroska]      ENCODER                         : Lavf58.12.100
[Matroska]      FILE_PACKAGE_UMID               : 0x060A2B340101010101010F001300000054D327A884EB0016060E2B347F7F2A80
[Matroska]      FILE_PACKAGE_NAME               : Video file
[Matroska]      REEL_UMID                       : 0x060A2B340101010101010F001300000054D1CFDC0BB703F4060E2B347F7F2A80
[Matroska]      REEL_NAME                       : H - 4
[Matroska]      TIMECODE                        : 09:19:53:00
[Matroska]      ENCODER                         : Lavc58.18.100 libx264


To directly pull the REEL_UMID value, you would use
exiftool -config join_tags.config -REEL_UMID /path/to/file/
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).