Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avb2aaf errors #3

Open
tin2tin opened this issue Feb 20, 2020 · 18 comments
Open

avb2aaf errors #3

tin2tin opened this issue Feb 20, 2020 · 18 comments

Comments

@tin2tin
Copy link

tin2tin commented Feb 20, 2020

I'm testing a file from Avid First.

In my Avid project folder I have:
image

The avb files produce this error:
C:\Users\user\pyavb\examples>python avb2aaf.py "C:\Users\user\Documents\MC First Avid Projects\tintwotin\Avid_test\Avid_test Bin.avb" b'BINF' b'464e49427d000000020e040000009da74e5ed93e18000000b7820100000000010000000300416e79010000000300416e79010000000300416e79010000000300416e79010000000300416e79010000000300416e79000003000c0005000100e0fffaff24006a000100004d004d004d010000b300b300b30600030000000002010200000003' Traceback (most recent call last): File "avb2aaf.py", line 798, in <module> avb2aaf_main(sys.argv[1]) File "avb2aaf.py", line 785, in avb2aaf_main with avb.open(path) as avb_file: File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\avb\file.py", line 156, in __init__ self.content = self.read_object(self.root_index) File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\avb\file.py", line 274, in read_object raise NotImplementedError(chunk.class_id) NotImplementedError: b'BINF'
And the avp file produce this error:
C:\Users\user\pyavb\examples>python avb2aaf.py "C:\Users\user\Documents\MC First Avid Projects\tintwotin\Avid_test\Avid_test.avp" Traceback (most recent call last): File "avb2aaf.py", line 798, in <module> avb2aaf_main(sys.argv[1]) File "avb2aaf.py", line 785, in avb2aaf_main with avb.open(path) as avb_file: File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\avb\file.py", line 136, in __init__ assert ctx.read_fourcc(f) == b'ATob' AssertionError

The project consists of 3 cuts in the same source clip.
What am I just doing wrong?

@markreidvfx
Copy link
Owner

Your not doing anything wrong. BINF types are not implemented because I haven't seen them before. It shouldn't be too hard to add the type, are you able to share the AVB file?

@tin2tin
Copy link
Author

tin2tin commented Feb 21, 2020

Thank you. Here's the project file from Avid First:
Avid_test.zip

@markreidvfx
Copy link
Owner

BINF types have been added in ed996ff. Seems they are just sub classes of ABIN but with some extra data that I'm not sure what is. I'm not familiar with avid first, if it has a console window perhaps you could help identify what the extra 4 bytes are, using EnableBinXMLDump true. On regular Media composer that saves the bin as a XML representation when the bin is saved.

@tin2tin
Copy link
Author

tin2tin commented Feb 22, 2020

Thank you. I've tried updating:
pip install --upgrade pyavb
But unsuccessfully, how long time do I have to wait for the update to become available on pip?

According to this link it is not possible to open normal Avid projects in Avid First, which may explain the extra 4 bytes? https://www.premiumbeat.com/blog/review-avids-free-nle-media-composer-first/

Cannot open existing Media Composer (full version) projects
Media Composer First projects also cannot be opened in Media Composer

I don't see any console window, and not option to open it. Avid First can be opened from the console, but running EnableBinXMLDump true in that folder doesn't work.

@markreidvfx
Copy link
Owner

Thanks for looking, I never knew about avid first.
I haven't done a new pip release yet, you don't have to wait. You can clone the git repo and ,python setup.py install it.

git clone https://github.com/markreidvfx/pyavb
cd pyavb
python setup.py install

Or you can could try something like this if you want to use pip.
https://adamj.eu/tech/2019/03/11/pip-install-from-a-git-repository/

@tin2tin
Copy link
Author

tin2tin commented Feb 22, 2020

Cool, now I see aaf files produced, however when trying to import Sequences in Davinci Resolve(Import Timeline). I get this error:
image

Lightworks fails on import of the aaf files too, but without a meaningful error-message.

@markreidvfx
Copy link
Owner

The Resolve error doesn't help much either! The avb2aaf.py script is more of a proof of concept , I've only really tested the AAFs it generates in Media Composer. I took a quick look at the AAF generated from the sequence avb and there is nothing obvious wrong with the AAF that I can see. Most likely the AAF is missing some small piece of metadata that avid always sets and Resolve assumes is always present.

@tin2tin
Copy link
Author

tin2tin commented Feb 23, 2020

I tried to import the aaf in Avid First, but it says it's an unsupported format - but that might simply mean that is a limitation(Avid First doesn't import Avid "Pro" files).

I opened the generated aaf file - wow, what a complicated format. Amazing what you're doing here.

It would have been great to convert the Avid First files into something readable by ex. Davinci Resolve, but maybe OTIO can read the aaf, I haven't tested that yet.

@markreidvfx
Copy link
Owner

OTIO should be able to read th AAF file, it uses pyaaf2 to read AAFs.

@markreidvfx
Copy link
Owner

I've identified the avb2aaf.py incompatibility issue with Resolve, it should be fixed in 16ba0ef

@tin2tin
Copy link
Author

tin2tin commented Mar 6, 2020

I've tried the latest version, and now Resolve recognize the aaf files, but can't locate the media files.

They're located here on my computer:
image

Pointing Resolve to that folder doesn't help either, but opening the files in the Resolve Media Pool makes them import correctly.

Resolve is missing the file names:
image

For this import I used "imported" files in Avid, so maybe the file path is to be found a different place in the avb than when the file is linked?
Eyeframe.zip

@tin2tin
Copy link
Author

tin2tin commented May 7, 2020

I've updated to the latest Avid First and it seems like the BINF problem is back:
Avid_test.zip
(I've tried with both Linked and Imported files)

b'BINF'
b'464e49427d000000020e040000009da74e5ed93e18000000b7820100000000010000000300416e79010000000300416e79010000000300416e79010000000300416e79010000000300416e79010000000300416e7900000e010b00050001002700800032027d020100004d004d004d010000b300b300b30600030000000002010200000003'
Traceback (most recent call last):
  File "avb2aaf.py", line 805, in <module>
    avb2aaf_main(sys.argv[1])
  File "avb2aaf.py", line 792, in avb2aaf_main
    with avb.open(path) as avb_file:
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\avb\file.py", line 156, in __init__
    self.content = self.read_object(self.root_index)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\avb\file.py", line 274, in read_object
    raise NotImplementedError(chunk.class_id)
NotImplementedError: b'BINF'```

@markreidvfx
Copy link
Owner

can you verify you are using the latest github version of pyav? BINF has been Implemented and the files work for me.

@tin2tin
Copy link
Author

tin2tin commented May 10, 2020

I searched my harddisk and removed all pyaaf avb2aaf manually. Seems like pip uninstall didn't do the job properly.

Now running it without any notifications and an aaf file is generated. So I guess it just wasn't updated correctly.

However, importing it in Resolve(Timeline - Import - AAF) I get this error:
image

The avid project is using "imported" footage and not "linked".

Don't have much time right now, so will do more tests later.

@tin2tin
Copy link
Author

tin2tin commented May 10, 2020

Now a sequence with "Imported" files is working, as long as you manually add the source clips to the Resolve Media Pool yourself. Or does it find the files automatically for you?

@markreidvfx
Copy link
Owner

sorry for the delay, but did you end up resolving this? (and sorry for the resolve pun :p)

@tin2tin
Copy link
Author

tin2tin commented Jun 13, 2022

I haven't checked the free Avid First since, but I can try with the latest update of it, if you want this working?

@markreidvfx
Copy link
Owner

I'm just doing some house keeping. If you don't have the time I can close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants