CLI command for losless - help

Not a precondition/prerequisite to be used only in the Cli.
If you want to use it in the Gui than you need to edit the encoders.json


I added it to encoders.json file, but I still can’t see it in the UI…
what am i doing wrong?
I think it has to do with copy/paste from forum to the file (ASCI / UTF-8, etc encoding issue).
do you think you can upload your encoders.json?


Add the code this way and before “ProRes 422 LT” …

    "text": "FFV1 - FFmpeg LossLess Encoder v3.4",
    "encoder": "-c:v ffv1 -coder 1 -context 0 -g 1 -level 3 -slices 4 -slicecrc 1 -pix_fmt yuv422p10le",
    "ext": [
    "transcode": "pcm_s16le",
    "maxSize": [8192, 8192],
    "maxBitDepth": 10
    "doNotScaleFullColorRange": "transcode"

Close the Gui before and open it after editing and saving encoders.json

I did all that already and it didn’t work (program was closed, tried at the beginning of the file, then middle, then end, all variants).
I am almost sure it is a copy/paste from forum to the “json” file that is the culprate. I saw the ( " ) character was also different after i paste it to the json file (compared to the other encoders there).
It is not copying it as plain ASCII , because in the forum it uses rich UTF format (that is why those kind of stuff, you should post with the image tag/BBCode, to avoid those type of encoding issues when trying to copy/paste from Forum -to-> config file).

So what i did , that solved the issue is , I copied H.264 entry from the json file itself with notepad, placed it right above H.264 entry (BTW - I notice, where you place it in the json file, is directly related where it would be placed in the UI encoding options list).
Edit it by only filling in the “values” from your post.
I also added/kept {“os”: “windows,” & “minSize”: [2,2],“} values that yours didn’t have but H.264 did.
Also I added the " ,” that was missing after the {“maxBitDepth”: 10} on your script.
I also shortened the name (I noticed to long names (behind 20 characters) could confuse TVAI - at least on Presets.
Now I am seeing it in the UI.

Here is my FFV1 “encoders.json” Entry:
(C:\ProgramData\Topaz Labs LLC\Topaz Video AI\models) - Just Copy/Paste

    "text": "FFV1 - Lossless",
    "encoder": "-c:v ffv1 -coder 0 -context 0 -g 1 -level 3 -slices 4 -slicecrc 1 -pix_fmt yuv420p",
    "ext": [
    "transcode": "pcm_s16le",
    "os": "windows",
    "minSize": [2,2],
    "maxSize": [8192,8192],
    "maxBitDepth": 10,
    "doNotScaleFullColorRange": "transcode"

NOTE: for me personally i had to change the “yuv422p10le” (from your script) to “yuv420p” as my source content are at 4:2:0 at 8 Bit. when I left it at “yuv422p10le” , the video image was frozen after TVAI process.




P.S. Once you edit the file and verify that it is working correctly, I suggest you backup your “encoders.json” file with the new FFV1 settings, as I am not sure when you update “Topaz Video AI” to a new version, if it will overwrite the file as part of the update process.
Especially with cases when the update contains changes to encoder(s) or encoder(s) settings.


I didn’t know you could encode in ffv1! it’s cool :slight_smile: where is this json file that I also make the change please? :slight_smile:

C:\ProgramData\Topaz Labs LLC\Topaz Video AI\models

1 Like

thanks you! :slight_smile:

What is the reason you are using “-coder 1” (Range Coder) and not “-coder 0” (Golomb Rice)?

I don’t know what it is but with your script, leaving “code 1” didn’t work… I had to put 0.

I changed it already to “0”, you probably copied my script before the change.
for me personally both work, “0” or “1”, but I know the coder = 0 (Coder: Golomb Rice) is the default, so I set it that way, at “0”.
I am trying to find out what is the reason @Carlito set it to “1” (Coder: Range Coder).
Maybe he knows some secrets that would surprise us all :slight_smile:

yes I copied your script :slight_smile: but I tried to find out about golomb rice and range color, I don’t see where the difference is haha

Be sure to have the chroma subsampling to 4:4:4. 4:2:0 on 4:2:0 may confuse topaz and rob you on that final icing on the cake :slight_smile:

where do i set Chroma subsampling? is it different to “-pix_fmt yuv422p10le”?
is it a Topaz setting? little bit more details isappreciated

chroma sampling depends on video source? with hybrid in lossless with ffv1 or h264, we can choose 8 or 10 bits, and 4.4.2 or 4.4.4, but the fact that we change these parameters on an sd source, from a camcorder for example or from internal video, it doesn’t change anything in the visual of the video, is it true?

yes, upscaling doesn’t change the chroma sampling. i don’t know if you saw it, but I wrote in the post above that my sources are 4:2:0 8 Bit, therefore I use the parameter of “-pix_fmt yuv420p”. is there anything else you saying that needs to be done apart from this?

Hi Guys! unfortunately i have no experience in CLI, only in video editors.

1 Like

Fixed… Thanks :+1:

I don’t know any secrets what I know is that Ffv1 only uses Golomb Rice when
-pix_fmt is 8bits yuv420p, yuv440p, yuv422p , when setting -pix_fmt to encode at 9bits or higher it changes to Range Coder.
Since you output to 8bits coder 0 is fine. I have coder 1 because I’m outputting to 10bits.
However… I have done several side by side comparations in VirtualDub2 with a file where Golomb Rice was used Vs. another where Range Coder was used and they are literally the same in visual quality.