Kodi project to enable HDR in MPC to launch any movie

Discussion in 'High Definition Software' started by gereral1, May 8, 2017.

  1. gereral1

    gereral1 Well-Known Member

    Kodi HDR project tells mpc hc to use the SAME dynamic range as the Samsung or Phillips UHD players. Output yuv thru HDMI at UHD resolution.

    If you have HDR TV set bt2020 mode and use this app and you will match what comes out of your UHD hardware players.

    If you run this bt709 then colors will look off. Color is done on the panel side. Not the PC side.

    That's it. Load up 10bit HDR oled samples or whatever and enjoy.

    It is very important the source material is HDR 10bit or you will see banding in dynamic range mode. Trust me...

    Best to use oled samples to test as these are hevc 10bit color HDR demos.
     
    Last edited: May 11, 2017
    eviltester and nebostrangla like this.
  2. gereral1

    gereral1 Well-Known Member

    14942000289401463916125.jpg 1494200094970190948030.jpg 1494200156982-232380214.jpg 1494200267752-278671632.jpg 1494200304277365631143.jpg 14942003500201329753295.jpg 1494200399999269943745.jpg 14942004434181759487425.jpg 14942004740061296704897.jpg
    The bright areas have proper detail but impossibe to show in these pictures
     
  3. gereral1

    gereral1 Well-Known Member

    1494200828698-409117767.jpg 1494200895329-723784383.jpg 1494200936447-1477215869.jpg

    These pictures were taken of paused image close up to show you the dynamic range of contrast dark to white. Easy when you block the bright areas to get an overall idea. This was in mpc hc in kodi!
     
    Last edited: May 8, 2017
    eviltester and manixx2020 like this.
  4. gereral1

    gereral1 Well-Known Member

    Think Ill change menue options to say Set HDR dynamic mode and Set SDR Mode.

    4k has files that are not encoded in hdr so this may confuse some. Tested chess oled and sony camping video and the nasa hdr video and all of them look beautiful. All samples tested have been oled hdr demos. Max is testing the hdr movie side. Oled and movies are 2 different animals in hdr. Seems like oled takes way more advantage of the dynamic range then movies. I find lights, buildings exploding and night time city scenes use hdr prettty good in movies. Documentary films really push hdr with mountains filmed directly against the raw sun and the same as ground with bright skies. Hdr actually shows detail in the object while filming into direct sun. Crazy shit....
     
    Last edited: May 8, 2017
    eviltester and nebostrangla like this.
  5. cyber201

    cyber201 Member

    thanks for your work.
    It's possible to add your feature in madvr?
     
  6. gereral1

    gereral1 Well-Known Member

    Have to try .....
     
    Last edited: May 8, 2017
  7. manixx2020

    manixx2020 Well-Known Member

    This is really really awsome for PC xbmc users!!!
     
  8. gereral1

    gereral1 Well-Known Member

    Did it work on your hdr tv?
     
    eviltester likes this.
  9. gereral1

    gereral1 Well-Known Member

    Make sure you google hdr samples and download camp sony hdr and the chess oled hdr 10bit demo and load em up. The chess demo is mind blowing! The colors are super and the blacks are black...lol I was kinda amazed trying these other files. Wish I can get more hdr demos. These things are huge files and play lag free.
     
    Last edited: May 16, 2017
    eviltester and nebostrangla like this.
  10. gereral1

    gereral1 Well-Known Member

    I'm going to code look for madvr. If it finds it disable it and switch PC to custom presenter filter and enable direct x. Oncr the user shuts off HDR your original settings will be restored as though my app has affected none of the madvr setup options. Way to many users use madvr and it's not fair if they like my app to have to use this filter. I'll have to see how mashi sets dynamic range in his filter. Then I could offer it with madvr. Be home Friday and will code this in then release the beta. I might also offer extra test apps on the size that can be loaded outside kodi. Load test app and try material. Load another then post the best one. This is what beta testing is about. Every HDR file has different meta data. Another idea is to use media info and code an HDR meta calculator. Write a program to load HDR data and covert it to levels Windows can understand. Place this file in each movie folder and load kodi. Turn on HDR and select video. The HDR app will load the HDR Cal file for the selected movie and you will get absolutely perfect 1 to 1 HDR in kodi with your TV controls unlocked.
    This will insure cd/m2 level will match source. Every movie uses a different cd/m2 level.

    It's all about giving the user the option to change the picture he or she likes. HDR no offense on some movies suck.

    Right now will try static meta data but in the future offer custom meta data per file as this project grows..... This will ensure every video looks exact. Basically I'm doing what audio has done mp3 or wav. Kinda that idea with HDR. Going to call it XDR Kodi add-on. Will eventually extract meta HDR meta data per video bases.... And display exactly what HDR hardware player does. HDR to XDR(extended dynamic range). XDR will be a more friendly file format for HDR for PC. Also processing off HD audio formats must be kept!

    In beta I'll make user press enter at end of program to shut down app. In non beta this app window will load and shut off automatically without any user input.
     
    Last edited: May 12, 2017
    eviltester and nebostrangla like this.
  11. gereral1

    gereral1 Well-Known Member

    Ok finished file. Release the files tomorrow. In beta mode the dos window will show up. In future versions nothing will popup and mode will be set. Tested life of pi, some uhd samples and pretty much all the oled samples. Tested with madvr and it works too..... If you use sofware processing then you must set your lav video filter to turn off gpu assisted acceleration. If you use gpu that can do hdr like amd rx 4 5 series use custom presenter filter and set copyback as gpu acceleration option. Same as nvidia set copyback as the filter. Set color 0-255. Thats it. Load this in kodi and shut it off. This really shows hdr on hdr tv. If you want more keep tv on vivid mode. If you want accurate 1 to 1 hdr keep tv on standard mode (great for night time viewing) You have total control on local dimming on your hdr and non hdr tv which makes the app great. Please post any tips or issues regarding this app and ill see what I can do to improve it.

    You need to use mpc hc 64bit . Latest version and latest version of lav filters. A setup video will follow tomorrow.

    Kodi HDR project v 1.0

    Later
     
    eviltester and nebostrangla like this.
  12. cyber201

    cyber201 Member

    Yeah, thanks a lot general1
    It's possible to use your .exe with Kodi DSPlayer version ??
     
  13. gereral1

    gereral1 Well-Known Member

    Have not tested. Only works in mpc hc 64bit. This is something I would look at in the future. Also mpc bc will be added too in ver 1.0.0.2

    Amd just updated their relive driver and be warned it screws up the black level to white level (causes speckles in shader) while watching hdr. AMD are a bunch of idiots..... had to roll back driver last night to get my hdr to look proper. I wonder if amd cares about video at all because the latest updates .4 .5 where for gamming stuff. Amds .3 was released for new rx5 and the win 10 creators update for access to hdr in win 10. So I suggest that amd 4x 5x use this driver and will mention this in the readme and video. Got this to work in YCbCr 444, YCbCr 422, and YCbCr 420 modes if your card has hdmi 2.0 port. Rgb 444 full limited will not support hdr main 10 at high bit rates. Yuv is delivery format of hdr. You can read about hdr as this article is long. Pc should be set to 0-255 color. Also another good read. Today I will be editing the setup video and uploading the files and video to watch on my youtube channel. This will help set it up correctly with nvida and amd and intel. Tests shows there is no need for hdr meta caculator. Testing 30 hdr samples they all looked exact so this. The rgb xy values remsin static in hdr meta tags. The luma level does too. Max and Min cl are properties set to protect future hdr tvs from over heating. When these are not included they set the max cl on tv for the best intense picture without destortion. Another note hdr is 10 steps of dynamic range added to normal video. I tested 50, 30, 24 and went down to 10. At 10 the white levels matched but the detail was still there. Any lower or higher the blacks or whites got crushed. The overall bightness and hdr wow factor was the best and matched the hdr hardware player at 10 stops of dynamic range. (Maybe thats why they call in hdr main 10?) Hmmm....With pc you must convert these values into decimal and binary. If im wrong on this I would be shocked as Ive tested the original uhd disks with samples with missing meta data and found these results. Brightness decimal to binary has nothing to do with hdr! Hdr is dynamic contrast and saturation levels. Bt2020 must be set on the panel to match the uhd material. Bt709 will be missing 30 percent of the color. Anyone that does not have a monitor or tv with this ...... do not come back saying this app does not work because it does. You must turn off app when watching bluray or dvd and return your monitor color to bt709. In future beta im looking at bt709 to bt2020 shader but thats in the future. Hdr is processed tv side! Not software side.
     
    Last edited: May 16, 2017
    eviltester and nebostrangla like this.
  14. gereral1

    gereral1 Well-Known Member



    Download in video description below the video. Enjoy
    Goto this site and click on the video and in the video description is the link to download the Kodi HDR Project

    https://www.youtube.com/channel/UCMgD5qzBUZ-7Ytzx1wUhKQQ


    Update: as of Monday may 15th:

    Just got back reports there is an error in the program so yanked it till its fixed. Has to do with compiler used.

    Update May 15th: Uploaded files with a different compiler used. No issues now. The black window will remain off when you click on hdr on hdr off, No user intervention needed. Click and load mpc.

    Update may 16:

    Some have issues with wrinting permissions to windows regristry so I will make the source code available so you can convert your .bat file to exe. Simple code video will be released with the kodi hdr project 1.0.0.2 and the compiler will be included and the code. Simple copy paste and hit build. Very simple. You can trust source code in exe because you built it. Plus it saves me from having to pay a distrubution licence for a free app.
     
    Last edited: May 19, 2017 at 5:01 PM
    eviltester likes this.
  15. gereral1

    gereral1 Well-Known Member

    On saturday im going to include compiler at code so you guys can build your own .exe so you knows it a trusted file. Simply copy the reg code into the app and press build. It will create the hdr on.exe

    You can set black white level into the exe if your running projector it lcd. Neat little trick to get hdr to work with cpu 4k video or gpu and hdr and the best yet computer monitors and lcds that are not hdr panels. Same goes with 1080p or 1440. With this trick you can downssmample hdr to lower formats and still see the hdr.

    Due to windows security issues writing to the regristry its better you create your own batch file to exe to turn on and off hdr or as I call it xdr function. If your windows stops adding or changing reg keys then its your problem and not mine and you need to research how to allow access to write or change reg keys.

    In a simple world I make a program. You run it ....everything is great...not.... so ill give you guys the source code and program I used to make the 2 exes. The compiler I used worked on my pc but as soon as I copied the exe to another computer the compiler threw an error that a licence was needed to distrubute your programs. So just build it yourself and it will work. You can choose to show status window or not. I suggest showing it as kodi will think the player is launched with the cmd window input.

    Ill make another quick video showing you how to build this 4 lines of code to .exe to wotk with kodi.

    Honestly I would be careful if someone told me to run .exe so better show the source code to be 100 percent safe. Im no shady guy and am always willing to help the htpc community with anything. This is just one more discovery just like process monitor method for screenpass.

    Hdr10 is 10 points contrast!

    Later....
     
    Last edited: May 19, 2017 at 5:05 PM
    eviltester likes this.
  16. gereral1

    gereral1 Well-Known Member

    Ok guys Version 1.0.0.2 is released and I included the compiler and source code and all the files I used so you guys can make it better.

    The link in below the video on my youtube site.
     
    eviltester likes this.
  17. cyber201

    cyber201 Member

    Hi general1
    Your reg file only modify the MPC-HC parameters but don't turn on automaticaly the HDR switch in Windows 10 CU.
    It's correct?
     
  18. gereral1

    gereral1 Well-Known Member

    Yes. Many are saying are you for real? I have a big advantage as I have the video card, tv and player that support hdr. Some comment this does the color wrong. I keep stating set bt2020 on your tv and it will show exact color as store bought uhd. This is how metafile adjusts your tv they show hdr logo on your panel. Forcing you into their format. This is all a big fat lie. You can spread -20 brightness +20 contrast and match youtubes hdr too. The more you go extreme the cushed the black detail gets. I was in best buy and looked at expensive oled tvs with journey thru colors. With naked eye it looked great. Vibrant reds and black blacks. Then I ask the guy where the girl was in the night time? He said he was not aware of it. Still touting over the color im shacking my head. This is the same for pc. True hdr is dynamic levels of 10f stops ...hdr10. It might not look wow but its accurate. Shadow and light detail looks real over all the content. Red blue green looks correct. Not triple saturated. I own these movies and know way more than adverage in video editing and sound production.


    Assin creed, la la land, now u see me 1 and 2, gods of egypt, enders game, allied, plant earth 2, hacksaw ridge, lone survior, payriots day, deep water horizon, allied, suside squad, fastic beasts, john wick, magnif 7, van desel the last witch hunter, passengers, revenant, oblivion, the great gasby, and everest.

    So if you guys doubt these adjustments then good luck on hdr journey. This is a fun project to automate this in mpc for older hardware to match my expensive hardware that does uhd perfectly fine. Until kodi switches hdr properly you will have to use madvr hdr way or switch hdr tab in windows. Hdr tab also works perfect for me too. Just wanted to see if I could get hdr match and have access to my pucture vivid settings on my sony xbr tv as well. Results are you can watch hdr in daytime light with better results because you have access to local dimming. Projectors and older lcd tvs will work too. For naysayers who bitch because tv does not switch to hdr fine. Go rebuy all your hardware. But for guys who have a wonder cpu and graphic card and oled tv enjoy hdr on older equipment. Thats whole purpose of this. Kodi gets an easy way to turn it on bypassing the stupid do you want to add this prompt. /f command tells windows to go do it.
     
    Last edited: May 20, 2017 at 3:41 PM
    eviltester likes this.
  19. gereral1

    gereral1 Well-Known Member

    One more thing. If you look at her sitting in the room. Screen shots ...... look behind her! See the dark room area? Now on mine its all detail. In oled best buy its gone....black. I tell you the tv companies know how to sell hdr. But a properly calibrated tv will not look so wow but you see every detail the director intended you to see. I know im right...... when I recorded quick release toilet seat review on my youtube channel I used 500 dollar monitor with fslse color which shows color scale for exposure. Notice detail in the white toilet seat? I use 1500 dollar camcorder and 400 dollar sound recorder to get this result. Mind you I make money on my channel and get about 120,000 views a month. So when I talk about hdr I know way more about luts and color and hdr than others. If you truely want to try to calibrate mpc in pc on hdr tv go load seiedits hdr calibration color bars. Adjust your levels tell you see ALL the steps from black to white. Then load a clip. You will be amazed how much hdr material you missed. It looks less vivid but real. Youtubes hdr does not look real but people want hdr that looks rich. Real is boring. Hdr is boring as well but very accurate. Metalic look is not real. You see this in hdr still frames time lapsed video. Color levels are bumped up in post production. What do I know .......

    Im done trying you help out kodi community..... Got way more stuff to get done around house then to sit infront of a computer all day......
     
    Last edited: May 20, 2017 at 3:22 PM
    eviltester and whatever_gong82 like this.
  20. Ch3vr0n

    Ch3vr0n Translator NL & Mod

    Don't let some disgruntled users annoy you. You're doing good stuff. Keep at it!