They are all decoded in H.264, and it also depends on what the stream is by default.
This kind of decoding stream if 3M, every hour is about 1350M, 4G that is 4000M, you can record 4000/1350 = 3 hours.
If it's a 2M stream, it's about 900M per hour, and you can record 4000/1350=3 hours.