我有两个视频剪辑和两个音频剪辑。我希望将它们组合起来,使每个音频叠加在其视频之上,结果按顺序运行:
[video0 ][video1 ]
[audio0 ] [audio1 ]
编辑这是一个有效的MLT文件。为了完整起见,我保留了原始的,破碎的XML。
<playlist>
<tractor>
<multitrack>
<producer>
<property name="resource">video0.mp4</property>
</producer>
<producer>
<property name="resource">audio0.wav</property>
</producer>
</multitrack>
</tractor>
<!-- melt can deduce the multitrack, so this works as well: -->
<tractor>
<producer>
<property name="resource">audio1.wav</property>
</producer>
<producer>
<property name="resource">video1.mp4</property>
</producer>
</tractor>
</playlist>
结束修改
我试图做这样的事情,但我得到的错误似乎表明我的结构是错误的,例如[producer_xml] End multitrack in the wrong state...
和[producer_xml] Invalid state of playlist end 2
<playlist>
<multitrack>
<producer>
<property name="resource">video0.mp4</property>
</producer>
<producer>
<property name="resource">audio0.wav</property>
</producer>
</multitrack>
<multitrack>
<producer>
<property name="resource">audio1.wav</property>
</producer>
<producer>
<property name="resource">video1.mp4</property>
</producer>
</multitrack>
</playlist>
答案 0 :(得分:1)
你缺少曲目。一般来说:
本文档中有很多很好的例子: https://github.com/mltframework/mlt/blob/master/docs/mlt-xml.txt
请参阅“拖拉机”部分。