“The Hobbit” has some flaws. There are a lot of flashbacks, some of which serve no real purpose, and there is a lot of silent glowering, all of which serves no real purpose. The 48-frames-per-second projection is a stunning step forward in technology, but it occasionally does a weird stutter-step thing I can’t quite figure out. Martin Freeman, as Bilbo, doesn’t have enough to do, and the whole film sometimes seems to exist solely to set up the next two.

But. Oh, there’s a but. What’s good about “The Hobbit” is so good that it makes any nitpicks extra-picky. I cried twice. I forgot to breathe multiple times, most noticeably for the first 10 minutes, when the picture on the screen was so lifelike it looked, well, alive. Even though the film is a bladder-busting two hours and 45 minutes, I didn’t get up to go to the bathroom (those who know me know this is an amazing feat). I spent every battle scene with my sweaty hands clutching each other. And the scene where Bilbo meets Gollum (Andy Serkis) is a spot of pure brightness. It calls so much attention to Serkis’ motion-captured strengths that it’s almost distracting, but I guess director Peter Jackson is pushing to get Serkis that Oscar nomination he deserves.

There are weaknesses in “The Hobbit,” but there are moments of magic, the kind of enchantment you feel to the tips of your toes. And those make the ride utterly worthwhile.