At first glance this doesn't really appear to be a programming question...but you hint that you may be looking for open-source code for a video codec.
However I thought I might shed a bit of light on the iPhone itself.
If you're recording at 320p, that averages out to about 15mb per minute. Calculating 8 hours, equals 7.2GB.
To my knowledge, there is no time limit, just the limit of your iPhone empty HD space. However, some people have reported that the video recording stops sometimes, seemingly randomly, during very long recordings.