Naval officers' dressiest uniforms were much the same in those days, a bit like JRs' now. The hat looks Austro-Hungarian but the name suggests not. There is another script on the mounting; a full photoshop program may help you to isolate and sharpen the detail.
Certainly looks Victorian.
The Victorians loved having their photographs taken and many of the photographers supplied fancy clothing for the occasion.
Could it be that it's just a photograph of an early Walt:flower:
If that sword's actually slightly curved, and it's not just a dodgy angle, then that also points to USN. Always worth bearing in mind (although this phot isn't RN), that non seaman officers didn't have the *executive* curl until the very late 19th century in Britain either. If it wasn't for the fact that he's not RN, he actually could be on that basis, if you see what I mean.
So, best guess is the USN. HST, one that worries me is the cockade on the bicorn, avec cockade, which is very French. The shape of the bicorn is actually that of the Imperial Russian Navy. I really must get out more.
So it's either an officer of the USN, or a bloke wearing the contents of a dressing up box....
Although the Yanks have visible white shirts at the top of their jackets, which this bloke doesn't. They also (unlike the US army of the time) don't have the fore and aft crossbar over the epaulettes. This slowly pushes back towards French influence, which is right for the USN, but I can't find a late 19th century French captain in full dress to compare.