Armand1

joined 3 years ago
[–] Armand1@lemmy.world 50 points 2 days ago (9 children)

I can kind of relate. There are a lot of parts of coding I find a little boring.

  • Once the interesting problem is solved and all you need to do is follow through
  • Large scale refactorings in ways too complicated for an IDE.
  • Fixing annoying dependency / migration issues

When you use an expensive AI agent, like Claude, it can nowadays handle these tasks competently, to the point where I only need to correct small things here and there.

When you give these tasks to an AI agent, it feels a bit like delegating to a junior, but without the guilt of giving someone a menial or boring task. That allows me to work on stuff I find more interesting. To me, THAT'S why it's adictive.

However, this isn't without cost. First, there's the societal costs: Environmental, centralization of power, contribution to hardware shortages and a bubble

Second, there are more personal costs. You'll come to rely more and more on these tools, and your skills will rust. You may end up avoiding learning things about a codebase because you delegate it away.

It's a tempting tool. One which in my experience can genuinely help, but is easy to misuse.

[–] Armand1@lemmy.world 3 points 4 days ago* (last edited 4 days ago)

I guess my point is for the problems it causes its probably not worth doing, balancing the two?

Making websites that no one needs to visit but poison or trap AI scrappers would likely be a better way to fight back.

[–] Armand1@lemmy.world 185 points 4 days ago (80 children)

TLDR; It fucks up accessibility for blind people (amongst others).

Its also pretty futile imo. AI is reading billions of words from books and posts. A handful of users obfuscating their posts is not going to do anything.

[–] Armand1@lemmy.world 2 points 4 days ago (1 children)

What's that bottom panel crossed shape one?

[–] Armand1@lemmy.world 17 points 1 week ago (2 children)

I love having to use 4 words to describe the number 99 (cope)

[–] Armand1@lemmy.world 12 points 2 weeks ago* (last edited 2 weeks ago) (3 children)

So if I remember correctly, what happens with auto mode is they run a second smaller LLM called the "classifier" to evaluate the tool uses of the main one.

I've used auto mode at work now for many months, and it approves most things because most things Claude does are reasonable.

Once or twice I have seen it reject Claude. I can't remember the exact scenario, but I had asked Claude to diagnose an issue but not fix it yet, and when later on it tried to make the change the classifier rejected it, giving the reason that what it was trying to do did not match my request.

In my opinion, the trick to using auto mode safely here is to:

  • Commit and push your changes before handing over the reins (it rarely commits or pushes without you telling it to, especially if you have never asked in that session).
  • Don't give it access to things it shouldn't have access to or that can do significant damage
  • Don't give ambiguous prompts.
  • Never use LLMs against untrusted code or files, as it may contain prompt injections.
[–] Armand1@lemmy.world 7 points 2 weeks ago

Emphasis, most likely

[–] Armand1@lemmy.world 7 points 2 weeks ago (1 children)

Having run models locally, RAM use seems to be almost directly proportional to number of parameters. 8 Billion parameters requires approx 8GB of VRAM at 1/4 precision.

Therefore, if this pattern holds you somehow need 10 Terabytes of VRAM at 4K and 40 Terabytes at full precision.

I think I saw some estimates that Claude's Opus models may be and Opus model equivalents may be at around 100B parameters (100-400GB VRAM).

TLDR its clear why RAM is so expensive.

[–] Armand1@lemmy.world 3 points 2 weeks ago

Thanks. That's very helpful.

[–] Armand1@lemmy.world -5 points 2 weeks ago (3 children)

Why is it supposedly illegal to do this? Being American is not a protected characteristic, no?

[–] Armand1@lemmy.world 10 points 3 weeks ago

They do. I have had their M6 mouse for a few years.

It's fairly good but after some time the side-ways scroll wheel failed for me. It also doesn't track as well on some surfaces as my previous Logitech, but otherwise it's good.

1
submitted 2 months ago* (last edited 2 months ago) by Armand1@lemmy.world to c/technology@lemmy.world
 

I wanted to document an experiment I undertook trying out AV1 with Grain Synthesis on particularly grainy footage. I'll go over my thoughts and explore Plex compatibility with this feature.

This is going to be another one of my rare highly-detailed technical posts, so feel free to skip to the conclusion if you'd like.

What kicked this off?

I've been ripping Blu-rays and transcoding them for my Plex server for about 7 years now. In that time I have tweaked my settings a little, but I've broadly settled on h265 as my codec of choice. This is because it is effective at preserving fine details and film grain while still giving you a pretty good compression ratio.

Here's my typical configuration:

  • Use handbrake as my encoding application (what can I say, I like GUIs)
  • Use the x265 (CPU h265) encoder. Why not use NVENC? It's efficiency and detail preservation sucks for HQ movies.
  • Play with the quality (RF) slider and do previews until I am happy I see no artifacting.
  • Typically results in 8-12Mbps video.
  • Typically that means low grain movies are 16-18 RF, very grainy movies at up to 22 RF.

If you know anything about film grain, it's that it is absolutely hell on compression algorithms. It's very hard to compress grainy footage without making it look bad. Sometimes, you come across a piece of media that is especially difficult, and that's how I found myself exploring grain synthesis this time.

What piece of media happened to kick this off? Columbo Season 9 Episode 2. No spoilers, I haven't sat down to watch it yet.

Why this in particular? I was making my way through encoding my collection of Columbo Blu-rays and noticed that Season 9 in particular was incredibly grainy. Combine that with the slight sharpening filter I tend to add to my encodes (like a bit of salt, to taste) and the final size of my encodes, instead of being around 30-50% of the original size on disc it was almost 90% at around 20Mbps!

So I set out to try this grain synthesis I had heard about.

What is Grain Synthesis?

Grain Synthesis is a novel approach introduced with the AV1 video codec, but which has only really started seeing limited use in the last few years. See this blog post by Netflix for a great explainer.

The TLDR; is that Grain Synthesis is where you:

  • Analyze the characteristics of film grain in a particular piece of media
  • Denoise the video
  • Add the film grain characteristics as metadata in the video file / stream
  • When the end user plays back the video, the grain is reapplied as a filter on top of the video

Why do this? To save bandwidth and storage space.

The theory is that by denoising, you make the video easier to compress, while still being able to evoke the feel of film grain convincingly.

Does this work in practice? Read on to find out. (Yes, saying that did make me cringe).

The experiment

The experiment was simple. Target my usual 8-10mbps with AV1 grain synthesis and see how that compares to just crushing the quality down with x265.

Application and encoder choice

After a bit of research, I decided to opt for StaxRip as the application to do my encoding. It supports a lot of AV1 encoders, including:

  • rav1e - a Rust-based community-written encoder
  • AOMEnc - The reference encoder.
  • SVT-AV1 - Intel / Netflix's open source encoder (and it's variants).

Which encoder to use?

Well, when I tried AOMEnc and found it SUPER slow. I encode on a 12 core, 24 thread Ryzen CPU, and got 4fps. There are likely ways to get it to run faster, but I didn't play around too much. rav1e does not seem to support Grain Synthesis right now.

So really that left SVT-AV1. That's the one Handbrake includes, but in the past I found the vanilla SVT-AV1 found on there to give me really blotchy results in dark scenes, so I picked SVT-AV1-PSYEX.

Key settings

While it is technically possible to assemble the grain analysis, denoising and synthesis yourself, the easiest way to use it is actually to use the following two parameters:

--enable-dnl-denoising=1

This turns on denoising. Without this I think grain synthesis is simply added on top of your existing video.

--film-grain=<some integer value>

This sets the strength of the film grain added and, with enable-dnl-denoising=1, the strength of the denoising. Online, people recommend using values of 8-14 depending on the amount of grain.

How I dialled in the settings

I found that the best way to dial-in AV1 grain synthesis was to start with a very high quality setting, then gradually increase the noise reduction through the --film-grain value until I got most of the grain off. I could see this by using a video player that doesn't support / has grain synthesis turned off (more on this in Compatibility).

I would however avoid going too far with the noise reduction strength. No need to remove all the grain. Pushing it too far results in the video into a smeary mess. After all, no denoising algorithm is perfect, and the more you crank it, the more you lose real detail.

Then, once I was happy with the clarity, I'd dial down the quality until I either hit my size target or my acceptable lowest quality.

As for the h265 encode, I apply a Light sharpening filter in Handbrake, then reduce the quality until I hit my target.

Note here that the process with h265 has less levers to pull, so it takes less time to dial it in.

Results

See for yourself! Here's a MEGA link to the final encodes . I make no promise that I will keep that link up long-term, but I will personally hold onto the files so if the link dies in the future, try DMing me and hopefully I'll see it and send them to you.

There are 3 files:

  • no denoise.mkv - a file encoded with no grain synthesis and very high quality setting to act as a baseline
  • AV1 q25 denoise38.mkv - The grain synthesis file. Quality of 25 with film grain setting of 38.
  • x265 crf22.5.mkv - The h265 file. Used a crf of 22.5. Picked to match the AV1 file size.

I highly recommend using a tool like video-compare to play them side by side. Grain behaviour is not easily comparable in screenshots and should be compared in motion. The command you want is:

video-compare "AV1 q25 denoise38.mkv" "x265 crf22.5.mkv"

Analysis

I call this section "Analysis", but it's quite subjective.

Grain

To me the AV1 file has cleaner grain. It's fairly convincing in motion, if a bit more regular than is realistic. Reminds me a little of some modern shows that probably have added grain in post-production.

By comparison, the h265 version has made the grain is kind of start-stop and affected by motion in the scene. It has necessarily been compressed and looks worst for it. It's not that bad though.

Quality retention

The better quality retention goes to h265 here. When you look at the details around the eyebrows of the male character here, there is perceivably a little more detail preserved. Good looking grain can give an increased perception of sharpness, which makes up some of the ground on the AV1 side.

Compatibility

Here's a very important point we've only touched on so far: What devices actually support AV1 and grain synthesis, and if they don't support it, what happens?

Well, the answer is that when AV1 is supported, but grain synthesis is not (or it's otherwise broken), the grain synthesis tends to just gets ignored and you play the weirdly smooth, denoised video instead.

Desktop players

Well, I hit my first roadblock directly after my first test encode. I use mpvnet as my player of choice. Turns out grain synthesis is broken for me with the default configuration. After like an hour of debugging, I found that I could fix it by adding vo=gpu instead of the default vo=gpu-next in my config file. This may or may not mean that the grain filter is rendered by the CPU instead of the GPU, affecting performance.

VLC worked out of the box for me. Not sure if that was because it was using CPU grain rendering or if it was because their drivers were less broken.

Neither play has a clear option to turn on or off grain synthesis. In theory, you could configure mpv with format:film-grain=no, but that didn't seem to work for me. It's possible that option only works when GPU grain rendering is in use.

For reference, I use a 3000-series Nvidia GPU. I expect GPU rendering support may depend on what GPU you have. Perhaps it works better with more recent GPUs.

Plex

I placed the AV1 file from the experiment on my fully updated Plex server, and tried to play back the episode from a variety of different devices.

  • Desktop app - AV1 and grain synthesis both worked
  • Mobile app (Pixel 9 Pro) - AV1 and grain synthesis both worked
  • Firefox - AV1 not supported. Transcoded to h264.
  • Chrome - AV1 not supported. Transcoded to h264.
  • Chromecast (1st-gen) - AV1 not supported. Transcoded to h264.

When transcoding occurred, the grain-synthesis would be ignored. Meaning that you'd get a transcode of the post-denoise video into h264. No / little grain (depending on how strongly you denoised).

This is somewhat worse than transcoding h265 into h264 for compatibility reasons, but at a high bitrate where the grain is still present. That said, on-the-fly transcoding rarely results in a particularly good looking outcome.

Conclusion

Both encodes turned out very watchable on compatible devices. There was no clear winner over h265 but AV1 + grain synthesis looks decent when it works.

That said, if you or others watch your video on unsupported devices, like on the browser or on your smart tv / chromecast, you may want to opt for h265 instead. At least if that has to be transcoded, you will maintain your grain in the process.

Additionally, the effort you go through tuning AV1 encodes is somewhat higher than just chucking it through a h265 or h264 encoder. In my experience, without grain synthesis AV1 does less well with grainy content than h265 does. Not too surprising given that AV1 is primarily a web standard while h265 comes from a more disc media background.

2
submitted 2 years ago* (last edited 2 years ago) by Armand1@lemmy.world to c/technology@lemmy.world
 

Background

I have had the same Kingston DataTraveller DTSE9 since around 2010, when I was still in school. I've carried it on my keychain for at least 12 years and it still works, its "the old reliable".

That said, it's slow. Very slow. I use it mostly as a boot USB for Linux / Windows, so I need several sticks with decent random read speed, and decent write speed for when I update them.

My criteria were:

  • All-metal construction for durability, including the keychain loop
  • Sits well on a keychain next to keys
  • Reasonable speed, including random reads.

Testing method

I evaluated the sticks in two ways.

I ran CrystalDiskMark with 256 MiB (x5) configuration.

I also measured the angle at which the USB stick sits on a keyring. I found that several of them could not sit perpendicular to a keyring it because of their geometry, which makes it difficult to comfortably use them next to keys.

At the datum of 0 degrees, the key sits perpendicular to the keyring.

Results

The competitors

Here are the 6 main competitors in this space I bought.

All transfer units are in MB/s.

Product Price (£) Angle on keyring (0deg is best) Sequential reads Q8T1 Sequential reads Q1T1 Random reads Q32T1 Random reads Q1T1 Sequential writes Q8T1 Sequential writes Q1T1 Random writes Q32T1 Random writes Q1T1
Corsair GTX 128GB 65 (256GB version) 0 470.214 429.330 157.436 19.390 436.990 414.201 166.829 38.937
Samsung Bar 64GB 10 55 305.424 305.268 14.517 13.428 36.434 36.247 20.537 21.619
Kingston DTSE9G3 64GB 11 0 246.705 244.496 13.756 13.028 100.236 110.054 0.484 0.474
Integral Arc 3 10 0 162.336 161.338 15.567 11.188 49.457 47.965 5.032 4.244
Kingston DataTraveller Micro 64GB 11 0 247.000 245.247 13.788 12.961 100.932 101.292 0.496 0.470
Sandisk Ultra Luxe 64GB 12 25 403.863 399.974 12.438 12.054 91.835 91.685 4.272 4.258

Some additional notes:

  • The Samsung Bar had really sharp corners. You might need to file them down like I did.
  • Corsair GTX: the 128GB version is no longer available and the lowest capacity is 256GB. It's more of a portable SSD in the form of a USB stick, which makes it really fast, but it's bulkier than a normal USB stick, though not by much. Often it takes up more than one USB port because it's wide. It's still very good and I recommend it.

Other devices

Some related products I own but don't qualify for this comparison but are offered up here for context.

Here's why they don't qualify.

  • Crucial P3 Plus: It's an NVME SSD. Can be made portable with a good enclosure, but too bulky for what I'm looking for.

  • Samsung 860 Evo: It's a SATA SSD, definitely not the right form factor.

  • Sandisk Ultra Curve: I bought this thinking it was made out of metal, but it was not. It's fairly flimsy plastic.

  • Kingston DTSE9 16GB: This is my old stick. The old reliable. No longer sold, but I've tested its successor.

  • Samsung SD Card: It's a 2016 MicroSD card connected to my PC via a MicroSD-SD adapter and a USB card reader. I included this as a meme.

Product Sequential reads Q8T1 Sequential reads Q1T1 Random reads Q32T1 Random reads Q1T1 Sequential writes Q8T1 Sequential writes Q1T1 Random writes Q32T1 Random writes Q1T1
Crucial P3 Plus M.2 NVME 2TB 1598.227 1332.131 305.220 46.643 1560.989 1452.256 238.134 102.502
Samsung 860 Evo SATA 1TB 564.446 539.913 272.631 43.322 536.440 518.168 238.752 101.313
Sandisk Ultra Curve 160.091 158.859 9.271 9.043 58.680 60.377 2.902 3.209
Old Kingston DTSE9 16GB 18.452 18.220 8.473 8.096 13.626 13.629 0.115 0.026
Samsung Memory Pro Plus Micro SD Card 20.765 20.969 5.146 5.102 19.493 20.316 2.181 3.421

Conclusion

There are no clear winners in this fight.

  • The Corsair GTX is the fastest in all categories by a country mile, but has a larger form-factor than other entries and higher price. Very good, but not for everyone.
  • Samsung Bar has the fastest random writes, and decent performance in other metrics for its USB stick form factor, but sits awful on a keychain due to the angled hole.
  • The Integral Arc 3 has solid random performance, but worst sequential performance than the rest.
  • Sandisk Ultra Luxe gets the best overall balance of performance, but does not sit on the keychain super well.
  • The two Kingston's perform effectively the same, with the Micro being much more compact. That said, that can be a disadvantage on a keyring if there are adjacent items.
  • All competitors (bar the GTX) had similar random reads.

For me, I'd say the right choice is either the Kingston DTSE9G3. It's a nice upgrade over my old DTSE9 and sits nicely next to it's grandfather. If I needed any random writes though, for copying lots of small documents like code files, I'd pick the Integral Arc 3.

view more: next ›