Video AI v3.1.5, Tries to Generate HUGE File When Enhancing Video!?

Running under Microsoft Windows 10 Professional (x64) Build 19045.2604.

Trying to enhance an old black and white MP4 video at native 1280 x 720 resolution. Downloaded this video from YouTube as a test. Video file size 407 MB.

Trying to enhance this test video by using Proteus AI model and at default settings. Video output set at same resolution of 1280 x 720, and using H264 High (Nvidia) encoder with the container set at MP4.

Problem is that the enhancement process eventually halts before finishing at about 50% completion. And it reports that free disk space has run out!? But the disk where the output video is being saved to has (had) a spare 16+ GB before running the process!

16 GB of disk space used for the output video and the process was only half completed. So this suggests that the final output video size would be around 32 GB!!?? This is a MASSIVE size!! This doesn’t seem right. I was expecting the output video file size to be maybe around 1~2 GB at the most.

So, what is going on here? Bug in Video AI?

No, bro, THIS is a massive size! :joy:

(Bee Movie, 60 fps + motion deblur).

Welcome to the wonderful world of video processing!

2 Likes

You think that the input and output file sizes won’t differ much and that’s fine, but who told you that it only takes so much space to run it? Temp files need more space, obviously you are running out of cache space.

Input files are usually compressed. Output files usually aren’t (or, if so, only minimally so, so as to be effectively lossless). Many people, your truly included, like it that way, as you should not lose quality on an intermediate step.

NVENC files are simply huge because they were meant for streaming, and not to be a serious contender for consumer-grade final output files.

The default configuration of NVENC is lossy compression. Generally speaking, as long as there is not a huge difference between the input and output bit rates, the difference in size should be within a few times.

Compared with personal storage, streaming media pays less attention to video quality. It pursues higher compression ratio, which is your biggest mistake.

Zactly! :slight_smile: NVENC is lossy compression. So, it’s not going to yield that 2.5T ProRes 422 HQ file I posted above. But it’s still way too large, compared to what, say, x264 would make of it (with high settings).

And let’s be honest, the only reason Topaz switched to NVENC, was because of licensing issues surrounding open-source implementations of H264 in both ffmpeg and x264.

Compared with x264, the hardware encoder has obvious speed advantages, and NVENC can also reduce the file size to a blurry level. You can urge the engineer every day to add cq settings, and then your troubles will be solved.

Nah, as I have no troubles to be solved. :slight_smile: A) Who use H264 nowadays anyway? (Instead of H265); and B) I use ProRes 422 HQ as intermediate output file, and then do a custom 2nd pass with x265 for very high quality HEVC result.

Comments noted, thanks. But I (still) don’t fully understand what is going on here though?

So, if I’m wanting to improve the quality of this test 407 MB video and maintain the same resolution (1280 x 720) and yet keep the processed video file size to be not much larger than the 407 MB (ideally less than 1 GB, if possible), which Video AI settings would be recommended then?

Limit the bitrate of exported video, or use quality control parameters in CLI mode. You can choose H265, which can provide higher picture quality at the same bit rate.

1 Like

For all the newbies, how would this be done? :slight_smile:

It’s very simple, I assume you use nvidia encoder, other encoders you need to search parameters yourself. After your model is set up, click process - show export command - copy, then process - open command prompt to paste the command in, add -cq 19 before the output path and execute it.

1 Like

Thanks for the reply regarding suggested settings for processing videos.

I successfully processed the test video of 407 MB using Proteus and with the encoder set as H.265 Main nVidia. I didn’t attempt any CLI commands as I don’t know what commands are available.

The output video size was 443 MB, which is an acceptable size.

Regarding using the CLI and adding the option -cq 19.

I’m presently running Artemis and processing the test video again using the CLI option -cq 19 to see what the output video looks like.

I’ve entered the command into the commend box and pressed enter. But there is no indication of progress of the encoding process anywhere? Nothing in the command box and nothing within Video AI GUI window either? How do you know what the progress of encoding the video is when using CLI option? Also, there is no preview available either, so I have no idea of output video quality until the CLI option processing has finished (goodness knows when?) encoding the output video?

So, using CLI option for encoding, is it possible to preview the output video (and monitor the final output video) wrt the input video as per the GUI option of encoding videos?

You should have noticed another option, the show preview command, which generates a short video that you can view when it’s finished. CLI mode has no feedback, so you just have to wait for it to finish, Video Roadmap Update (Feb 2023) - #16 by q91632

1 Like