Load audio

- Audio on renders (reviews)
This commit is contained in:
Toke Stuart Jepsen 2020-06-17 15:37:57 +01:00
parent e75167445f
commit 0ab4842c03
2 changed files with 46 additions and 1 deletions

View file

@ -28,7 +28,8 @@ class ExtractRender(pyblish.api.InstancePlugin):
scene.currentScene(),
scene.getFrameRate(),
scene.getStartFrame(),
scene.getStopFrame()
scene.getStopFrame(),
sound.getSoundtrackAll().path()
]
}
func
@ -41,6 +42,7 @@ class ExtractRender(pyblish.api.InstancePlugin):
frame_rate = result[3]
frame_start = result[4]
frame_end = result[5]
audio_path = result[6]
# Set output path to temp folder.
path = tempfile.mkdtemp()
@ -111,6 +113,7 @@ class ExtractRender(pyblish.api.InstancePlugin):
mov_path = os.path.join(path, instance.data["name"] + ".mov")
args = [
"ffmpeg", "-y",
"-i", audio_path,
"-i",
os.path.join(path, collection.head + "%04d" + collection.tail),
mov_path