I’ve recently discovered an issue with TVAI (or possibly just ffmpeg) that I’ve not seen before. My usual workflow involves using TVAI to clean up noise in 2160p footage without an actual upscale.
I use the command line exclusively for actual exports because I want to export to AV1 using SVT-AV1 for the encoding, so I have to do a pipe from TVAI’s ffmpeg to my own ffmpeg:
"C:\Program Files\Topaz Labs LLC\Topaz Video AI\ffmpeg.exe" "-i" "video" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-filter_complex" "tvai_up=model=prob-4:scale=0:w=3840:h=1920:preblur=0:noise=0.06:details=0.15:halo=0:blur=0.1:compression=0.145949:blend=0.2:device=0:vram=1:instances=1" -level 3 -c:v ffv1 -pix_fmt yuv420p10le -slices 4 -slicecrc 1 -g 1 -an -sn -fps_mode passthrough -f matroska pipe:1 | c:\ffmpeg-custom\ffmpeg -i - -c:v libsvtav1 -svtav1-params "preset=4:crf=12:tune=1:fast-decode=1:level=51" -pix_fmt yuv420p10le -map 0:v output.av1.mkv
This is handy for me because I don’t need an intermediate file on disk and allows me to better use system resources so I can compress while I upscale. When video
is a 2160p source, things work well. When it is a 1080p source, I get flooded with errors like the following:
There are a few interesting things about this:
- It seems to be non-deterministic. Each run gives different DTS issues at different timestamps
- It seems to be system-load dependent. Almost as if frames are being dropped somewhere or pushed to the pipe out of order. I can reproduce more of the problems by running more concurrent ffmpeg instances.
My system is a Radeon 6900XT GPU with a 7950X CPU and 64GB of memory and the latest version of TVAI. Logs are not useful in this case since it is just the command line.