Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Can't output Prores files with burn in #949

Closed
jrsndl opened this issue Feb 1, 2021 · 2 comments
Closed

Can't output Prores files with burn in #949

jrsndl opened this issue Feb 1, 2021 · 2 comments
Labels
type: bug Something isn't working

Comments

@jrsndl
Copy link
Collaborator

jrsndl commented Feb 1, 2021

Describe the bug
Global publish plugin configured to encode Prores files fails to produce Prores with burn in.

To Reproduce
Steps to reproduce the behavior:

  1. Configure Prores encoding in presets/plugins/global/publish.json
    "codec": [ "-codec:v prores_ks", "-profile:v 3", "-pix_fmt yuv422p10le"]
  2. Configure burn in (any text) for the Prores output.
  3. Publish version from Nuke
  4. Extract burnins fails:

"Executing arguments was not successful: "('"C:\Users\Public\pype_env2/Scripts/python.exe" "Q:\dev\pypesetup\repos\pype\pype\scripts\otio_burnin.py" "c:/users/jiri~1.sin/appdata/local/temp/tmpbw_iyz.json"',)""

RuntimeError: Failed to render '//dps150/zback/_GFX_storage/T009_pypetestAA/shots/trs001/work/compositing/renders/nuke/renderCompositingMain/renderCompositingMain.baked_reviewProresHqburnin.mov': "ffmpeg" -i "//dps150/zback/_GFX_storage/T009_pypetestAA/shots/trs001/work/compositing/renders/nuke/renderCompositingMain/renderCompositingMain.baked_reviewProresHq.mov" -vf "drawtext=fontfile='C:\\Windows\\Fonts\\arial.ttf':text='trs001 v005':x=5:y=h-text_h-5:[email protected]:fontsize=25:box=1:boxborderw=5:[email protected]" -codec:v prores -profile:v hq -b:v 143777771 -pix_fmt yuv422p10le -g 1 -y "//dps150/zback/GFX_storage/T009_pypetestAA/shots/trs001/work/compositing/renders/nuke/renderCompositingMain/renderCompositingMain.baked_reviewProresHqburnin.mov"'

Note that above ffmpeg command works if you replace -codec:v prores with -codec:v prores_ks

Expected behavior
Pype should be able to output Prores with burn in the same as with other codecs.

Desktop (please complete the following information):

  • OS: Windows 10
  • Host: Nuke 11.3

Possible Fix
It seems like most codecs in ffmpeg have working default encoders, and the only problem is the Prores encoder. Since otio_burnin script uses ffprobe to re-encode the output with burn in, quick but hacky solution might be to simply replace the prores encoder by custom dictionary.
https://github.com/pypeclub/pype/blob/1d940f8b8bacf1aa2a21f292ccb15275bf04b102/pype/scripts/otio_burnin.py#L547

if codec_name:
    encoders = {'prores': 'prores_ks', 'h264': 'libx264'}
    ffmpeg_args.append("-codec:v {}".format(encoders.get(codec_name, codec_name)))
@jrsndl jrsndl added the type: bug Something isn't working label Feb 1, 2021
@mkolar
Copy link
Member

mkolar commented Feb 2, 2021

Resolved by #960

@jrsndl thanks for detailed report

@mkolar
Copy link
Member

mkolar commented Feb 2, 2021

an important note is that if the original prores wasn't created with ffmpeg, it won't figure out the codec, so I'd call it partial fix

@mkolar mkolar closed this as completed Feb 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants