Comments (17)
Yes I solved it and the problem was simple: I was lacking a composition mob:
with aaf2.open(aaf_file, "w") as f:
meta = probe(wav_file)
master_mob, source_mob, tape_mob = f.content.link_external_wav(meta)
master_clip = master_mob.create_source_clip(slot_id=1, length=100)
sequence = f.create.Sequence(media_kind="sound")
comp_fill = f.create.Filler("sound", 50)
sequence.components.append(comp_fill)
sequence.components.append(master_clip)
video_rate = "25"
comp_mob = f.create.CompositionMob("the_composition")
f.content.mobs.append(comp_mob)
timeline_slot = comp_mob.create_timeline_slot(video_rate)
timeline_slot.name = "track_one"
timeline_slot.segment= sequence
from pyaaf2.
Ok I manage to open protools.aaf
by removing the following line: https://github.com/markreidvfx/pyaaf2/blob/master/examples/qt_aafmodel.py#L104
from pyaaf2.
I don't have protools so I'm not sure about that error. Will take a look your aaf and see if I notice anything strange. The MobID exception should be easy to fix by adding MobID.__lt__
from pyaaf2.
the MobID.__lt__
issue is fix in 270a380
from pyaaf2.
Any luck with this? @iluvcapra contributed link_external_wav
. Maybe they have had a similar issue.
from pyaaf2.
I've been able to get AAFs created for Pro Tools to open, it was part of my testing for my contribution. However, I never tried to make an AAF with just a linked content mob, it was always through SourceMobs in a sequence.
Based on some experience I've had with AAFs from Premiere, I think for Pro Tools you need to have a one and only one composition and link everything through that in order for Pro Tools to translate it. PT is very finicky about the AAF it gets.
from pyaaf2.
I have sample code that works but it's quite long, I can post the jupyter notebook if you want.
from pyaaf2.
Hello,
I'm also trying to run these lines but it seems not working. I have an exception. I'm on python 3.7.
Have you any idea?
Traceback (most recent call last): File "/Users/rolandduboue/PycharmProjects/protaaf/protaaf_classes/test_delille.py", line 36, in <module> master_mob, source_mob, tape_mob = f.content.link_external_wav(meta) File "/Users/rolandduboue/PycharmProjects/protaaf/venv/lib/python3.7/site-packages/aaf2/content.py", line 84, in link_external_wav return ama.create_wav_link(self.root, metadata) File "/Users/rolandduboue/PycharmProjects/protaaf/venv/lib/python3.7/site-packages/aaf2/ama.py", line 407, in create_wav_link tc.start = metadata['format']['tags']['time_reference'] or 0 File "/Users/rolandduboue/PycharmProjects/protaaf/venv/lib/python3.7/site-packages/aaf2/components.py", line 257, in start self['Start'].value = value File "/Users/rolandduboue/PycharmProjects/protaaf/venv/lib/python3.7/site-packages/aaf2/properties.py", line 55, in func_wrapper result = func(self, *args, **kwargs) File "/Users/rolandduboue/PycharmProjects/protaaf/venv/lib/python3.7/site-packages/aaf2/properties.py", line 162, in value self.data = self.typedef.encode(value) File "/Users/rolandduboue/PycharmProjects/protaaf/venv/lib/python3.7/site-packages/aaf2/types.py", line 707, in encode return self.renamed_typedef.encode(data) File "/Users/rolandduboue/PycharmProjects/protaaf/venv/lib/python3.7/site-packages/aaf2/types.py", line 125, in encode return pack(self.pack_format(), value) struct.error: required argument is not an integer
from pyaaf2.
@rolodub Can you provide a Wav file that triggers this error?
from pyaaf2.
@iluvcapra thanks, here it is!
000_160612.wav.zip
from pyaaf2.
It seems working with 16bits file. not 24bits... is it true?
from pyaaf2.
For whatever reason, ffprobe is returning the WAV's time_reference as a string and not an integer, I'm not sure if ffprobe's behavior has changed since my last test runs. This is an easy fix but I'm slammed on other projects for the time being...
from pyaaf2.
In my experiments, ffprobe doesn't return "time_reference" but timecode. -> Original timecode cannot be set:
ama.py is waiting for time_reference:
t = tape_mob.create_empty_sequence_slot(edit_rate, media_kind='timecode')
tc = f.create.Timecode(int(float(edit_rate)+0.5), drop=False)
tc.length = int(length)
if 'tags' not in metadata['format'].keys() or 'time_reference' not in metadata['format']['tags']:
tc.start = 0
else:
tc.start = metadata['format']['tags']['time_reference'] or 0
FFPROBE is returning:
"tags": {"application_platform": "Microsoft Windows", "company_name": "Dalet - Digital Media Systems", "generation_uid": "9d84428c-78df-4062-9f1f-0bbf7dfeab9d", "material_package_umid": "0x060A2B340101010501010D2013000000CEFBDC18BCA54FBE8E7411CD7AA8C7CD", "modification_date": "2018-01-26T19:30:18.000000Z", "product_name": "DDM Native", "product_uid": "4cf1f334-3b47-4fd1-8ba9-34803c0940e5", "product_version": "4.0.226286.254954", "timecode": "00:00:00:00", "uid": "be24c396-ba44-429d-8790-b992149c04de"}},
I think that the 24 bits wave import problem comes from Summary parameter. 24 bits waves are working well with summary set as it:
source_mob["EssenceDescription"].object["Summary"].value = [82,73,70,70,248,15,0,0,87,65,86,69,102,109,116,32,16,0,0,0,1,0,1,0,128,187,0,0,128,50,2,0,3,0,24,0]
from pyaaf2.
Huh. These are unusual format fields for ffprobe, I've never seen them before. What's your ffprobe -show_banner
?
from pyaaf2.
ffprobe version 4.1.3 Copyright (c) 2007-2019 the FFmpeg developers built with Apple LLVM version 10.0.0 (clang-1000.11.45.5) configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 Missing argument for option 'show_banner'
from pyaaf2.
So weird, I don't get this...
% ffprobe -hide_banner -show_format -of json 000_160612.wav 2>/dev/null
{
"format": {
"filename": "000_160612.wav",
"nb_streams": 1,
"nb_programs": 0,
"format_name": "wav",
"format_long_name": "WAV / WAVE (Waveform Audio)",
"duration": "10.710042",
"size": "1575016",
"bit_rate": "1176477",
"probe_score": 99,
"tags": {
"encoded_by": "TASCAM DR-10",
"date": "2016-06-12",
"creation_time": "01:47:26",
"time_reference": "309406697",
"coding_history": "A=PCM,F=48000,W=24,M=mono\r\n"
}
}
}
(I've included by hostinfo and banners below.)
Is this a host-independent thing?
% hostinfo
Mach kernel version:
Darwin Kernel Version 19.3.0: Sun Dec 8 22:27:29 PST 2019; root:xnu-6153.80.8.0.1~15/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3
Primary memory available: 16.00 gigabytes
Default processor set: 530 tasks, 2445 threads, 4 processors
Load average: 1.70, Mach factor: 2.29
% ffprobe -version
ffprobe version 4.2.1 Copyright (c) 2007-2019 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.8)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.1_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include/darwin -fno-stack-check' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
from pyaaf2.
(Also @rolodub maybe you should start a new ticket for this? @markreidvfx has closed this one.)
from pyaaf2.
Related Issues (20)
- Error on walk() with returned Sequence HOT 2
- Creating AAF using WAV file HOT 5
- export must be in mono not in stéréo. HOT 2
- Exporting embedded essence AAFs are tricky to open in other software HOT 3
- Confused on how to add a new track HOT 4
- Destructive (in-place) change of MXF files HOT 3
- AAF create timeline of cuts with group clip HOT 1
- How to preserve link to source files after downloading an aaf from the server? HOT 1
- Create video essence from image sequence HOT 1
- Combining segments from two AAF-files to create a new single AAF-file HOT 1
- I cant get this code to work - any tips would be appreciated: HOT 1
- Need help to get timeline TC of certain effects HOT 1
- Simple Timeline Example (with linked MXFs) HOT 1
- Creating AAF with OperationGroup of type AudioWarp HOT 1
- Difference between group clips and sequences - both are composition mobs HOT 4
- packing signed/unsigned HOT 1
- Get Source Clip and put into new Timeline
- Manipulate an existing AAF's sequence timing HOT 1
- Changing creation time in aaf and creating empty sequence file HOT 4
- Error when opening aaf file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyaaf2.