DDV-3 (Dione:DV) for progressive CLI

Any one managed to call the ddv-3 (Dione:DV) AI model in CLI for progressive video?
I want to use this AI on progressive video.
any one of your experts on CLI out there could craft me a CLI for ddv3 in Progressive (without the di-interlacing portion)? I’ll use it as a template for my videos

Only by editing the Json file first.
I’ve tried but isn’t doing what I want… yet
If you still have version 2.3.0 you can use ddv-2 for progressive, however only with a very basic CLi
Tomorrow I will try again to edit the Json file

1 Like

thank you!!! hope you manage to crack it down

Set it up how you want to run it.
Copy the command to a text editor.
Find: bwdif=mode=1:parity=-1:deint=0
Check out the documentation.
According to that, you could change it to:
With that it should: keep the frame rate the same, auto detect field order and only deinterlace frames marked as interlaced.

(I tried a run to make sure it would not double the frame rate. It did not. My output was set to PNG, so if you see any -r or -framerate in the command, you may need to correct it.)


I’ve done a 5000 frames test and everything looks OK… Side by side checking in Vdub2 all frames match with the source
Thanks @ForSerious :100:

I have also tested it and it seems to work as expected.
My only issue now is, how do I batch process it? meaning if I load a bunch of videos (let’s say 30 videos) and I select all in the UI, set my settings, etc. in the UI i just need to click export and it will process all 30 of them.
But if I select “Show Export Command” it only shows the command for one video. how do I export the command for all 30 videos?
It would make life much easier because all i’ll have to do is search and replace in notepad for the bwdif= parameters instead of exporting each video command one by one and doing the needed change for each one/export command

or as an alternative, if there is anywhere in the ddv-3.json (or any other config/json file) where I can change the bwdif= parameters from the default one used by TVAI. if so I can temporarily change the config file(s) to the suggested bwdif parameters by @ForSerious , then just use the UI for everything. once done revert back to it’s original default parameters. I didn’t spot it in ddv-3.json, but maybe i am missed it.

The easiest way to do that right now is make a batch file.
You’ll need to set up your system environment variables.
In the .bat file copy the command, replace ffmpeg with the full path to the Topaz ffmpeg.exe in quotes.
Replace any ‘%’ symbols with ‘%%’.
Change the bwdif= part.
Copy it 30 times and change the in and output paths for all 30.

If you don’t like that much copying, you can make the batch command loop through a folder. I have never done it. You’d have to look that up. (I don’t know how long your movies are, but I would try to make batches of 8 to 14 hours worth of processing. Mostly just to verify the progress periodically.)

I’ll be out for a few days. So I hope someone else pipes in if you need more help.

1 Like

my movies are clips, usually ranging from 10-15 sec up to 3 min tops per file.
that is why i got tons of them i need batching

Changed a lot of lines related to deinterlacing in the Json file but No luck so far :roll_eyes:

If you want to try ForSerious metode you need to copy the complete command for each clip because of the correct timings. Unless they all have the same time…

timing you mean by video length?

Yup! ffmpeg “-hide_banner” “-t” “2653.9852916666664”

I am struggling to make a Batch file that reads all my AVI files in a directory and run them as a process. I think I might be doing something wrong in the batch file.
could you maybe have a look at it and see what is wrong (or correct my Batch file)?

set ffm="C:\Program Files\Topaz Labs LLC\Topaz Video AI\ffmpeg.exe"
: %%~nf returns the filename without the extension
for %%f in (*.avi) do (
	%ffm% "-hide_banner" "-t" "4.52" -i "%%f" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "bwdif=mode=1:parity=-1:deint=0,tvai_up=model=ddv-3:scale=0:w=1920:h=1080:device=0:vram=1:instances=0" "-c:v" "ffv1" "-coder" "0" "-context" "0" "-g" "1" "-level" "3" "-slices" "4" "-slicecrc" "1" "-pix_fmt" "yuv420p" "-map_metadata" "0" "-movflags" "frag_keyframe+empty_moov+delay_moov+use_metadata_tags+write_colr " "-map_metadata:s:v" "0:s:v" "-an" "-metadata" "videoai=Deinterlaced and enhanced using ddv-3" "%%f_ddv3"

Try this:

set ffm="C:\Program Files\Topaz Labs LLC\Topaz Video AI\ffmpeg.exe"
for %%f in (*.avi) do %ffm% "-hide_banner" "-t" "4.52" -i "%%f" "-sws_flags" "spline+accurate_rnd+full_chroma_int" "-color_trc" "2" "-colorspace" "2" "-color_primaries" "2" "-filter_complex" "bwdif=mode=1:parity=-1:deint=0,tvai_up=model=ddv-3:scale=0:w=1920:h=1080:device=0:vram=1:instances=0" "-c:v" "ffv1" "-coder" "0" "-context" "0" "-g" "1" "-level" "3" "-slices" "4" "-slicecrc" "1" "-pix_fmt" "yuv420p" "-map_metadata" "0" "-movflags" "frag_keyframe+empty_moov+delay_moov+use_metadata_tags+write_colr " "-map_metadata:s:v" "0:s:v" "-an" "-metadata" "videoai=Deinterlaced and enhanced using ddv-3" "%%f_ddv3.avi"

I think you mainly just forgot to put the output extension. I tried with .mkv, but I could only see grey when I tried to play the output. That second line wasn’t doing anything that I could tell. I removed it.