This is the OMFG I got it to work 😀
10 FOREIGN TakeVideo(512)
RUN
The limit to record up to 9:42 in 720p still applies to my camera. If I use TakeVideo(1000) it will switch the recording to 640p. I have attempted the following; it looks like it executes the commands directly, where the last command seems to actually finish completely. But the first commands result in small files. I have also noticed that it switches back to 640p for some reason, while it doesn't do so with a single TakeVideo(512).
10 FOREIGN TakeVideo(100)
20 FOREIGN TakeVideo(100)
30 FOREIGN TakeVideo(100)
40 FOREIGN TakeVideo(100)
RUN
So it is quite easy to over come this issue:
10 FOREIGN TakeVideo(10)
15 SYSTEM delay_us(10000000)
20 FOREIGN TakeVideo(10)
25 SYSTEM delay_us(10000000)
30 FOREIGN TakeVideo(10)
35 SYSTEM delay_us(10000000)
40 FOREIGN TakeVideo(10)
RUN
Hence: record 10s of video, delay the script for 10s, etc.
I suggest to delay the system for one second more, so the write out will complete.