My 2004 Toyota Yaris with automatic transmission makes a ratteling noise at a very specific RPM range as can be heard in this video I made with my phone: https://www.youtube.com/watch?v=Q_s-Jx7_MYk
I'm not sure when exactly, but it seems to happen in 2nd and 3rd gear at around 3500 - 4000 RPM. I've also heard this noise when driving uphill in a parking garage in 1st gear. It doesn't make the noise when the car is in neutral, in park or when reversing. My best guess is that the noise is caused by a worn-out bearing inside the gearbox.
What causes this noise? And is it worth fixing considering the risk of not fixing it and the value of my car which is about €800,-