Armand1

joined 1 year ago
[–] [email protected] 1 points 1 month ago

I've been on that platform since 2014. It's a mix of an anime tracker and a Facebook-like social media site. Used to be called Hummingbird.

It's alright, if a bit dated.

1
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/[email protected]
 

This is a short how-to on how to set custom values for LapSharp sharpening in Handbrake.

Not sure if this is the right place to post this. I would have historically posted it to a dedicated sub-reddit on Reddit, but I can't stand the owners of that website nowadays.

This is all original work, but I may myself repost this as a blog post at some point to try to improve reach if this gets burried.

Why?

I like Handbrake's LapSharp sharpening, but I found I wanted something in between the Stronger and Very Strong presets, which have a big jump between them, for a movie I was encoding. Therefore, I was trying to find out how to use the "Custom" value in the drop-down to get something in between the two.

I am not an expert in video encoding nor a command line wizard, so I prefer to use Handbrake over FFMPEG for most encoding tasks.

Finding out how

A general search around the internet, a skim through the documentation and questions to the prominent AI tools of today gave me no (or incorrect) answers on how to set these values.

It was only with some extra digging through the handbrake forums that I found people posting their logs for an unrelated problems that I noticed that Handbrake logs the following when you encode with LapSharp:

[09:01:35]  * video track
[09:01:35]    + decoder: h264 8-bit (yuv420p)
[09:01:35]    + filters
[09:01:35]      + Framerate Shaper (mode=0)
[09:01:35]        + frame rate: same as source (around 23.976 fps)
[09:01:35]      + Crop and Scale (width=1920:height=1040:crop-top=20:crop-bottom=20:crop-left=0:crop-right=0)
[09:01:35]        + source: 1920 * 1080, crop (20/20/0/0): 1920 * 1040, scale: 1920 * 1040
[09:01:35]      + Sharpen (lapsharp) (y-strength=1.1:y-kernel=isolog:cb-strength=0.55:cb-kernel=isolog)

Sure enough, pasting this string into the Custom textbox when the Custom preset is selected gave me equivalent results to the Very Strong preset.

Looking through the source code of Handbrake, I found the function that converts presets to values. It's written in C, which is not my forte, but we can see a bunch of if statements that pick values based on the Preset (Ultra-light, Light, Medium etc.) and the Tune (None, Film, Grain etc.). Comparing with my log, we can determine that In the code strength[0] is y-strength and strength[1] is cb-strength. Kernel is picked purely based on Tune value, and seems to always match between y-kernal and cb-kernal.

else if (!strcasecmp(preset, "stronger"))
{
    strength[0] = 0.5;  strength[1] = 0.25;
}
else if (!strcasecmp(preset, "verystrong"))
{
    strength[0] = 1.1;  strength[1] = 0.55;
}

Here's a chart of values for Grain Tune:

Chart of parameter values at different presets

Ok, but how do I use it?

If you want to go between Presets values, simply interpolate (pick values between) two presets. For example, with Grain Tune, We can see from the code that

Stronger is y-strength=0.5:y-kernel=isolog:cb-strength=0.25:cb-kernel=isolog

Very strong is y-strength=1.1:y-kernel=isolog:cb-strength=0.55:cb-kernel=isolog

So, the mid-point between the two is y-strength=0.8:y-kernel=isolog:cb-strength=0.4:cb-kernel=isolog

Then, simply copy-paste this into your Custom textbox:

Value pasted into Custom textbox in Handbrake UI

Conclusion

The approach above seems to work for me in the few cases where I need a bit more control than the presets afford. I recommend playing around a bit with the values yourselves and letting me know how you get on!

[–] [email protected] 3 points 1 month ago (1 children)

Who is Brandon?

[–] [email protected] 47 points 2 months ago (9 children)

Co-op video games say that's the max number of friends you can have, so it must be true.

[–] [email protected] 1 points 3 months ago

Turns out I did not... remember the time™️.

[–] [email protected] 2 points 3 months ago (2 children)

Cue a dance number of Thriller but it happens in a pyramid with mummies.

[–] [email protected] 5 points 3 months ago (4 children)

Of course, but OOP is typically about putting methods on classes, inheritance of behaviour etc.

JS Objects aren't typically used that way, they tend to be used as pure data containers. At least, that's how we mostly use them.

Occasionally, we'll use objects to simplify passing multiple arguments including arrow functions, but I'd say that doesn't really count unless the arrow function mutates the object it's a part of.

[–] [email protected] 11 points 3 months ago* (last edited 3 months ago) (6 children)

I've worked on projects with 10 000+ lines of typescript and maybe 3 classes total.

[–] [email protected] 3 points 5 months ago

I'd been using Geometric Weather for many years, and I noticed a few weeks ago that it was misbehaving, not fetching data sometimes. I didn't realise it had not had an update for almost 3 years!

I had switched to Google's weather app, but maybe I'll switch to this instead. Thanks for the heads-up.

[–] [email protected] 0 points 7 months ago* (last edited 7 months ago) (1 children)

I'll get back to you on that, but just to be clear transphobia on a medical level is more about gaslighting trans people and / or denying them the treatment they need.

The doctor in question could also campaign against allowing trans rights, spread misinformation or personally deny them a referral to get the treatment they need.

Wait times for trans-specific procedures can be astronomical compared to other procedures in the same country. Think years in wait time.

I don't think most trans people complain about doctors mentioning what genitals or conditions they may have in 1-1 conversations.

All of that said, I am not trans myself, so I'm not the right person to ask. It's best to ask trans people themselves about their experiences in the healthcare industry, but they have unique challenges.

[–] [email protected] 0 points 7 months ago (3 children)

I thought it was fairly clear, but I'll elaborate.

If a trans person is discriminated against by their doctor, then having a mechanism to warn other trans people away from that doctor so they don't waste their time or go through unpleasant experiences would be useful.

Same can be said of therapists etc.

To be honest we should probably have a way of publicly rating medical professionals in general, regardless of whether you are trans or not, but trans people probably need it more than the average person.

[–] [email protected] 1 points 7 months ago (5 children)

So much negativity in these comments.

Having read the guidelines, I think they're pretty reasonable.

I'm sure it's not perfect, but this could help people. A trans relative of mine has been mistreated by specific doctors, and being able to signal to others to stay away from these person could really help others.

Right now, the worst that can happen is that someone is wrongly flagged and a small minority of people dislike them, but the good it can do is greater.

view more: next ›