TVAI Clip Analyzer Tool (Model Recommendations)

tvai_clip_analyzer.zip (372.9 KB)

Hi,

I built a tool to analyze a video clip (default 30 second duration) and determine if it has problems such as aliasing, blur, banding, etc. It then recommends a TVAI model (v7) along with enhancement values.

Requirements:

  • Python 3.10+ 64-bit (tested on 3.12)
  • FFmpeg installed in PATH, ffprobe.exe is recommended
  • Python packages (pip install PySide6 numpy opencv-python pillow matplotlib); matplotlib can be skipped if you don’t want charts

Basic usage:

  • Browse to select a video file
  • Scrub in the timeline to the start of your sample clip
  • Click Set Start = Current
  • Review values in the left side pane, click Analyze 30s Window
  • Review Recommendation at bottom right, optionally copy to clipboard

I’m not a developer by any means. This was made with ChatGPT for my own use. I hope it helps some other users. You’re free to modify the script for your own needs, and/or extend the script’s functionality and republish non-commercially.

9 Likes

Thank you for your effort.

I have successfully tested it and got the results.

But player is unable to play video, nothing in the preview window:

Hi,

Thanks for testing. I built this mainly to work with h.264 MP4 and MKV files. It looks like you have an old AVI file. If you can determine the video codec, I think I can add support. It may tell you in the file properties, or you may need to do some investigation. I’ll work on adding general support for AVI this week.

https://superuser.com/questions/23512/how-do-i-find-the-codec-for-an-avi

It is indeed ADI DV codec. And there’s plenty of footage we have that require upscaling that stored in DV format.

General
Complete name               : C:\Temp\00.25.12.915-00.26.07.406.avi
Format                      : AVI
Format/Info                 : Audio Video Interleave
Commercial name             : DVCAM
Format settings             : BitmapInfoHeader / PcmWaveformat
File size                   : 197 MiB
Duration                    : 55 s 440 ms
Overall bit rate mode       : Constant
Overall bit rate            : 29.9 Mb/s
Frame rate                  : 25.000 FPS
Recorded date               : 2017-06-02 12:00:57+03:00
Writing application         : Lavf60.3.100

Video
ID                          : 0
Format                      : DV
Commercial name             : DVCAM
Codec ID                    : dvsd
Codec ID/Hint               : Sony
Duration                    : 55 s 440 ms
Bit rate mode               : Constant
Bit rate                    : 24.4 Mb/s
Width                       : 720 pixels
Height                      : 576 pixels
Display aspect ratio        : 4:3
Frame rate mode             : Constant
Frame rate                  : 25.000 FPS
Standard                    : PAL
Color space                 : YUV
Chroma subsampling          : 4:2:0
Bit depth                   : 8 bits
Scan type                   : Progressive
Original scan type          : Interlaced
Original scan order         : Bottom Field First
Compression mode            : Lossy
Bits/(Pixel*Frame)          : 2.357
Stream size                 : 187 MiB (95%)

Audio
ID                          : 1
Format                      : PCM
Format settings             : Little / Signed
Codec ID                    : 1
Duration                    : 55 s 427 ms
Bit rate mode               : Constant
Bit rate                    : 1 536 kb/s
Channel(s)                  : 2 channels
Sampling rate               : 48.0 kHz
Bit depth                   : 16 bits
Stream size                 : 10.1 MiB (5%)
Alignment                   : Aligned on interleaves
Interleave, duration        : 21  ms (0.53 video frame)
Interleave, preload duratio : 917  ms


What a a wonderful tool - many thanks for the effort! Something that could/should be built into the core program I would think.

Will install and let you know of my experience.