Video stream ITU-R patcher (Hyperion & Rhea purpose + AV1 encoding (WIP) )

Purpose of the application : autofind best keys to patch an input file to make it fully ITU-R compliant and be readable in all media players.

  • Extended analysis of source file and all ITU-R validated keys (some older ones added)
  • Main purpose is to first patch Hyperion’s and Rhea’s output files to set clean HDR properties, by adding/tweaking keys
  • Second purpose re-encode source file using SVT-AV1 and all its capabilities. (SSIM & PSNR, multi threading > 16 main focus)
  • Third purpose re-encode source file using SVT-AV1-PSY (add Psychovisual funtionnalities to input file)
  • Transformations of source will be subdivided in :
    - Colors
    - Motion
    - Encoding
    - CPU tuning (be ready to fry it)
    → So no CUDA nor OpenCL, because NO GPU, hard-coders s** :grin: in quality terms
    ( roughly estimate 4 days for a top notch quality 4K on 32 cores )

Complete recovery HDR10 metadas, including luminance and HDR specifications

Full recover of BR SDR with free Dynamic range meta. output taken from large range
[EDIT : Partial, as I introduced new parameters, need to crosslink it yet → RGB,WP,L]

Hyperion’s HDR detection
Complete auto filling missing fields (but luminance :sweat_smile:, not a drama it’s PQ)

Quality scale which will serve as a landmark for quality throughout the whole application.

image

Start = begin of ITU-R ratification ~BT.470
End = end of ITU-R ratification : now, meaning BT.2100 / 16b / 4:4:4 / HDR Vivid

Note : I will not integrate any coder / format / standard for output that is not free or open source (eg : Dolby Vision, ProRes, … ) even if it is listed in combo box. I’ll get a focus on this later, there are too many at the moment.

2 Likes

You think it’s the right forum to post it on?

Huh ? Would you be more precise ?

the HDR function is in Alpha stage, this type of posts needs to be in the Beta forum (under the appropriate thread in the Beta forum), not in the “Release” support forum.

Well … If it is the only problem I’ll move it :sweat_smile:
(To my there’s more important things to deal with :grin:)

What else ?

I don’t see a problem with it being posted here. Most people feel like Alpha testers anyway… (And if I remember right, everyone has access to it now.)

This Python script is my kind of solution. I care exactly nothing for HDR though. So the most I will do is applaud the effort. Otherwise I would say put it up on github.

Does anyone know what is “Studio” in Color Range parameter ?
I was thinking Studio = Limited, but did not find exact match in documentation :thinking:

I think it’s called full.

From what I got since now is Color range

Studio = Limited = 16-235
Full = Full = 0-255

in YUV color format

All metas concerning Hyperion’s colors has been GUIed :slight_smile:
Added a “gadget” color range to see what is the best output

Project resurrected with approbation of Tony, felt as an encouraging :grin:

Beyond that, I personally really need it to patch my output files. :sweat_smile:

Now read properly color range from input and it automatically set it to output
if not read, output remain empty :slight_smile:
Next focus will be auto-setting GBR, WP, and L according to ITU-R specs

  • Uggly GUI killed → use of WinAPI
  • Full scan of video file done
  • Some keys integrated in input fields, with UIT-R accuracy and exact official terms
  • Auto scaling the key with a blue > green > yellow > red gradient to get instant “quality” of a given key around possible choices.
  • Auto rebuild output keys with input keys → Goal is full UIT-R HDR10 compatible file., filling TVAI’s Hyperion and Rhea’s “holes”
  • Auto find if patchable (adding tag) or require re-encoding ( major key changes)
  • Icon generation fully re-written with WinAPI call, I don’t want the GUI to slow down anything
  • Several cross-analysis added
  • Some controls added for testing and GUI debug phase
  • VideoAI model detection → This will help to fine tune missing fields
  • Complete differentiation of terms and standards, even if they overlap or are identical
    → eg BT.2100 and BT.2020
  • Billion of bugs fixed, because I roll face on my keyboard to code fast …
  • Icon color change re-written, faster and less CPU load
  • Matrix Coefficent correspondence written (what a pain with old format)
  • Many bugs removed
  • Luminance added
  • Autoclean / File readings fastened
  • All TVAI enhancements & SDR→HDR model tags handled
  • Definitive color scale built on HUE rotation scale red → orange → yellow → green → cyan → blue → purple : usual in video.
  • dynamic roll over combobox to fasten selection
  • WinAPI replaced with WM_COMMAND message, much faster
  • Added Mastering display min / max luminance ( your display device abilities )
  • Added Content luminance MaxFALL / MaxCLL ( encoded luminance )
    → If not readable through Metas, last part will be a partial/full checkout reading the file
  • Scan of [FRAME][/FRAME] integrated
  • Start of missing metadatas recovery : color primaries, transfer characteristics, & matrix coefficients for FHD sources
  • Handling of HDR flag done through Hyperion’s tag
  • I finally opted for Dolby Vision management (partial)
    → Dolby Vision is interesting because it can encapsulate HDR10 / HDR10+ / DV
    → It can provide valuable meta via its profile, helping to fill in the missing tags
  • HDR fields divided into 2 fields
  • “HDR Format” which gives the type of HDR that will be used by the player
  • “HDR Specifications” which give detailed specifications of the format. These specs are guaranteed to be useful for getting and the crazy
    → SMPTE 2086 should perfectly match with Hyperion’s SMPTE ST 2084 (PQ)
    → Finely tuned and change the final rendering as much as HDR “hypothetically” does
  • Many new HDR related variables have been introduced, and bugs… that I had to debug :face_vomiting:
  • 7 new meta retrieval cases around BT.601 for SD (PAL) and SD (NTSC), new format introduced
    → Will give accurate metas of old transmuted sequences (interlacing/fps)
  • Added a toggle button to switch the view between and coordinates and luminance. → They don’t have the same purpose, but it saves a lot of screen space
    → Also, we can have AND metadata, or alone or alone… for now I keep the original settings: forcing = can lead to incorrect tone mapping, let’s see how our players handle that (it’s their job normally)
    → Different and are choices of movie directors to force certain tone mappings, they are rare but exist (e.g. Wonder Woman 1984)

→ we are getting closer to the first goal!
I now focus on light, with a Min Max luminance

Not that much progress on Color / Brightness detection, but …

  • Added a huge amount of Dynamic range (with static one)
  • Added True 4K handling (4096x2160p SXRD purpose owners)
  • Focusing AV1, as i so highly need it, fed up with commandline and tools that do everything not any single thing good (mine will do a single and badly, at least ! :rofl:)

In order to handle some AV1 paarmeters, focus went to GUI and omg … forgot the pleasure to play with this. It’s like being a kid in a candy shop, with modern tools.
I know now why Topaz spent its time on it :grin: :innocent:

  • 5 Main buttons added with relative frame
  • High candy, kitch as heaven button, hope they are clear enough, I had to move away from the official visual charters because I have not yet requested any authorization :face_with_spiral_eyes:

Hard job last days getting GUI so resources friendly, but it is now. It can runs on a ZX81

  • Added 3 new cases of “Chroma Sample position” → all 6 cases reported by ffmpeg are done
  • All buttons are clickable and go to their dedicated frame
  • Added a bottom frame, that is a “whenever” viewable frame summing up source to destination action
    → Added in this permanent view “Open source” button and "Encode / Patch " button, may be dynamic if source does not need to be re-encoded.
  • Added a full “Color Space” analysis, because it’s usefull :sweat_smile:
    → To save space with RGB and WP coordinates I kept the toggle button for “Mastering Display metadatas” and “Color Space”
  • Starting to listing all parameters relative to screen / motion / fps in second tabs
    → The distribution will certainly change to make it as explicit and simple as possible
    If only I have shut up my **** mouth when starting this project, there are SO MANY parameters in SVT-AV1 :scream:

You created this app from scratch? Where can we DL it?

Yes I created it from scratch for 2 reasons

  • TVAI output files lack meta. While Windows reads them very well thanks to tons of rendering filters, this is not the case for dedicated chips that need all the tags to clearly understand what is happening. Kodi is one of them.
  • AV1 has so much power inside and is so underutilized because of the pressure from the main H265 leaders, that it evolves too slowly in my opinion. I have read the white papers of SVT-AV1 carefully and it has a huge potential, I am not even talking about PSY tricking our brains to get a cutting edge visual experience.

I’m not patient, so when things don’t go fast enough, I do them myself. :smile:

So yes, I am currently coding to get what I do not get from other applications out there, but since I have to learn some parts while I code, it is kind of difficult and I can not rush the development more than in my free time.

As soon as I have something executable, I will share it for free or anywhere. I still have to ask some things to SVT-AV1, AOMedia maybe, ffmpeg and some thanks for not violating the GPL license.
At least I have Tony’s permission to develop this tool which revolves around TVAI and that’s already a very good thing !

My approach is simple: the pure agile method, start from the most frequent and simple case to then refine and reach the rarer and more specific cases and that’s why I will need your help to test on hardware or video sources that I don’t have.

2 Likes