Scripts to change QT NCLC tag within Flame

If you’re using this script you can use the option “Rec 709, Legacy (1-1-1)” to get what you’re after.

Company hardware. No way of spontaneous script install :stuck_out_tongue:

If it’s the “company’s flame” then its “the company’s problem” and the company should “be more than willing” to help. Right? :slight_smile:

Also, isn’t 1-13-1 sRGB tagged in Flame? Just tag it is Rec709 and re-export. That should make a clip tagged 1-1-1.

3 Likes

what randy said,

if you like to fix it after render here is a tool i made:

1 Like

Still beating up this topic. Seems that there is no way to set gamma at 2.4 for an .mp4 file for correctly displaying in macOS. Just confirming.

no you can do that, either amcdx patcher or if you have 1-2-1 tagged prores and use shutter encoder it will keep the nclc tags. You can also use my ffmpeg command above to change the nclc

just to revive this:

On the new liquid retina XDR displays found in the latest macbook pro 14&16 inch models:

The 1-2-1 hack is NOT needed anymore!

If you set the macbook to reference BT.1886 mode it will display a 1-1-1 tagged quicktime just like a proper reference display would!

1-2-1 quicktimes will be displayed in a wrong way here, so the issue has been flipped around.

“color sync compatibel” is probably the worst and most confusing name adsk could have come up with, man we are professionals give us a dropdown to choose the colorspace tags we want!

This whole things is so Stupid, nothing makes sense, all hope is lost, SDR needs to die all the standards are broken(CRT standards!!!) this whole construct is not working for web video, you cant EVER author anything that will display the same across devices (even if all displays where calibrated correctly, you just cant)

Yes, but again the python script does only work with .mov files. I’ve had no luck with using it on .mp4 files. Unless I’m doing something wrong. Which is entirely possible.

hmm do you get a error message? I am sure ive done mp4s before with custom tags.

Will try later though.

Here’s the error

[mp4 @ 0x440f140] Not writing ‘gama’ atom. Format is not MOV.

how did you create the mp4?

i have a python script

def get_mediahub_files_custom_ui_actions():
def print_path(selection):
import flame, os, subprocess
for item in selection:
print(item.path)
locationF = item.path
os.chdir("{}".format(locationF))
print(os.getcwd())
def encode():
nameEncoder = item.path
Files = os.listdir("{}".format(nameEncoder))
hd = “MP4_NL_Post_1080/”
os.chdir("{}".format(nameEncoder))
try:
os.makedirs(hd, mode=0o777)
except OSError:
pass
subprocess.call(“ls”)
for f in Files:
if f.lower()[-3:] == “mov”:
print(“processing”, f)
process(f)
def process(f):
inFile = f
hd = “MP4_NL_Post_1080/”
outFile = f[:-3] + “mp4”
hd_path = hd + outFile
proc = subprocess.Popen(“ffmpeg -i {} -pix_fmt yuv420p -c:v libx264 -preset slow -crf 19 -x264opts ref=4:qpmin=4 -color_primaries 1 -color_trc 1 -colorspace 1 -profile:v main -level 4.2 -movflags faststart -f mp4 -ac 2 -c:a aac -b:a 192k -strict -2 {} &”.format(inFile, hd_path), stdout=subprocess.PIPE, shell=True, universal_newlines=True)
(out, err) = proc.communicate()
print("program output: ", out)
print(“done ffmpeg”)

        encode()
return [
    {
        "name": "PYTHON: DESKTOP",
        "actions": [
            {
                "name": "Encode_MP4_NL_Post_1080",
                "execute": print_path
            }
        ]
    }
]

It works great for converting .mov to .mp4 through the flame interface

1 Like

ok interesting so your command specifially wants to set 1-1-1 funny enough resolve CAN write 1-2-1 gamma 2.4 .mp4 files … investigating

what works is to rename a .mov h264 to .mp4 it will keep the NCLC tags somehow :smiley:

funny enough mediainfo is showing different info from quicktime if you rename …

I mean the NCLC is part of Quicktime spec not of mp4 spec so I think rendering 1-2-1 .mov and renaming is the best way to go , you could modify the export python script to render 1-2-1 .mov and rename after render

I can confirm that AMCDX can change MP4s to 1-2-1.

it depends on how they where written though, Ive tried to read a mp4 from ffmpeg and it didnt show any metadta in amcdx

I thought AMCDX was specifically for .mov files. It would not work on .mp4

I did write it both ways as 1-1-1 and 1-2-1. Also did some variations with
-movflags write_colr+write_gama -mov_gamma 2.4

none of these made any difference.

From my experience, you can only use AMCDX to tag MP4 files created with Handbrake 1.3.3 and older (not sure if this is related to a particular version of ffmpeg).
From my quick tests, Handbrake 1.4+ breaks this functionality (although I have not tested 1.5).

Cheers

I’ve used AMCDX with MP4s from Adobe Media Encoder.

Were you able to change the metadata so that it displays the correct gamma on QuickTime in macOS and pc? I wasn’t not able to make that change.