HDR basics


High-Dynamic Range has two images, low light and high light
Camera: take two images, one .hdr file with each pixel having RGB and light.
Standard: HLG Hybrid Log Gamma is compatible with H.264 so that non-HDR TV can still show it.
Older ones like Dolby Vision and HDR10 cannot show on non-HDR TV because these TVs make no sense out of the data.
TV: depending on how bright/dark the TV can do, merge the two image into one and map the pixel values into the range the TV handles.

Self-signed cert


A self-signed certificate that works with older version Chrome may not work with newer versions.
Here are the steps to create such a certificate and test it, done in Cmd console.
Create a signing request:
openssl.exe req -config riowingNetSelfSign.cnf -new -key smtpRioWing.key -out riowingNetSelfSign.csr
View request:
openssl.exe req -text -noout -in riowingNetSelfSign.csr > riowingNetSelfSignCsr.txt
Make the certificate:
openssl.exe x509 -req -days 7023 -extfile riowingNetSelfSign.cnf -extensions SAN -in riowingNetSelfSign.csr -signkey smtpRioWing.key -out riowingNetSelfSign.crt
View certificate:
openssl.exe x509 -in riowingNetSelfSign.crt -text -noout >riowingNetSelfSignCrt.txt
Import the certificate:
certmgr.msc import it to Trusted Root Certification Authorities, it shows up as riowing.netCN
Run a server to test the cert with https (
it can also be tested with nginx, by adding smtpRioWing.key and riowingNetSelfSign.crt to nginx.conf)
openssl.exe s_server -no_dhe -accept 8282 -www -key smtpRioWing.key -cert riowingNetSelfSign.crt
Test the cert with openssl:
echo -n | openssl.exe s_client -servername riowing.net -connect localhost:8282 -CAfile smtpRioWing.crt
Test the cert with Chrome. e.g. version 84 in my case: (can point to localhost or to real remote host)
https://RioWing.net/hls/a.html
File download (not including private key): http://riowing.net/p/wp/SelfSign.zip

Interactive ad server


This is to demo interactive ads on Roku player. Screen capture below.
The ad server files are hosted in http://riowing.net/p/wp/iRollServer/www
These files feed Innovid iRoll preroll and midroll interactive ads.
The preroll ad shows up at the lower left corner.
Upon a click on OK button on remote when the midroll is at the lower left corner, a full screen ad shows up.
The full screen ad is interactive: left button to show poster, and right button to show video, OK to play the video ad.

On the server:
app.xml tells when to show preroll midroll ad, and where to find the ad json files.
bestbuy.json is about the preroll.
PosterVideoSony.json is about the midroll, telling where to get the posters and ad mp4.

Screen capture: http://riowing.net/p/wp/iRollServer/RiaMidroll.mp4
Ad server files: http://riowing.net/p/wp/iRollServer/iRollServer.tar

Roku midroll ad


Ads are played by RAF in a task thread, both preroll and midroll.
Here is the flow:
Scene creates ContentNode with URL, e.g. gym.mp4, and sets it to Video’s content
Call video.control = “play” to start play
Create task thread, and in this thread:
RAF.setAdUrl, e.g. my ad server, http://….vmapPreMidroll.xml
RAF.getAds() to get the pods, each pod multiple ads, each ads multiple streams/mp4
pods have pod like preroll, midroll…
By loop checking video position, When it’s time to show, e.g. midroll,
get the midroll ad from adpods, e.g. adPods[1], stop video and call RAF.showAds(adPods[1])
when showAds returns, resume regular video.

Screen capture: http://riowing.net/p/Midroll2007.mp4
Source code download: http://riowing.net/p/RioRafRsg1.zip