文档章节

pyaaf读写测试

抢小孩糖吃
 抢小孩糖吃
发布于 2016/08/12 11:12
字数 1411
阅读 35
收藏 0

#编者注 先通过达芬奇软件导出标准时间线(所导出的AAF文件Hiero软件可用),再通过pyaaf/examples/dump.py去读取onlyone.aaf文件,对文件进行操作,实现

#pyaaf读取AAF文件,罗列所有元素 使用pyaaf的dump工具查看AAF文件 python pyaaf-0.9.0\example\dump.py pyaaf_test\resources\onlyone.aaf
达芬奇输出的时间线上只有一个视频的例子的内容打印

D:\ZhanPeng\Workspace\Python\pyaaf>python pyaaf-0.9.0\example\dump.py resources\onlyone.aaf
 ByteOrder 18761
 LastModified 2016-08-12 03:08:58.00
 Content <aaf.storage.ContentStorage at 0x2c14300>
    Mobs <aaf.iterator.PropValueResolveIter object at 0x02BE7B70>
       Timeline 1 <aaf.mob.CompositionMob Timeline 1 urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61640018 at 0x2c1a660>
          MobID urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61640018
          Name Timeline 1
          Slots <aaf.iterator.PropValueResolveIter object at 0x02C082B0>
              <aaf.mob.TimelineMobSlot at 0x2c1a6b8>
                SlotID 1
                SlotName
                Segment <aaf.component.Timecode at 0x2c1a710>
                   DataDefinition <aaf.define.DataDef DataDef_Timecode at 0x2c14530>
                      Identification urn:uuid:01030201-0100-0000-060e-2b3404010101
                      Name DataDef_Timecode
                      Description Timecode data
                   Length 297
                   Start 86400
                   FPS 24
                   Drop False
                PhysicalTrackNumber 1
                EditRate 24
                Origin 0
              <aaf.mob.TimelineMobSlot at 0x2c1a710>
                SlotID 2
                SlotName
                Segment <aaf.component.Sequence at 0x2c1a6b8>
                   DataDefinition <aaf.define.DataDef DataDef_Picture at 0x2c14530>
                      Identification urn:uuid:01030202-0100-0000-060e-2b3404010101
                      Name DataDef_Picture
                      Description Picture data
                   Length 297
                   Components <aaf.iterator.PropValueResolveIter object at 0x02BE0198>
                       <aaf.component.Filler at 0x2c1a768>
                         DataDefinition <aaf.define.DataDef DataDef_Picture at 0x2c14530>
                            Identification urn:uuid:01030202-0100-0000-060e-2b3404010101
                            Name DataDef_Picture
                            Description Picture data
                         Length 52
                       <aaf.component.OperationGroup at 0x2c1a7c0>
                         DataDefinition <aaf.define.DataDef DataDef_Picture at 0x2c14530>
                            Identification urn:uuid:01030202-0100-0000-060e-2b3404010101
                            Name DataDef_Picture
                            Description Picture data
                         Length 245
                         Operation <aaf.define.OperationDef Motion Control at 0x2c14530>
                            Identification urn:uuid:9d2ea890-0968-11d3-8a38-0050040ef7d2
                            Name Motion Control
                            Description Motion Control
                            DataDefinition <aaf.define.DataDef DataDef_Picture at 0x2c14ad0>
                               Identification urn:uuid:01030202-0100-0000-060e-2b3404010101
                               Name DataDef_Picture
                               Description Picture data
                            IsTimeWarp True
                            OperationCategory OperationCategory_Effect
                            NumberInputs 1
                            ParametersDefined <aaf.iterator.PropValueResolveIter object at 0x02C3E030>
                               SpeedRatio <aaf.define.ParameterDef SpeedRatio at 0x2c14ad0>
                                  Identification urn:uuid:72559a80-24d7-11d3-8a50-0050040ef7d2
                                  Name SpeedRatio
                                  Description Speed Ratio
                                  Type <aaf.define.TypeDefRecord object at 0x02C3F0F0>
                         InputSegments <aaf.iterator.PropValueResolveIter object at 0x02BE0080>
                             <aaf.component.SourceClip at 0x2c1a768>
                               DataDefinition <aaf.define.DataDef DataDef_Picture at 0x2c14530>
                                  Identification urn:uuid:01030202-0100-0000-060e-2b3404010101
                                  Name DataDef_Picture
                                  Description Picture data
                               Length 306
                               SourceID urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61650018
                               SourceMobSlotID 1
                               StartTime 0
                         Parameters <aaf.iterator.PropValueResolveIter object at 0x02BE0080>
                            SpeedRatio <aaf.component.ConstantValue SpeedRatio at 0x2c14530>
                               Definition urn:uuid:72559a80-24d7-11d3-8a50-0050040ef7d2
                               Value 245/306
                PhysicalTrackNumber 1
                EditRate 24
                Origin 0
              <aaf.mob.TimelineMobSlot at 0x2c1a6b8>
                SlotID 3
                SlotName
                Segment <aaf.component.Sequence at 0x2c1a710>
                   DataDefinition <aaf.define.DataDef DataDef_Sound at 0x2c14530>
                      Identification urn:uuid:01030202-0200-0000-060e-2b3404010101
                      Name DataDef_Sound
                      Description Sound data
                   Length 297
                   Components <aaf.iterator.PropValueResolveIter object at 0x02C17A30>
                       <aaf.component.Filler at 0x2c1a7c0>
                         DataDefinition <aaf.define.DataDef DataDef_Sound at 0x2c14530>
                            Identification urn:uuid:01030202-0200-0000-060e-2b3404010101
                            Name DataDef_Sound
                            Description Sound data
                         Length 52
                       <aaf.component.OperationGroup at 0x2c1a768>
                         DataDefinition <aaf.define.DataDef DataDef_Sound at 0x2c14530>
                            Identification urn:uuid:01030202-0200-0000-060e-2b3404010101
                            Name DataDef_Sound
                            Description Sound data
                         Length 245
                         Operation <aaf.define.OperationDef Audio Channel Combiner at 0x2c14530>
                            Identification urn:uuid:6b46dd7a-132d-4856-ab21-8b751d8462ec
                            Name Audio Channel Combiner
                            Description Audio Channel Combiner
                            DataDefinition <aaf.define.DataDef DataDef_Sound at 0x2c14ad0>
                               Identification urn:uuid:01030202-0200-0000-060e-2b3404010101
                               Name DataDef_Sound
                               Description Sound data
                            IsTimeWarp False
                            OperationCategory OperationCategory_Effect
                            NumberInputs 1
                         InputSegments <aaf.iterator.PropValueResolveIter object at 0x02BE0300>
                             <aaf.component.SourceClip at 0x2c1a7c0>
                               DataDefinition <aaf.define.DataDef DataDef_Sound at 0x2c14530>
                                  Identification urn:uuid:01030202-0200-0000-060e-2b3404010101
                                  Name DataDef_Sound
                                  Description Sound data
                               Length 306
                               SourceID urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61650018
                               SourceMobSlotID 2
                               StartTime 0
                             <aaf.component.SourceClip at 0x2c1a818>
                               DataDefinition <aaf.define.DataDef DataDef_Sound at 0x2c14530>
                                  Identification urn:uuid:01030202-0200-0000-060e-2b3404010101
                                  Name DataDef_Sound
                                  Description Sound data
                               Length 306
                               SourceID urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61650018
                               SourceMobSlotID 2
                               StartTime 0
                PhysicalTrackNumber 1
                EditRate 24
                Origin 0
                TimelineMobAttributeList <aaf.iterator.PropValueResolveIter object at 0x02C179E0>
                   _TRACK_FORMAT <aaf.property.TaggedValue _TRACK_FORMAT at 0x2c14530>
                      Name _TRACK_FORMAT
                      Value 2
          LastModified 2016-08-12 03:08:58.00
          CreationTime 2016-08-12 03:08:58.00
          UsageCode Usage_TopLevel
       IMG_3713 <aaf.mob.MasterMob IMG_3713 urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61650018 at 0x2bad630>
          MobID urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61650018
          Name IMG_3713
          Slots <aaf.iterator.PropValueResolveIter object at 0x02C0E850>
              <aaf.mob.TimelineMobSlot at 0x2c1a660>
                SlotID 1
                SlotName
                Segment <aaf.component.SourceClip at 0x2c1a6b8>
                   DataDefinition <aaf.define.DataDef DataDef_Picture at 0x2c14530>
                      Identification urn:uuid:01030202-0100-0000-060e-2b3404010101
                      Name DataDef_Picture
                      Description Picture data
                   Length 307
                   SourceID urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61660018
                   SourceMobSlotID 1
                   StartTime 0
                PhysicalTrackNumber 1
                EditRate 30
                Origin 0
              <aaf.mob.TimelineMobSlot at 0x2c1a6b8>
                SlotID 2
                SlotName
                Segment <aaf.component.SourceClip at 0x2c1a660>
                   DataDefinition <aaf.define.DataDef DataDef_Sound at 0x2c14530>
                      Identification urn:uuid:01030202-0200-0000-060e-2b3404010101
                      Name DataDef_Sound
                      Description Sound data
                   Length 307
                   SourceID urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61680018
                   SourceMobSlotID 1
                   StartTime 0
                PhysicalTrackNumber 1
                EditRate 30
                Origin 0
          LastModified 2016-08-12 03:08:58.00
          CreationTime 2016-08-12 03:08:58.00
       IMG_3713 <aaf.mob.SourceMob IMG_3713 urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61660018 at 0x2c1a6b8>
          MobID urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61660018
          Name IMG_3713
          Slots <aaf.iterator.PropValueResolveIter object at 0x02C32FD0>
              <aaf.mob.TimelineMobSlot at 0x2c1a660>
                SlotID 1
                SlotName
                Segment <aaf.component.SourceClip at 0x2c1a710>
                   DataDefinition <aaf.define.DataDef DataDef_Picture at 0x2c14530>
                      Identification urn:uuid:01030202-0100-0000-060e-2b3404010101
                      Name DataDef_Picture
                      Description Picture data
                   Length 307
                   SourceID urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61670018
                   SourceMobSlotID 2
                   StartTime 0
                PhysicalTrackNumber 1
                EditRate 30
                Origin 0
          LastModified 2016-08-12 03:08:58.00
          CreationTime 2016-08-12 03:08:58.00
          EssenceDescription <aaf.essence.CDCIDescriptor at 0x2c1a660>
             Locator <aaf.iterator.PropValueResolveIter object at 0x02C176C0>
                 <aaf.essence.NetworkLocator at 0x2c14530>
                   URLString file:///D:/ZhanPeng/Source/IMG_3713.mov
             SampleRate 30
             Length 307
             StoredHeight 1080
             StoredWidth 1920
             FrameLayout FullFrame
             VideoLineMap <aaf.iterator.PropValueResolveIter object at 0x02C176C0>
                 0
                 1
             ImageAspectRatio 1920/1080
             ComponentWidth 8
             HorizontalSubsampling 2
             FrameSampleSize 4147200
        <aaf.mob.SourceMob urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61670018 at 0x2c1a660>
          MobID urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61670018
          Name
          Slots <aaf.iterator.PropValueResolveIter object at 0x02C32FD0>
              <aaf.mob.TimelineMobSlot at 0x2c1a6b8>
                SlotID 1
                SlotName
                Segment <aaf.component.Timecode at 0x2c1a710>
                   DataDefinition <aaf.define.DataDef DataDef_Timecode at 0x2c14530>
                      Identification urn:uuid:01030201-0100-0000-060e-2b3404010101
                      Name DataDef_Timecode
                      Description Timecode data
                   Length 307
                   Start 0
                   FPS 30
                   Drop False
                PhysicalTrackNumber 1
                EditRate 30
                Origin 0
              <aaf.mob.TimelineMobSlot at 0x2c1a710>
                SlotID 2
                SlotName
                Segment <aaf.component.SourceClip at 0x2c1a6b8>
                   DataDefinition <aaf.define.DataDef DataDef_Picture at 0x2c14530>
                      Identification urn:uuid:01030202-0100-0000-060e-2b3404010101
                      Name DataDef_Picture
                      Description Picture data
                   Length 307
                   SourceID urn:smpte:umid:00000000.00000000.00000000.00000000.00000000.00000000.00000000.00000000
                   SourceMobSlotID 0
                   StartTime 0
                PhysicalTrackNumber 1
                EditRate 30
                Origin 0
          LastModified 2016-08-12 03:08:58.00
          CreationTime 2016-08-12 03:08:58.00
          EssenceDescription <aaf.essence.TapeDescriptor at 0x2c14530>
       IMG_3713 <aaf.mob.SourceMob IMG_3713 urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61680018 at 0x2c1a710>
          MobID urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61680018
          Name IMG_3713
          Slots <aaf.iterator.PropValueResolveIter object at 0x02C082B0>
              <aaf.mob.TimelineMobSlot at 0x2c1a660>
                SlotID 1
                SlotName
                Segment <aaf.component.SourceClip at 0x2c1a6b8>
                   DataDefinition <aaf.define.DataDef DataDef_Sound at 0x2c14530>
                      Identification urn:uuid:01030202-0200-0000-060e-2b3404010101
                      Name DataDef_Sound
                      Description Sound data
                   Length 307
                   SourceID urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61690018
                   SourceMobSlotID 2
                   StartTime 0
                PhysicalTrackNumber 1
                EditRate 30
                Origin 0
          LastModified 2016-08-12 03:08:58.00
          CreationTime 2016-08-12 03:08:58.00
          EssenceDescription <aaf.essence.PCMDescriptor at 0x2c1a660>
             Locator <aaf.iterator.PropValueResolveIter object at 0x02C179E0>
                 <aaf.essence.NetworkLocator at 0x2c14530>
                   URLString file:///D:/ZhanPeng/Source/IMG_3713.mov
             SampleRate 48000
             Length 491200
             QuantizationBits 16
             AudioSamplingRate 48000
             Channels 1
             AverageBPS 96000
             BlockAlign 2
        <aaf.mob.SourceMob urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61690018 at 0x2c1a660>
          MobID urn:smpte:umid:060a2b34.01010101.01010f00.13000000.060e2b34.7f7f2a80.57ad3dca.61690018
          Name
          Slots <aaf.iterator.PropValueResolveIter object at 0x02C32FD0>
              <aaf.mob.TimelineMobSlot at 0x2c1a710>
                SlotID 1
                SlotName
                Segment <aaf.component.Timecode at 0x2c1a6b8>
                   DataDefinition <aaf.define.DataDef DataDef_Timecode at 0x2c14530>
                      Identification urn:uuid:01030201-0100-0000-060e-2b3404010101
                      Name DataDef_Timecode
                      Description Timecode data
                   Length 307
                   Start 0
                   FPS 30
                   Drop False
                PhysicalTrackNumber 1
                EditRate 30
                Origin 0
              <aaf.mob.TimelineMobSlot at 0x2c1a6b8>
                SlotID 2
                SlotName
                Segment <aaf.component.SourceClip at 0x2c1a710>
                   DataDefinition <aaf.define.DataDef DataDef_Sound at 0x2c14530>
                      Identification urn:uuid:01030202-0200-0000-060e-2b3404010101
                      Name DataDef_Sound
                      Description Sound data
                   Length 307
                   SourceID urn:smpte:umid:00000000.00000000.00000000.00000000.00000000.00000000.00000000.00000000
                   SourceMobSlotID 0
                   StartTime 0
                PhysicalTrackNumber 1
                EditRate 30
                Origin 0
          LastModified 2016-08-12 03:08:58.00
          CreationTime 2016-08-12 03:08:58.00
          EssenceDescription <aaf.essence.TapeDescriptor at 0x2c14530>
 Dictionary <aaf.dictionary.Dictionary at 0x2c1a660>
 Version {u'major': 1, u'minor': 1}
 IdentificationList <aaf.iterator.PropValueResolveIter object at 0x02C32FD0>
     <aaf.storage.Identification at 0x2c14300>
       CompanyName Blackmagic Design
       ProductName DaVinci Resolve
       ProductVersion {u'major': 12, u'type': u'VersionReleased', u'tertiary': 0, u'minor': 5, u'patchLevel': 0}
       ProductVersionString Unknown version
       ProductID urn:uuid:00000018-0000-0000-178d-3d5f00000000
       Date 2016-08-12 03:08:58.00
       ToolkitVersion {u'major': 1, u'type': u'VersionReleased', u'tertiary': 6, u'minor': 1, u'patchLevel': 0}
       Platform AAFSDK (Win32)
       GenerationAUID urn:uuid:e82b9fd4-2e3a-4ae3-802f-18368b60530d
 ObjectModelVersion 1

D:\ZhanPeng\Workspace\Python\pyaaf>

#备注:使用 Davinci Resolve 12.5导出AAF文件 项目选择界面
输入图片说明
空项目
输入图片说明
时间线操作界面
输入图片说明
导出AAF文件
输入图片说明

© 著作权归作者所有

抢小孩糖吃

抢小孩糖吃

粉丝 74
博文 258
码字总数 247185
作品 0
东城
程序员
私信 提问
pyaaf内容修改

预备知识 在 AAF 标准中对 AAF 文件层次定义为三层:时间线、 逻辑素材和物理素材。 时间线 在非线性编辑系统中时间线对应于 EDL 表(Editorial Determination List,即:编辑决策列表) ;在...

抢小孩糖吃
2016/08/15
52
0
CG软件调研 时间线转换格式

EDL XML AAF(Advanced Authoring Format) AAF介绍 AAF(Advanced Authoring Format)专为视频后期制作和编写程序而设计,是一个专业文件交换格式,XML (Extensible Markup Language)文件在视...

抢小孩糖吃
2016/08/02
33
0
pyaaf的安装与测试

编者注 由于python开发较为快捷,同时也比c++上手难度降低很多。随即选择pyaaf作为aaf操作的方式。需求也需要以最简单的方式实现出效果。 配置环境变量 linux:export AAF_ROOT=path/to/roo...

抢小孩糖吃
2016/08/03
84
0
pyaaf概念与timeline放置内容

AAF开发PPT,对理解有帮助 对象定义: MasterMob位置essence data SourceMob描述essence data CompostionMob描述一个Compostion,引用MasterMobs SourceClip表现为content data,并引用Sourc...

抢小孩糖吃
2016/08/22
30
0
求助,java文件流测试普通盘和固态盘读写速度,两个盘的速度一样

系统RedHat6.1,系统盘为普通盘,固态盘为ext4 目的:测试固态盘读写性能是普通盘的多少倍 测试方法:将linux.x64_11gR2_database_1of2.zip文件(1.15G)分别拷贝在普通盘和固态盘,然后在各个...

ov100
2013/01/04
284
0

没有更多内容

加载失败,请刷新页面

加载更多

JavaScript设计模式——适配器模式

  适配器模式是设计模式行为型模式中的一种模式;   定义:   适配器用来解决两个已有接口之间不匹配的问题,它并不需要考虑接口是如何实现,也不用考虑将来该如何修改;适配器不需要修...

有梦想的咸鱼前端
29分钟前
3
0
Andorid SQLite数据库开发基础教程(1)

Andorid SQLite数据库开发基础教程(1) Android数据库访问方式 SQLite是Android系统默认支持的文件数据库。该数据库支持SQL语言,适合开发人员上手。本教程将讲解如何开发使用SQLite的Andro...

大学霸
32分钟前
3
0
Handler简解

Handler 这里简化一下代码 以便理解 Handler不一定要在主线程建 但如Handler handler = new Handler(); 会使用当前的Looper的, 由于要更新UI 所以最好在主线程 new Handler() { mLooper = Lo...

shzwork
54分钟前
4
0
h5获取摄像头拍照功能

完整代码展示: <!DOCTYPE html> <head> <title>HTML5 GetUserMedia Demo</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum......

诗书易经
56分钟前
3
0
正向代理和反向代理

文章来源 运维公会:正向代理和反向代理 1、正向代理 (1)服务对象不同 正向代理服务器的服务对象是客户端,可以将客户端和代理服务器看作一个整体。 (2)配置方法不同 需要在客户端配置代...

运维团
今天
5
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部