I played a bit more and stored generated .h264 file in /dev/shm ramdisk.
I could keep 120fps as long as I kept width=800.
I finally reached 800x760(!) at 120fps, without a single frame skip!!
This is how I captured the video and converted to video.mkv with mkvmerge and timestamp file:
Code: Select all
pi@raspberrypi2B:~ $ raspivid -t 5300 -w 800 -h 760 -fps 120 -pts timecodes.txt -o /dev/shm/test.h264
Too many macroblocks/s: Increasing H264 Level to 4.2
pi@raspberrypi2B:~ $ mkvmerge -o video.mkv --timecodes 0:timecodes.txt /dev/shm/test.h264
mkvmerge v9.8.0 ('Kuglblids') 32bit
'/dev/shm/test.h264': Using the demultiplexer for the format 'AVC/h.264'.
'/dev/shm/test.h264' track 0: Using the output module for the format 'AVC/h.264 (unframed)'.
The file 'video.mkv' has been opened for writing.
Progress: 100%
The cue entries (the index) are being written...
Multiplexing took 3 seconds.
pi@raspberrypi2B:~ $
And the file sizes are really small, less than 7MB.
Given 448MB free memory under /dev/shm on Pi 2B you can capture more than a minute of 800x760 at 120fps video!
Code: Select all
pi@raspberrypi2B:~ $ du -sk /dev/shm/test.h264 video.mkv
6656 /dev/shm/test.h264
6664 video.mkv
pi@raspberrypi2B:~ $
Frame delta and skip analysis shows that capturing was really done at 120fps, without any skipped frame!
Code: Select all
pi@raspberrypi2B:~ $ ./ptsanalyze timecodes.txt 1-79
609 tstamps.csv frames were captured at 120fps
frame delta time[us] distribution
1
3 8292
6 8293
55 8294
135 8295
258 8296
137 8297
8 8298
4 8299
2 8300
after skip frame indices (middle column)
0% frame skips
pi@raspberrypi2B:~ $
You can download video.mkv for playing with your video player.
Below you see confirmation of Dimensions, Codec and Framerate from totem video player.
https://stamm-wilbrandt.de/en/forum/video.mkv
Here you can see frame delta and skip analysis for a minute of video capture (8296μs ± 15μs):
Code: Select all
pi@raspberrypi2B:~ $ ./ptsanalyze timecodes.txt 1-79
7210 tstamps.csv frames were captured at 120fps
frame delta time[us] distribution
1
1 8281
1 8283
3 8284
2 8285
1 8286
1 8287
2 8288
2 8289
4 8290
4 8291
10 8292
56 8293
586 8294
1668 8295
3236 8296
1413 8297
171 8298
20 8299
9 8300
3 8301
2 8302
4 8303
2 8305
1 8306
2 8307
2 8308
2 8309
1 8311
after skip frame indices (middle column)
0% frame skips
pi@raspberrypi2B:~ $
If I ever get this frame size captured with raspiraw (better only 800x720 at 120fps), then I will most likely get
- 800x240 at 360fps
- 800x120 at 720fps
- 800x64 at 1300fps(?)
- 800x32 at >2000fps(?)
...
I really want to capture the register sets for v2 camera, and I spent a lot of time on that already.
Any help to get me over the hurdles is really appreciated, see this posting and following for details:
viewtopic.php?f=43&t=109137&start=350#p1252015
P.S:
XGA format 1024x768 at 90fps can be captured on Pi Zero with v1 camera without frame skips:
Code: Select all
pi@raspberrypi01:~ $ raspivid -t 5300 -w 1024 -h 768 -fps 90 -pts timecodes.txt -o /dev/shm/test.h264 2>/dev/null
pi@raspberrypi01:~ $ ./ptsanalyze timecodes.txt 2-9
464 tstamps.csv frames were captured at 90fps
frame delta time[us] distribution
1
1 11089
65 11090
348 11091
48 11092
1 11094
after skip frame indices (middle column)
0% frame skips
pi@raspberrypi01:~ $