Hello guest, if you like this forum, why don't you register? https://fanrestore.com/member.php?action=register (December 14, 2021) x


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 4,992
» Latest member: JohngPR
» Forum threads: 5,782
» Forum posts: 84,574

Full Statistics

Latest Threads
Thunderbolt (霹靂火)--1995 J...
Forum: Released
Last Post: JohngPR
9 hours ago
» Replies: 24
» Views: 10,011
Police Story IV: First St...
Forum: Released
Last Post: JohngPR
9 hours ago
» Replies: 30
» Views: 7,881
Jackie Chan's "Who Am I?"...
Forum: Released
Last Post: JohngPR
9 hours ago
» Replies: 20
» Views: 4,397
Workprint Collection - Bl...
Forum: Released
Last Post: Pineapples101
Yesterday, 07:36 PM
» Replies: 0
» Views: 30
Media player recommendati...
Forum: Everything else...
Last Post: ThePipes
Yesterday, 03:11 AM
» Replies: 58
» Views: 22,297
Films that used silver re...
Forum: Official and unofficial releases
Last Post: gateway2000X
2025-04-20, 02:25 PM
» Replies: 30
» Views: 32,920
New user from Australia
Forum: Presentation
Last Post: Serums
2025-04-20, 06:58 AM
» Replies: 1
» Views: 93
New user from california
Forum: Presentation
Last Post: Serums
2025-04-20, 06:57 AM
» Replies: 1
» Views: 51
Shaolin Soccer [DUB Editi...
Forum: Released
Last Post: Serums
2025-04-20, 06:56 AM
» Replies: 3
» Views: 3,636
New User
Forum: Presentation
Last Post: gdoutre
2025-04-19, 03:35 AM
» Replies: 0
» Views: 54

 
  Technical aspects/workflow of HDR grading & encoding
Posted by: deleted user - 2019-12-26, 02:32 PM - Forum: Audio and video editing - Replies (1)

May this be a general thread for discussing HDR from a technical & workfllow perspective for those interested in encoding and creating HDR content.

I'll start out with something I wanna share, a little bit of information regarding nits and the HDR curve and such, based on my own experiments. Also wanna preface this by saying I don't have a HDR display, so this is mostly considerations from a technical perspective.

The usefulness of these thoughts I will explain on the bottom of the post.

Here's my experiment:

   

Here's what I did:
1. Created a 32bit floating point image in Photoshop, with a custom linear sRGB colorspace (gamma set to 1).

2. Created 3 white rectangles. The darkest one had intensity set to 1. That means that on a normal display it reaches peak brightness. Then I created another one with an intensity of 4, equivalent to a 2 stop overexposure. I could do this thanks to the 32bit floating point space in Photoshop. And then a third one with an intensity of 16, equivalent to a 4 stop overexposure. On my display they all simply looked equally white.

3. Saved this image as an OpenEXR file (supports overbright values >1).

4. Opened this OpenEXR file in After Effects and told AE to interpret it as linear sRGB, like it was saved. Set After Effects project setting to 32 bit floating point with, again, linear sRGB color space. The linear color space is important to arrive at the correct values, gamma only complicates things. In linear color space, 2 simply means twice as much light as 1, 4 twice as much as 2, and so on.

5. Exported as 16 bit TIFF, but made sure to set a Rec2020 PQ HDR ICC Profile for the export. This makes AE automatically convert the superbright (>1) values into the HDR PQ color space. PQ is the same color space that most (if not all) UHD HDR Blu Rays use.

6. The resulting TIFF I opened in Photoshop and interpreted (not converted!) the colors as normal sRGB. This was just done for convenience, so that the image you see above has visible shades, otherwise Photoshop automatically *converts* into sRGB and thus all the shades are pure white again, which for this demonstration isn't very useful, as I wanna see that it actually worked and I ended up with different shades, or in other words, that the superbright detail was actually preserved.

7. Now I hovered the mouse over the different shades while having the mode in the Info-window set to 32 bit floating point. Thus I got the values you can see written on top as "PQ: ". Those are values between 0 and 1, representing the actual RGB brightness in the PQ-HDR-encoded image (or video). Of course that 0-1 would be scaled up to, for example, 0-1023 for 10 bit HDR video, it's merely a different way of displaying the data. I chose the 0-1 representation mainly because of the next step:

8.    

Link: https://github.com/colour-science/colour...st_2084.py

This script is part of the colour-science package in Python. It basically converts the raw PQ signal value to nits. This is possible because with PQ HDR (the de facto standard these days) every value in the encoded video corresponds precisely with an intensity in nits. You can see in the screenshot how to call the script, if you want to test it out yourself. I did this with Anaconda in the Anaconda prompt. Details on how to get it working on the bottom of the post.

9. I noted the resulting nit brightness on the bottom in my little graphic on the top of this post.

10. As you can see, there's a clear pattern we can see: A fully bright pixel (intensity of 1) in a 32 bit floating point composition in After Effects corresponds with pretty much exactly 100 nits (probably some rounding errors somewhere). A pixel with the intensity of 4 corresponds with pretty much exactly 400 nits, and the pixel with an intensity of 16 has a brightness of 1600 nits.


Why is this useful?

Simple. Let's say you have some linear footage like, for instance ... a film scan. Typically this scan will be rather dark due to headroom necessary to avoid clipped highlights. In a normal SDR grade you would use some form of curves to compress the highlights without blowing them out, for instance via Gamma, or by hand, in order to get more detail in the shadows.

In an HDR grade, you can do this instead: Make sure you're in a linear color space and 32 bit floating point in After Effects. Apply the "Exposure" filter. Set Exposure to a value that gives you enough detail in the shadows. You will now have blown out highlights, but don't worry, it's all part of the plan. Next, export the video while setting a Rec2020 PQ color profile for the export. After Effects will automatically convert the blown out highlights (which aren't really blown out) into the correct HDR values. You don't even need an HDR display to do this. Great!

And here's where all this information comes in super handy too: In order to make a proper HDR encode that is compatible and works, you need to supply metadata. Most importantly, the peak brightness. This value doesn't affect the image per se, rather it gives TVs a hint on how to remap superbright values if they cannot reach the brightness of the content. Normally you would just have to guess some random value. If you guess too low, you may end up with clipped highlights, because the TV doesn't take them into account when tonemapping. If you guess too high, your image will end up too dark after tonemapping because the TV tries to take into account a very high peak brightness that is never actually reached.

With the information we have though, we can give it the correct value. Let's say you have your linear footage in your composition without any adjustments. Now you know that the brightest possible pixel in the footage will be an intensity of 1. We also know that 1 means 100 nits. Now, if you raise Exposure by, say, 2 stops, via the Exposure effect, you get an intensity of 4 (one stop means the amount of light doubles). And we also know that an intensity of 4 equals 400 nits.

Whatever Exposure adjustment you set under the described circumstances, you can simply multiply it by 100 and get the theoretical peak brightness in nits.

So for instance:
Exposure +1 stop = 200 nits peak
Exposure +2 stops = 400 nits peak
Exposure +3 stops = 800 nits peak
Exposure +4 stops = 1600 nits peak

With the film scans I tested so far, typically a value between 2 and 3 stops seems good to me, so you get a peak brightness somewhere between 400 and 800 nits.

Which coincidentally is in the range that the new Star Wars HDR remasters reach. Many people said it wasn't "true HDR", but I disagree based on the film scans I played around with, it's a pretty believable range for 35mm content. Granted, a scan from the negative might reveal more range in theory, but you wouldn't get that kind of range in the cinema on 35mm, so it's pretty "faithful" in that aspect imo.


How can I do that fancy Python script stuff myself?

I say fancy because I'm a complete Python noob myself, but anyway, here's how I did it:

1. Install Anaconda (it's a kind of Python package/distribution or sth)
2. Run Anaconda Prompt
3. Do this:

Code:
pip install colour-science
4. Run python simply by entering:
Code:
python
5. Do this:
Code:
import colour as colour
6. and this:
Code:
colour.models.eotf_ST2084(0.5)
Replace 0.5 with any any PQ intensity (normalized to a range between 0 and 1).

7. Receive the corresponding nit intensity as a result.


Hope this can be useful to someone someday. Smile  I'm no expert or anything, but thought I'd share the little I figured out to demystify HDR a little.

Print this item

  Merry Christmas Fanressers!
Posted by: Bigrob - 2019-12-24, 03:22 PM - Forum: Everything else... - Replies (13)

Just taking this opportunity now to wish all members and contributors on Fan Res a very merry Christmas and a happy new year! Can't wait to see what projects are done during 2020!

I'm off now recovering from shoulder surgery yesterday. Finally managed to get my surround system wired up after two years in storage so looking forward to checking out some of the projects on here finally!

Print this item

  Thumbnail script with scene detection
Posted by: deleted user - 2019-12-23, 06:04 AM - Forum: Script snippets - Replies (1)

Made this bash script (can be used on Windows with the Git Bash that comes with the Git installer) for creating thumbnails.

Difference to other thumbnail creating possibilities is that this one uses scene detection, so it's suited well for shorter videos like trailers when you want to get every distinct shot.

It's not perfect - you get blank frames for example during short flashes and it won't recognize faded changes usually, but I'm happy with it.

Requirements

- Ability to run .sh scripts. So either run in Linux or install a bash for Windows (for example Git Bash that comes with the Git installer)
- ffmpeg in the PATH.
- That's it!

How to use

1. Replace "Trailer.mkv" with the file you want to create thumbnails for
2. Set "columns" to how many columns of thumbnails you want to be displayed side-by-side
3. Set "columnwidth" to the width in pixels an individual thumbnail should have
4. Set "maxrows" to a high enough estimated number to fit in all thumbnails (from your experience and experiments) and then add 10. It's a bit awkwardly done, but ffmpeg needs you to set the amount of thumbnail tiles in advance, hence this script has a second cropping stage.
5. Set "scenedetect" to a value depending on your content. Lower values make it more sensitive. However darker scenes require higher sensitivity. It's a bit dumb, but I don't know a better way. For dark videos I recommend values around 0.2 and for bright content around 0.4.
6. Adjust JPEG quality if you want, but I don't know if it actually makes a difference for ffmpeg. Might replace this with a better JPEG compressor but I wanted this to work with the only dependency being ffmpeg.
7. Double click the script and wait for it to finish. Can take a little while.

The script will always create both .png and .jpg formats. Just keep the one you prefer.

Script (save as somefile.sh):

Code:
#!/bin/bash
inputfile="Trailer.mkv"
columns=4
columnwidth=640
maxrows=30
scenedetect=0.2 #Scene detection treshold. Lower = greater detection. Try around 0.2 for dark videos and 0.4 for normal videos
jpegquality=1 #JPEG quality from 1-31 with 31 being worst quality (not sure if this works!)


x="x"
tmpfile="$inputfile.tmp.bmp"
outputfile="$inputfile.png"
outputfilejpg="$inputfile.jpg"
tiles="$columns$x$maxrows"
echo "Doing scene analysis: $inputfile ..."
ffmpeg -i "$inputfile" -vf select="gt(scene\,$scenedetect)",scale=$columnwidth:-1,tile=$tiles  -hide_banner -frames:v 1 "$tmpfile" 2>/dev/null
echo "Generated temporary uncropped tile file $tmpfile ..."
cropvalue=`ffmpeg -loop 1 -r 1 -i "$tmpfile" -t 2 -r 1 -vf cropdetect=0:1:0  -f null - 2>&1  | awk '/crop/ { print $NF }' | tail -1`
echo "Calculated crop value: $cropvalue"
echo "Generating PNG file: $outputfile"
ffmpeg -i "$tmpfile" -vf $cropvalue -hide_banner  "$outputfile"  2>/dev/null
echo "Generating JPG file: $outputfilejpg"
ffmpeg -i "$tmpfile" -vf $cropvalue -hide_banner -q:v $jpegquality "$outputfilejpg"  2>/dev/null
echo "Deleting temporary file: $tmpfile"
rm "$tmpfile"
read -rsp $'(Hopefully) done! Press any key to continue...\n' -n1 key

Print this item

  Shaolin Soccer [DUB Edition]
Posted by: JackReacher - 2019-12-22, 03:40 PM - Forum: Released - Replies (3)

Shaolin Soccer [DUB Edition]

[Image: Poster.png]
Motive
Yes the Director's Cut is superior. This project is a reconstruction of the International Cut DVD with the Original English Dub since the International Cut on the BluRay has a revised dub as well as more censoring. As they say on Slavic trackers: "I hope you like the presentation!".

Video
International Cut BD used as main source with Director's Cut BD for missing scenes and International Cut DVD as reference.

Audio
International Cut DVD used as main source with excerpts from International Cut BD.

Runtime: 1h29m15s
Video format: x264 1920x1080 1.78:1 23.976 fps

Audio format: DTS-HD MA 5.1 English
Release format: 
MKV (BD-Compatible)

Gratitude
Captain Khajiit
TomArrow
spoRv
kadenzza
random.next
Chewtobacca
zoidberg

Comparison
US BD vs Original Dub

Media info
Complete name              : Shaolin Soccer 2001 DUB Edition 1080p BluRay DTS-HD x264.mkv
Format                      : Matroska

Format version              : Version 4 / Version 2

File size                  : 17.8 GiB

Duration                    : 1 h 29 min

Overall bit rate mode      : Variable

Overall bit rate            : 28.6 Mb/s

Encoded date                : UTC 2019-12-19 09:06:52

Writing application        : mkvmerge v40.0.0 ('Old Town Road + Pony') 64-bit

Writing library            : libebml v1.3.9 + libmatroska v1.5.2



Video

ID                          : 1

Format                      : AVC

Format/Info                : Advanced Video Codec

Format profile              : High@L4.1

Format settings            : CABAC / 4 Ref Frames

Format settings, CABAC      : Yes

Format settings, ReFrames  : 4 frames

Codec ID                    : V_MPEG4/ISO/AVC

Duration                    : 1 h 29 min

Bit rate mode              : Variable

Nominal bit rate            : 25.0 Mb/s

Maximum bit rate            : 40.0 Mb/s

Width                      : 1 920 pixels

Height                      : 1 080 pixels

Display aspect ratio        : 16:9

Frame rate mode            : Constant

Frame rate                  : 23.976 (24000/1001) FPS

Color space                : YUV

Chroma subsampling          : 4:2:0

Bit depth                  : 8 bits

Scan type                  : Progressive

Bits/(Pixel*Frame)          : 0.503

Writing library            : x264 core 158 r2988 7817004

Encoding settings          : cabac=1 / ref=4 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-3 / threads=6 / lookahead_threads=1 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=1 / constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=0 / keyint=24 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=24 / rc=2pass / mbtree=1 / bitrate=25000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=40000 / vbv_bufsize=30000 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:1.00

Language                    : English

Default                    : Yes

Forced                      : No

Color range                : Limited

Color primaries            : BT.709

Transfer characteristics    : BT.709

Matrix coefficients        : BT.709



Audio

ID                          : 2

Format                      : DTS

Format/Info                : Digital Theater Systems

Format profile              : MA / Core

Codec ID                    : A_DTS

Duration                    : 1 h 29 min

Bit rate mode              : Variable / Constant

Bit rate                    : Unknown / 1 509 kb/s

Channel(s)                  : 6 channels

Channel positions          : Front: L C R, Side: L R, LFE

Sampling rate              : 48.0 kHz

Frame rate                  : 93.750 FPS (512 SPF)

Bit depth                  : 24 bits

Compression mode            : Lossless / Lossy

Language                    : English

Default                    : Yes

Forced                      : No



Menu

00:00:00.000                : en: Opening Titles

00:01:15.742                : en: Golden Leg!

00:02:06.501                : en: Mr. Hung

00:02:43.830                : en: Ready to Coach

00:05:04.387                : en: A Source of All Martial Art

00:10:01.309                : en: Twenty Cent

00:10:59.951                : en: Steam Buns!

00:13:23.845                : en: Bargaining

00:16:17.018                : en: With Song!

00:17:30.258                : en: Shaolin Kung Fu's Great

00:20:38.320                : en: An Apology

00:22:47.616                : en: No Time to Lose!

00:24:30.010                : en: My Shoes

00:25:07.673                : en: Kung Fu Soccer

00:31:58.542                : en: Hope

00:32:58.894                : en: Training

00:36:04.663                : en: He Can Win Alone

00:37:44.429                : en: This Game Is War!

00:42:54.572                : en: Kung Fu Back

00:46:32.832                : en: Team Evil Training

00:47:46.989                : en: What Do You Call This Team?

00:48:49.468                : en: Anything You Want

00:52:02.328                : en: Our Fans

00:52:50.959                : en: An Optical Illusion

00:54:56.084                : en: Sixty to Nothing?

00:55:53.267                : en: We Bring It To Soccer!

00:56:35.225                : en: Old Shoes Old Lives

00:59:47.501                : en: To The Finals!

01:01:36.234                : en: Salty Buns

01:03:41.192                : en: Shaolin vs. Evil

01:07:57.699                : en: No Problem!

01:09:26.329                : en: This Game Is Rigged!

01:11:32.663                : en: Half-Time

01:12:40.022                : en: Kung Fu Spirit

01:16:53.275                : en: Only Seven Men

01:21:48.570                : en: Victory

01:23:08.817                : en: Living Shaolin

01:24:44.663                : en: Outtakes
01:26:23.303                : en: End Credits

Print this item

  Alien Super 8mm - HD version?
Posted by: Bigrob - 2019-12-19, 12:16 PM - Forum: Requests, proposals, help - Replies (5)

   

Just wondering, I have the Alien Appendix series on DVD and on one of the discs is the Super 8mm 'digest' version but in SD only.

Was there ever a HD version of this Super 8mm version or would it not be feasible?

Print this item

  Roxanne (1987) Colors
Posted by: Doctor M - 2019-12-18, 07:46 AM - Forum: Official and unofficial releases - Replies (2)

I don't know how well know this Steve Martin film is, but a recent Blu-ray release from Mill Creek Entertainment in gimmick VHS looking packaging took an existing transfer and made color and contrast changes.

A quote from Blu-Ray.com:

Mill Creek has adjusted the contrast for its release of Roxanne, boosting the color well above the previous Sony issue which appears hazy and dull by comparison. Here, colors pop with more punch and authority; reds around the fire house, for example, are far deeper, ditto some of the blue shirts worn around the department. White depth is superior, black levels are deeper, and skin tones are fuller with a modest push to red. There's not any major difference to textural revelation. Environments, attire, and skin textures appear similarly if not identically to what the Sony disc has on offer when conducting A-B comparisons. The Mill Creek version further retains a natural grain structure, yielding a pleasing viewing experience. How true or untrue the color temperature is to Director Fred Schepisi's and Cinematographer Ian Baker's original vision for the film is unknown, but it's certainly a departure from Sony's decade-old release and to this reviewer's eyes is the nicer of the two.

It's impressive, but I don't remember the movie EVERY looking vibrant.
Does anyone have any source or idea what is correct for this movie?

Print this item

  I Am Cuba : Criterion (1964) Laserdisc PCM
Posted by: HippieDalek - 2019-12-17, 03:04 PM - Forum: Released - No Replies

   
https://www.lddb.com/laserdisc/06893/CC1447L/I-Am-Cuba

16-bit, 44.1khz, Mono (bit perfect) 1.40 GB, PM for the link.

The soundtrack is mono but is preserved as a stereo track (left and right are identical) as it is on the laserdisc.

Print this item

  Citizen Kane: Criterion 50th Anniversary Special Edition (1941) Laserdisc PCM
Posted by: HippieDalek - 2019-12-17, 03:02 PM - Forum: Released - Replies (9)

   
https://www.lddb.com/laserdisc/03856/CC1...al-Edition
16-bit, 44.1khz, Mono (bit perfect) 1.18 GB, PM for the link.

The soundtrack is mono but is preserved as a stereo track (left and right are identical) as it is on the laserdisc. 

Print this item

  Bad Lieutenant (1992) Laserdisc PCM - Original Soundtrack
Posted by: HippieDalek - 2019-12-17, 02:58 PM - Forum: Released - Replies (8)

   
https://www.lddb.com/laserdisc/23584/LD6...Lieutenant

16-bit, 44.1khz, Stereo (bit perfect) 974 MB, PM for the link.

This is from the first US laserdisc which features the song "Signifying Rapper" by Schooly D prominently in the soundtrack. This song was removed from all later versions. 

Print this item

  Titanic (1997) UAR
Posted by: spoRv - 2019-12-16, 05:11 PM - Forum: Requests, proposals, help - Replies (17)

Today I had an intuition, à la House M.D.! Happy



Why not producing a "better" version of Titanic? As an image worth more than thousand words... top BD 3D, bottom UAR:



[Image: Titanic-025265-3-D.jpg]

[Image: Titanic-025265-UAR.jpg]



Further comparisons:

http://www.framecompare.com/image-compar...n/D6LDLNNX

http://www.framecompare.com/image-compar...n/JMBJJNNU



UAR pros:


  • 2006 master - pre-2012 with no digital corrections
  • "original" image - no 3D postproduction at all
  • better colors - closer to theatrical one, and no teal&orange palette
  • bigger frame size in open matte shots - usually on three sides
  • bigger frame size in widescreen or UAR shots - where BD 3D open matte is cropped



UAR cons:


  • lower resolution (even if image seems crispier somehow)
  • slight magenta blanket (easily solvable)
  • few shots must be replaced with regraded BD 3D ones, due to fades in/out placed for TV spots
  • blown highlights
  • faint TV logo (1 HD) remains on top right (if another open matte version would be spotted, it could be fixed)

of course, it will get also quite some audio tracks included!



I think pros outweigh the cons... and you?



Test clip [short] (available until Sunday 20th 2019, so hurry up!):

https://fex.net/s/lvoenkp

Test clip [long, first 23m] (available until Xmas 2019):

https://fex.net/s/zbp8cde

both download and streaming available.



For the long test clip, I applied mild noise reduction, sharpening and halo removal, plus the Aliens grainplate.

Alignment is 99% perfect, with two or three instances in open matte and others in the widescreen, all easily solvable.

Feedbacks are needed!



EDIT: color grading comparison - top BD, bottom HDTV (UAR will be mostly open matte, with few shots in widescreen)

[Image: Titanic-BD.jpg]

[Image: Titanic-HDTV.jpg]

http://www.framecompare.com/image-compar...n/D6LGLNNX

Print this item