We won't mince words: It hasn't been a good 18 months to invest in the action camera market. Since August 2015, shares of GoPro (GPRO -0.57%) and the company that provides the hardware its cameras run on -- Ambarella (AMBA -2.79%) -- have been in an absolute free-fall.

AMBA Chart

AMBA data by YCharts.

With such a swift and steady fall, you might think both of these companies would make for compelling buys. But if forced to choose, which is the better buy today?

We can't answer that question with 100% certainty, but we can look at the question through three different lenses to get a better idea for what we're buying.

Sustainable competitive advantages

If I had a time machine, I'd go back to my 2008 self and say, "Self, don't waste so much time looking at the numbers. Figure out how strong the sustainable competitive advantage is, and let that be your guidepost."

Often referred to as a "moat," nothing has proven more important than a company's sustainable competitive advantage. At its core, it's what makes a company special, unique, and likely to keep customers coming back for more year after year -- and decade after decade.

GoPro's moat relies almost entirely on the strength of its brand. It was the first mover in the action-camera market, and that gave it market share and a huge head start on the competition. If the past year-plus is any indication, though, that lead has all but evaporated. The company's results have continually disappointed.

Action camera mounted to a car's front window.

Image source: Getty Images.

More alarming: Attempts at creating a moat by diversifying have fallen by the wayside. GoPro wanted to become a "storytelling" company, with cameras being one part of an ecosystem that included content creation. But it shut down its entertainment division in November, ceding that it just wasn't going to happen.

Lest you think that means Ambarella's in better shape, I think this company, too, is in serious trouble. While the technology Ambarella makes is important, there's very little to stop it from becoming commoditized over the long run.

Sales to the company's top five equipment and design manufacturers account for an astounding 56% of annual revenue. Should any one of these five switch providers, it would be a significant blow for shareholders.

Both of these companies have very weak moats.

Winner = Tie (and not in a good way)

Financial fortitude

Given that both of these companies have weak moats, the one with greater financial fortitude is more likely to stick around long enough to build a moat it can grow from. Here's how the two stack up in that department.

Company

Cash

Debt

Net Income

Free Cash Flow

GoPro

$218 million

$45 million

($419 million)

($152 million)

Ambarella

$372 million

$0

$45 million

$108 million

Data source: Yahoo! Finance, SEC filings.

The winner here is pretty easy to determine: Ambarella. GoPro is lucky that it was sitting on a hefty pile of cash just after going public, or it likely wouldn't be alive today. Moving forward, though, Ambarella is in a much healthier position; it's actually bringing money in.

Winner = Ambarella

Valuation

Finally, we have valuation. While this isn't an exact science, there are some straightforward metrics we can consult to give us an idea of how expensive each stock is.

Company

P/E

P/FCF

PEG Ratio

GoPro

N/A

N/A

1.8

Ambarella

20

16

1.1

Data source: Yahoo! Finance, E*Trade. P/E represents figures from non-GAAP earnings.

Here again we have a pretty clear winner. While we can't make apples-to-apples comparisons since GoPro hasn't turned a profit over the past year, the PEG ratio -- which takes potential for growth into consideration, shows a big difference. Ambarella is trading at an almost 40% discount on this metric.

Winner = Ambarella

And your winner is...Ambarella

Before going out and blindly buying shares of Ambarella, let me repeat again: I'm not terribly confident in the moat of either of these companies. If forced to choose, Ambarella would be the runaway winner between these two. But you have more than just two choices when it comes to your own investments, and I think there are better places for your hard-earned cash.