I'd say 3rd and 4th, for sure. I know it's the minority opinion, but I also favor Nintendo in the 5th generation as well. I've just never felt that strongly about the PS1 lineup. I know the PS1 had a larger and deeper library overall, but I feel the N64 was still much, much stronger at the top and that matters a lot. It was the last generation where I felt like Nintendo 1st party games were still head and shoulders above the competition.
The 6th generation, I'm a bit torn on because Metroid Prime, REmake and RE4 are my favorite games of that generation and there's quite a bit of a gap after that. But there were also quite a few disappointing games that Nintendo rushed out there, such as Sunshine, Wind Waker and Double Dash. Ultimately, putting aside personal preference and slipping on my 'objective cap', I just can't give the GameCube the nod over the PS2. The PS2 has arguably the deepest library of quality games on record, and in terms of third-party support it blew everything else out of the water. I'd put the GameCube solidly ahead of the original Xbox, though.
Since then, Nintendo has lagged so far behind when it comes to third-party support, and their first-party lineup hasn't been as "can't miss" as it once was. They've still put out a number of amazing games on the Wii, Wii U and Switch, but they've come along with huge software droughts and some serious misfires stemming from overuse/misuse of motion and/or touch controls. At the same time, the quality of Sony's first-party lineup has only gotten better and better, closing the gap with Nintendo (if not passing them altogether). There have also been many more "GOTY"-caliber multi-platform games released over the past 10-15 years that didn't come to Nintendo platforms, or only got ported over several years after the fact. Starting with the Wii, Nintendo has been my clear secondary console. That doesn't mean I don't still like a lot of the stuff they've put out on those systems, but they're not in the same league as the PS3 and PS4.