The next release of the VEAI 3 alpha is now available! Please note that these initial releases only utilize a subset of FFmpeg features - some features available in general FFmpeg builds may not be available in this build.
Changelog
Mac support
(Mac) Added OpenH264 encoders
(Mac) Added libvpx encoders
(Windows) Run scripts now default to H.265 hardware encoders. This should resolve some quality issues with HD videos.
Model versions bumped
All Platforms
Please download the additional set of models at the top of this post, and copy over the models included in the archive.
Follow the remaining instructions for your platform.
Windows Installation
Extract the downloaded zip file to a location of your choice
Run the “run-me" file appropriate for your graphics card.
You will be prompted to confirm the auto-detected models location. In most situations, you should be able to just enter “Y”
Follow the on-screen prompts to login to TopazLabs.com and enter your VEAI options
VEAI will run on your files
Once complete you can either exit the window, or type additional commands (see Advanced Usage)
Mac Installation
Extract the downloaded txz file to a location of your choice
Using terminal, run ./installer.command file to set appropriate environment variables.
Run veai-ffmpeg/bin/login email password
Run veai-ffmpeg/run-me.sh input.mp4 to upscale using Video Toolbox.
Advanced Usage
If you have an existing models folder, you may select it by setting the VEAI_MODEL_DIR setting in your system environment variables. If you do not already have downloaded models in this folder, you will need to copy the model JSON files from the download into this folder. It will then be detected by run-me.bat
Mac users: this variable is automatically set in .bashrc. If you are using ZSH you may want to move this variable to .zshrc.
(Windows) After run-me.bat finishes, you can execute additional VEAI sessions by running FFmpeg. See the end of run-me.bat for an example.
As an example: ffmpeg -hide_banner -i "input.mp4" -vf veai_up="scale=2:model=amq-12" "input-2x.mp4" would upscale input by 2x using AMQ 12, saving the output to input-2x.mp4
(Mac) The ffmpeg command can be invoked similarly to perform additional VEAI sessions. Our setup scripts currently assume bash will be the terminal used. ZSH users should set the appropriate variables in .zshrc.
Available Models
aaa
ahq
alq
alws
amq
amqs
ddv
dtd
dtds
dtv
dtvs
gcg
ghq
prob
thd
thf
Licenses
FFmpeg is licensed under the GNU Lesser General Public License version 2.1 or later (LGPL v2.1+). A copy of this license can be found here .
OpenH264 is licensed under the BSD license. A copy can be found here
libvpx is licensed under the BSD license. A copy can be found here
I had zero joy using my 3 minute 50 second mp4 test video and the dtv model (the colorspace yuv420p to bgr481e error) so I changed the model to ghq-5 and it again shows the colorspace error but it does continue. But a a snail pace of 4.7 fps!!
While the 2.6.3.3.b thread is closed already and I am not too familar with a command line interface anymore (last I used one was back in the 1980’s I am afraid) I just wanted to mention that the 2.6.3.3.b still suffers from some sort of a memory leak still if not the Nvidia driver itself. After running two instances of VE AI well I started a game in addition. When I ended the game, both instances of VE AI ran very slow and never speeded up again until I reboot the whole PC and opened two fresh instances of VE AI to continue the work.
We are aware of the memory leak situation on windows with v2.6.3.
We are moving to a different architecture and code base for 3.0, the first GUI alphas/betas should be out in a few weeks. So far we have not seen any memory issues with the new version.
Is there a tutorial for a noob with command lines like me on how to get started with this? Do I need to set the output file to a folder or something, how does that work?
[Parsed_veai_up_0 @ 0x7fecc6106a00] Failed to configure output pad on Parsed_veai_up_0
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
What does that mean and how to fix that?
Thank you.
Trying to document what I understand of the ffmpeg command VEAI is launching, your feedback/corrections are welcome of course!
ffmpeg
-hide_banner Suppress printing banner
-strict 2 allow non standardized experimental decoders and encoders
-hwaccel auto hardware acceleration
-i “input.mkv” input file
-vf veai_up=“threads=2:scale=2:model=amq-13” VEAI parameters
-c:v hevc_nvenc envoder = nvidia, hevc_nvenc: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 rgb0 cuda d3d11
-rc vbr variable bitr rate
-cq 24 Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control (from 0 to 51) (default 0)
-qmin 24 Set min video quantizer scale (VBR). Must be included between -1 and 69, default value is 2.
-qmax 24 Set max video quantizer scale (VBR). Must be included between -1 and 1024, default value is 31.
-profile:v main10 Set the encoding profile
-pix_fmt p010le 10 bit pixel format (other options available for hevc_nvenc?)
-b:v 0K video bitrate
“output.mp4” output file
That’s correct! If you want to see more of the options available for the encoders, such as what other pixel formats are valid, ffmpeg has some built in help you can access: ffmpeg -h encoder=hevc_nvenc
There is no more gamma/color differences compared with V2.6 but there are still diffrences with the outputs whatever model I have tried at least.
GHQ have more chroma noise in dark areas in v3.0a and on contrary with AMQ-12 seems more denoised with sharper edges.
But overall v2.6 outputs are still better quality for the same model.
Just spotted the Mac version was here - I’ve been a little slow off the mark. It seems to work nicely (once stopped doing stupid things on installation, and then figured out how to add the Proteus params)
Not done much with it as yet - just a couple of tests of Proteus. I did notice though that it’s only using a small part of the GPU capacity (I’m on a 6800 - it was using around 16% GPU)
Changed the 2-threads in the run-me-nvidia.bat to 4 and increased the upscaling speed to around 6.8fps (RTX 3070 on DVD deinterlaced video, model ‘amq-13’).
It downsampled the audio from 256kb/s to 192kb/s, could be worth to add an option to skip encoding audio (-acodec copy).
One more problem is the scaling multiply. Going from 720x576 video to 1920x1080 is not possible with this method, as x2 will yield a >1080 pixels height result.
Tried manually adjusting the parameter but it seems the veai plugin expects only multiply.
Could be worth adding a way to upscale to specific resolution with black bars like in the normal VEAI.
Result looks awesome nontheless, so thank you for the hard work!
Much appreciated