Workflow with Natron and FFMPEG as requested

This is our in-house pipeline whenever we need Natron for compositing. Feel free to share your input. Thanks.


Files we get from departments:

For 3D :

  • EXR MultiLayer (Half Float) or (Full Float if crytomatte is needed)

From matte department:

  • PSD (Layered, effects/masks rasterized)
  • TIFF (Layered, effects/masks rasterized)
  • PNG

For backlot plates/mographs (comes from cam labs and editing department). Usually all files come from editing department after scheduled cuts. Compositors don’t deal with B-rolls:

  • DPX sequence
  • TIFF sequence
  • Apple PRORES 4444
  • PNG/QTRLE for Motion Graphics
  • h264 Higest Profile / 4:4:4 Intra (rarely)

Converting video files into image sequence to use in Natron:

We convert all sort of video format file (MOV/MP4) into tiff 16 with ffmpeg.

ffmpeg -i 'filename.mov' -compression_algo lzw -pix_fmt rgb48le output%03d.tiff

NOTES for TIFF:

  • "-compression_algo raw or lzw or deflate" - is optional. Using it for 4k/+ is recommended. For 4k/+ we use deflate. For HD we use lzw to lower the file size.
    Actually the TIFF compression is very fine in quality.

  • "-pix_fmt rgb24 or rgba" is must to convert the color space. YUV/YCRB is not ideal for many en/decoders for TIFF.

more info: ffmpeg -v error -h encoder=tiff

If tiff is an overkill, using png is okay too.

ffmpeg -i 'filename.mov' -pix_fmt rgb48be output%03d.png

more info: ffmpeg -v error -h encoder=png

more options:

PNG (with Alpha)
for 8 bit
ffmpeg -i input.mp4 -pix_fmt rgba output_%04d.png
for 16 bit
ffmpeg -i input.mp4 -pix_fmt rgba64be output_%04d.png

PNG (without Alpha)
for 8 bit
ffmpeg -i input.mp4 -pix_fmt rgb24 output_%04d.png
for 16 bit
ffmpeg -i input.mp4 -pix_fmt rgb48be output_%04d.png


TIFF (with Alpha)
for 8 bit
ffmpeg -i input.mp4 -compression_algo lzw -pix_fmt rgba output_%04d.tiff
for 16 bit
ffmpeg -i input.mp4 -compression_algo lzw -pix_fmt rgba64le output_%04d.tiff

TIFF (without Alpha)
for 8 bit
ffmpeg -i input.mp4 -compression_algo lzw -pix_fmt rgb24 output_%04d.tiff
for 16 bit
ffmpeg -i input.mp4 -compression_algo lzw -pix_fmt rgb48le output_%04d.tiff 

There is one more option if you need to intact YUV colorspace:
ffmpeg -i "input.MXF" -compression_level 10 -pred mixed -pix_fmt rgb24 -sws_flags +accurate_rnd+full_chroma_int output_test%03d.png

ffmpeg -i "input.MXF" -compression_algo lzw -pix_fmt rgb24 -sws_flags +accurate_rnd+full_chroma_int output_test%03d.tiff


OUTPUT from Natron :

The write node is most of the time is TIFF. Depending on the project (image attached):

  • output components can be RGB(no transparency) or RGBA(with transparency)
  • Bit depth can be auto/8i/16i (Dont use float)
  • compression can be none/lzw (HD). for 4k deflate is ok.


Creating Intermediate for editing servers:

We then send this TIFF sequence in zip to editing panel. Sometimes remote teams also get involved or we need to pack it in intermediates for editing server.

We use intermediate codec: PRORES 4444 for it.
It’s 12 bit with YUVA which retains alpha.

We can simply do it with ffmpeg or in kdenlive/shotcut importing the TIFF as sequence.

With ffmpeg:

ffmpeg -framerate 30 -i input%03d.tiff -f mov -acodec pcm_s16le -vcodec prores_ks -vprofile 4444 -vendor ap10 -pix_fmt yuva444p10le out.mov

With Shotcut/Kdenlive :

  • Need to create a render profile first with below profile
  • f=mov acodec=pcm_s16le vcodec=prores_ks vprofile=4444 vendor=ap10 pix_fmt=yuva444p10le qscale=%quality
  • Use TIFF image as sequence.
    Then Render with this prores 4444 profile.

Tutorial:

Quite obviously it can be done with premiere/avid/fcpx etc as well by importing TIFF as sequence and render as prores 4444.

Alternative way with natron (Not recommended) see image:
in write node:

  • use filename.mov
  • container quicktime mov
  • codec ap4h
  • pixel YUV444
  • bit depth 10
  • alpha check (if any)


Broadcast render delivery with sound muxing:

Simply done in editing. Modern codec can be h264 (HD), H265(4k), mkv, Webm etc.


Also some remuxing options with Ffmpeg

Remuxing with audio re-encoding

ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a aac output.mp4

Remuxing without audio re-encoding. Make sure your movie container can accept the audio file format. MKV can take almost all audio format (ogg,flac,opus,wav,mp3)

ffmpeg -i video.mp4 -i audio.wav -c copy output.mkv

4 Likes

great, thanks…!

Do we have a mac user here…?

Hail the master :stuck_out_tongue: @devernay

I use both MacOS & Windows, what do ya need?

Can you edit the Mac section. I think as you mentioned we remove the Quicktime stuff…

@cgvirus: should we make a new section in the docs e.g Importing/Rendering/Exporting
Then add also some infos about what to do when Natron crashes when rendering…

Doc is monitored by @Blackvfx2018 and @devernay. I have no idea here.

Frankly all of the applications mentioned here are platform agnostic, IDK why we’re dividing it up by OS :P.

Was just an idea, I guess win users have mostly never seen a terminal.
Linux users never heard of Adobe Media encoder and so on.

I deleted the VLC and Quicktime stuff

1 Like

Here’s my contribution for macOS (since everything can be done using ffmpeg):
“On macOS, ffmpeg is available by installing homebrew (https://brew.sh/) and then typing brew install ffmpeg in a terminal.”

Might it still be good to have those options listed? VLC might not give the best results but at least it’s cross platform and uses a GUI.

I’ve had a go at converting the document to rst https://github.com/hellocatfood/Natron/blob/RB-2.3/Documentation/source/guide/tutorials-imagesequence.rst

I think the document still needs some work. For example some of the instructions are in a list and some aren’t. Also some instructions say “we can” and some say “you can”. Will work my way through it.

1 Like

changed: All “we” is changed to “you”. Workflows are now lsits instead of arrow.

I personally prefer the third person “one can” and use the non-gendered pronoun they/their (which is not plural in that case) as much as possible.

A lot of the Natron doc would have to corrected that way, but if we can at least follow these diversity & inclusion rules for new doc that’s already great.

4 Likes

I also liked having the pictures, because these parameter panels are rather complicated.

2 Likes

I personally prefer the third person “one can…”

Done.

I also liked having the pictures…

The Natron interface Picture? Yes, I have attached them

1 Like

I’ll get adding those in in a sec. Just realised which folder I have to upload them to

Great work!
Sorry I was too busy today to contribute, daily work :slight_smile:

Can I help with some gifs or what else is needed ?
Maybe a section on how to check if the image sequence has errors, with pngcheck or with the amazing DJV tool…

@hellocatfood: are you on discord, signal, telegram to communicate in realtime ?

Same, got busy with other stuff (I work odd hours of the day). I’m just pushing the changes to the document to the repo but I can be available tomorrow for realtime editing.

I checked your profile here and see that you time zone is an hour ahead of me (I’m in the UK). I’ll be online all day tomorrow so let’s coordinate. (same goes out to anyone else too!)

1 Like

With all respect.

I find it a huge time killer to write the doc in .rst format on Github with forking and stuff.
Its very hard to collaborate. Simple tasks like adding a dot or a picture are taking huge amount of clicking, confirming, etc.

I’d love to help on the docs, but is there another way of doing so, a more “non-coder” way, so we could focus on the actual content instead of how to create an outline or a header… ?