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

Editorial_pkg: publishing sequence into OTIO timeline with rendered media #132

Open
wants to merge 38 commits into
base: develop
Choose a base branch
from

Conversation

moonyuet
Copy link
Member

@moonyuet moonyuet commented Oct 10, 2024

Changelog Description

Implement a sequence-based workflow for publishing an editorial package in Unreal. This workflow should publish the OTIO timeline and an intermediate render in MP4 format.

Resolve #131,
Resolve #125
Resolve #124

  • otio representation implementation
  • Has unreal_export.py edited for the otio implementation
  • Edit rendering.py which can be used for both rendering and editorial intermediate rendering

Additional info

-It may need multiple testing to get the correct frame ranges
@jakubjezek001 this is the zipped file with otio and the clip: editorial_pkgMain.zip

Testing notes:

  1. Select level sequence which includes MovieShotCutTrack/CameraCutTrack with multiple sections
  2. Create Editorial Package Instance with it
  3. Ayon -> Render
  4. Wait to render out all the sequences until finished
  5. Ayon -> Publish
  6. It should publish successfully with mp4 and otio
  7. Load otio in hiero/resolve

@moonyuet moonyuet changed the title Implementation of Editorial Publish(EDL only) Implementation of Editorial Publish Oct 11, 2024
@moonyuet moonyuet added the type: feature Adding something new and exciting to the product label Oct 15, 2024
@moonyuet moonyuet self-assigned this Nov 4, 2024
@LiborBatek
Copy link
Member

@moonyuet pls add testing steps once it make sense to test it out (now they are not present). thx!

@moonyuet moonyuet marked this pull request as ready for review November 8, 2024 13:21
Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have prepared level and sequence for rendering with 3 camera cuts
image

created Render instance and Editorial instance using that sequence but when been in step 3) of testing (trying to Render) Im getting following error:

LogPython: Error: Traceback (most recent call last):
LogPython: Error:   File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\unreal_0.2.4+dev\ayon_unreal\api\tools_ui.py", line 61, in _on_render
LogPython: Error:     rendering.start_rendering()
LogPython: Error:   File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\unreal_0.2.4+dev\ayon_unreal\api\rendering.py", line 186, in start_rendering
LogPython: Error:     f"{sub_seq.get_sequence().get_name()}"),
LogPython: Error:        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LogPython: Error: AttributeError: 'NoneType' object has no attribute 'get_name'

@LiborBatek
Copy link
Member

note: Your testing steps are still a bit sparse, so if I get it correctly I should first create Render instance to be able to render out image sequence and then using that same level sequence create Editorial publish instance. First producing the rendered images via Render action and later on use publish action for publishing both Render and Editorial as a final step...

Im stuck due to the aformentioned error on the step 3 atm

@moonyuet
Copy link
Member Author

note: Your testing steps are still a bit sparse, so if I get it correctly I should first create Render instance to be able to render out image sequence and then using that same level sequence create Editorial publish instance. First producing the rendered images via Render action and later on use publish action for publishing both Render and Editorial as a final step...

Im stuck due to the aformentioned error on the step 3 atm

You can merely create editorial package instance for this case to render the out sequence(no need to create render instance). and then hit Render and then go to Publisher UI and Publish the editorial package.

@LiborBatek
Copy link
Member

LiborBatek commented Nov 12, 2024

Ok so I have skipped the Render instance and just selected the Editorial package publish instance....after hitting Render it has finnished the rendering but once trying to Publish the Editorial package it fails on extract Intermediate Representation and throws following error msg:

DEBUG: Collecting rendered files
DEBUG: Collecting render path: C:\Projects\Quantum_Demo\UE\temp_renders\Quantum_Demo\editorial_pkg\episodes
Traceback (most recent call last):
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\dependency_packages\ayon_2406251801_windows.zip\dependencies\pyblish\plugin.py", line 528, in __explicit_process
    runner(*args)
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\unreal_0.2.4+dev\ayon_unreal\plugins\publish\extract_intermediate_representation.py", line 43, in process
    frames = pipeline.get_sequence(frames)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\unreal_0.2.4+dev\ayon_unreal\api\pipeline.py", line 952, in get_sequence
    return [os.path.basename(filename) for filename in collections[0]]
                                                       ~~~~~~~~~~~^^^
IndexError: list index out of range

here is my episodes_seq and how it looks btw (I hope its correct, as it works well with cam cut)

image

@moonyuet
Copy link
Member Author

moonyuet commented Nov 13, 2024

Ok so I have skipped the Render instance and just selected the Editorial package publish instance....after hitting Render it has finnished the rendering but once trying to Publish the Editorial package it fails on extract Intermediate Representation and throws following error msg:

DEBUG: Collecting rendered files
DEBUG: Collecting render path: C:\Projects\Quantum_Demo\UE\temp_renders\Quantum_Demo\editorial_pkg\episodes
Traceback (most recent call last):
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\dependency_packages\ayon_2406251801_windows.zip\dependencies\pyblish\plugin.py", line 528, in __explicit_process
    runner(*args)
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\unreal_0.2.4+dev\ayon_unreal\plugins\publish\extract_intermediate_representation.py", line 43, in process
    frames = pipeline.get_sequence(frames)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\unreal_0.2.4+dev\ayon_unreal\api\pipeline.py", line 952, in get_sequence
    return [os.path.basename(filename) for filename in collections[0]]
                                                       ~~~~~~~~~~~^^^
IndexError: list index out of range

here is my episodes_seq and how it looks btw (I hope its correct, as it works well with cam cut)

image

Can you show me all the rendered files in C:\Projects\Quantum_Demo\UE\temp_renders\Quantum_Demo\editorial_pkg\episodes by screenshot ?

@LiborBatek
Copy link
Member

Yep, all shots render present and be in correct clip in and outs...nice!
Editorial_Renders

@moonyuet
Copy link
Member Author

moonyuet commented Nov 13, 2024

Yep, all shots render present and be in correct clip in and outs...nice!

I have updated commit and all the rendered files in C:\Projects\Quantum_Demo\UE\temp_renders\Quantum_Demo\editorial_pkg\episodes instead of all the rendered frames to be saved depending on how much subsequences you have. And the intermediate representation should be rendering the video accordingly, which means @LiborBatek you need to re-render it again and then publish.

from ayon_applications import PreLaunchHook, LaunchTypes


class InstallOtioToBlender(PreLaunchHook):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class InstallOtioToBlender(PreLaunchHook):
class InstallOtioToUnreal(PreLaunchHook):

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets rename the file to collect_editorial_package.py please

@jakubjezek001 jakubjezek001 changed the title Implementation of Editorial Publish Editorial_pkg: publishing sequence into OTIO timeline with rendered media Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Adding something new and exciting to the product
Projects
None yet
3 participants