Just like you wouldn't use PNG for photography, I don't think you'd use a lossless video codec for real-world footage.
Lossless video would make much more sense for digital content like screen recordings, where the assumption that few pixels change between consecutive frames makes much more sense.
Lossless formats (specifically DPX & EXR sequences, usually with ZIP compression) are used frequently for real world footage in post-production workflows! Granted, most consumers don't run into this stuff. Photographers don't use PNG because it doesn't offer anything for them that camera raw or EXR files don't already cover.
As far as video types go maybe it would work well for animation since that tends to compress well for the same reason a screen recording does.
Sure you do. E.g. ffv1 and huffyuv are used for archiving video losslessly.
HEVC/H.265 and VP9 can both also operate in lossless mode. In my testing they achieve compression ratios that ffv1 and huffyuv cannot come close to touching (not all that surprising given how old ffv1 and huffyuv are).
Ffv1 is much easier to work with compared to HEVC and VP9 though, probably thanks to it's deep integration with ffmpeg. By comparison, working with HEVC was hell on earth!
I spent like a week figuring out how to stuff JPEG sequences into HEVC files without losing colorspace and color profile information. Even JPEGs alone were horrible to work with, my understanding is they encode image data in the YUV444P colorspace, but every program works with them in the RGB colorspace. The conversion between YUV444P <-> RGB is lossy and every program does the conversion slightly differently. So if I ever accidentally triggered this conversion at any point, my archival was no longer bit-perfect.
And then to check your results, you obviously can't convert back to JPEGs, I think I ended up encoding to TIFF after having failed with JXL.
Code here if anybody else wants to try replicating it (good luck, you'll need it): https://gist.github.com/null-dev/ebd2f8b23c3e5066a48976c7308...
Converting lossy JPEGs to lossless HEVC might seem wasteful, but the space saved by intra-frame compression dwarfs the space saved by lossy encoding.
Losssy compression is standard on high end cinema cameras.
In most cases the compression ratio will be low enough that the video will be perceptually lossless.