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

Make track for each audio layer #502

Merged
merged 1 commit into from
Aug 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions auto_editor/formats/fcp7.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ def media_def(


def resolve_write_audio(audio: Element, make_filedef, tl: v3) -> None:
track = ET.SubElement(audio, "track")
for aclips in tl.a:
for t, aclips in enumerate(tl.a):
track = ET.SubElement(audio, "track")
for j, aclip in enumerate(aclips):
src = aclip.src

Expand All @@ -411,7 +411,7 @@ def resolve_write_audio(audio: Element, make_filedef, tl: v3) -> None:

sourcetrack = ET.SubElement(clipitem, "sourcetrack")
ET.SubElement(sourcetrack, "mediatype").text = "audio"
ET.SubElement(sourcetrack, "trackindex").text = "1"
ET.SubElement(sourcetrack, "trackindex").text = f"{t + 1}"

if src.videos:
link = ET.SubElement(clipitem, "link")
Expand Down