but I guess the difference should be only visible on printers and ultra HD monitors.
72ppi is the optimal value which works great for pixel density of average computer monitors. I don't have ultra HD monitor so can't tell the difference, but if someone does I'd like to hear that, just render some image in 4K resolution with anti anti-aliasing and save them in BMP and PNG format for comparison.
Well once again the DPI of an image doesn't matter when your viewing those images on a computer (because you can scale them up or down in real-time). You could set the dpi on the image to be 23408329084 if you wanted to and it would look the same on your computer as long as the output resolution is the same.
Also DPI was term coined for printing, and PPI was a term coined for computer monitors. Both values work pretty much the same but they both refer to something slightly different.
As for the codec I was using. I used Nvidia's hardware encoder/decoder with their hvenc codec through the terrible mp4 container format at 4k 60fps with the quality ratio set to a 100.
Doing the math
3810x2160 at 8 bits per channel at 3 colour channels (which is 24 bits for all channels)
24 x 3810 x 2160 = 197510400 bits per image
197510400 / 8 (convert to bytes)
24688800 / 1000 (convert to kilobytes)
24688.8 / 1000 (convert to mega bytes)
= 24.6888 mega bytes
Now we have 60 of these for each second and we have 60 seconds in a minute so...
60 * 60 = 3600
Multiply how many frames we have by how much each frame is...
24.6888 * 3600 = 88879.68 megabytes
88879.68 / 1024 (converting to gigabytes)
= 86.7965625 Gigabytes
Now of course that would be purely lossless and the Nvenc codec was using a variable bit rate with pbuffers and more so if nothing changed in the image in any part it wouldn't have the need to update it so it wouldn't store data for it. On top of that it still was slightly compressing it as a whole. So a 10 gig file over a 86 gig one is still pretty good.
The only codec I've seen come close to quality and space was with the xvid codec where with the same settings I could make that a 2 gig file (but its really process intensive where as Nvenc isn't nearly as intensive).
Trust me, when you are dealing with high quality video expect to deal with the file size that comes with it. I mean if you think about it most bluray movies are about 40 gigs in size and that's at only 1080 at 30 frames a second.