Blast damage from an atomic bomb takes place at lower overpressures than you might think - I used to have a US government technical manual about the effects, the overpressure of the blast wave was on the order of 10s of PSI. To completely destroy heavily reinforced concrete bunkers it took something around 100psi. According to this Wiki article:
You get severe destruction in an urban environment at ~20psi. This isn’t because the materials themselves fail at that load (concrete has a compressive strength measured in thousands of psi, for example) but because the total load on a surface (psi * surface area) is so large that it can fail the joints, tip a wall over, lift a roof, etc.
A small camera on the other hand can take a high absolute load (total pounds of force) without being crushed - it’s smaller and isn’t as likely to have the “walls” blown off.
I also recall hearing that for the Trinity test the (very large) camera was buried and filmed the blast through a periscope, that might have been the case on your ship footage as well, stick the camera in a strong box and film through a mirror so you don’t get much direct blast damage.
If you’re outside of the fireball I think that the heat would be mostly radiant heat, so being inside a ship shields a lot of that. Radiation could fog the film but a good lead box would help there.
The important thing to note is that the bulkheads buckled like toilet paper instead of boiling away. I think the specific video you’re talking about came from a camera on a decomissioned submarine, where the scientists were testing to see how reliably they could use just the pressure wave of an underwater nuclear detonation to wreck subs. As the video shows, the answer was: pretty damn reliably.
My guess is that the camera never survived any of the tests on any of the ships, while the film was heavily shielded in a black box that would allow it to be found afterwards.
The cameras usually weren’t anything special. Usually, the camera was placed in some safe place (behind a small hill for example) with a periscope of some sort attached to the camera. The blast may completely destroy the top of the periscope, but then all you do is dig down through the dirt, retrieve your completely undamaged camera, and develop the film.
Same thing in a battleship. You just encase the camera in a huge block of concrete or steel, and make sure that the hole in the block (for the camera to look out through) doesn’t face the blast. You still might need a big chunk of glass in the hole to protect the camera from the shock wave but it’s still easily constructed. It might take you a while to dig through the rubble and find the camera, but it will be intact when you are done.
Pick yourself up a copy of Trinity and Beyond: The Atomic Bomb Movie, which is chock full of that stuff. Some of the shots, however, are “creations” (in the director’s commentary, he explains how he used morphing to combine still photos to give you an idea of what classified film footage a blast looks like). The Chinese nuke test pretty much had me crapping in my pants when I saw it the first time.