CLI command for losless - help

I am struggling to understand the ffmpeg syntax for the command line
can anyone with experience could maybe help me and give me a command line for the FFV1 or HuffYUV / FFvHuff losless (both are supported by ffmpeg)?
i need only the “-c” onwards (the ffmpeg portion) because that is where i am struggling.

https://www.av-rd.com/knowhow/video/ffv1/ffv1_cheatsheet.html

I want to try upscaling with losless to further process/encode with an external program

FFV1 → -c:v ffv1 -coder 0 -context 0 -g 1 -level 3 -slices 4 -slicecrc 1 -pix_fmt yuv422p10le

1 Like

have you tried it in the past to use it with VAI?

Yes and it works :100:

and where do i specify the container format to be an “AVI” instead of mp4?

In the output extension… outfile,avi

It does support a lot of pixel formats for output:: yuv420p yuva420p yuva422p yuv444p yuva444p yuv440p yuv422p yuv411p yuv410p bgr0 bgra yuv420p16le yuv422p16le yuv444p16le yuv444p9le yuv422p9le yuv420p9le yuv420p10le yuv422p10le yuv444p10le yuv420p12le yuv422p12le yuv444p12le yuva444p16le yuva422p16le yuva420p16le yuva444p10le yuva422p10le yuva420p10le yuva444p9le yuva422p9le yuva420p9le gray16le gray gbrp9le gbrp10le gbrp12le gbrp14le gbrap10le gbrap12le ya8 gray10le gray12le gbrp16le rgb48le gbrap16le rgba64le gray9le yuv420p14le yuv422p14le yuv444p14le yuv440p10le yuv440p12le

to be sure I am not missing anything… could you give me a full command example with FFV1 you using including the VAI part?
that way I’ll have a baseline to work with…

Proteus → ffmpeg -nostdin -y -stats -i C:/INPUTFOLDER/INPUTFILENAME.AVi -sws_flags spline+accurate_rnd+full_chroma_int -color_trc 2 -colorspace 2 -color_primaries 2 -color_range tv -filter_complex “tvai_up=model=prob-:scale=0:w=1440:h=960:preblur=0.19:noise=0:details=0:halo=0:blur=0:compression=0:estimate=20:device=1:vram=1:instances=1,scale=w=1440:h=960:flags=lanczos:threads=0” “-c:v” “ffv1” “-coder” “0” “-context” “0” “-g” “1” “-level” “3” “-slices” “4” “-slicecrc” “1” “-pix_fmt” “yuv422p10le” C:\OUTFOLDER\OUTFILENAME.avi

3 Likes

perfect!!, thanks a million, i’ll test it out (changing of course the portions that are relevant for me).

No problem :+1:

Missing some quotation marks on the paths. If there’s a space, it will break.

2 Likes

You can also add FFV1 to the encoders.json file and have it available inside VEAI…
{
“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”: [
“Avi”
],
“transcode”: “pcm_s16le”,
“maxSize”: [8192, 8192],
“maxBitDepth”: 10
“doNotScaleFullColorRange”: “transcode”
},

1 Like

is the -pix_fmt” “xxxxxxx” really needed or I can leave it blank (just omit this tag)?
in Hybrid i don’t see it added in the command…

Fixed… :+1:

also for TVAI or only for VEAI? since I am using TVAI…

1 Like

Yes it is needed. It tells the encoder which color space and bit depth to use. Don’t know if omitting it the encoder will use a default color space and bit depth.

for yuv 4:2:0, 8 bit, should I use “yuv420p”?

As long as it have an encoders.json it will work. Using it with the latest version :100:

ohh, you mean that the encoders.json you posted is precondition/prerequisite to be able and use the FFV1 command?