Skip to content

stop reinitializing the camera every frame, timestamp recorded frames - #2

Merged
addisonking merged 5 commits into
mainfrom
fix/video-crashes-sensor-input
Oct 23, 2026
Merged

addisonking merged 5 commits into
mainfrom
fix/video-crashes-sensor-input

Conversation

@addisonking

Copy link
Copy Markdown
Owner

The camera was reinitialized every frame. CAM_CNT.5 flushes until the next camera vblank, so each capture threw away most of a frame and preview and recording ran at about half the sensor's rate. Now it starts once and NDMA1 re-arms itself from its completion IRQ into two alternating buffers.

Each recorded frame carries its capture time (new DSIVID02 container, old files still play) and playback and convert.sh pace off that, so a slow clip doesn't play back too fast anymore. Camera waits give up after about two seconds now instead of spinning forever.

Measured 8.7fps in a dim room, 0 dropped frames, 0 overruns.

@addisonking
addisonking merged commit a0af36c into main Oct 23, 2026
2 checks passed
addisonking added a commit that referenced this pull request Oct 27, 2026
…#2)

* fix: stream camera frames continuously instead of restarting per frame

* fix: camera swap, photo buffer flush, and converter timing

* fix: record on the playback clock, stop the audio loop, harden the stream

* fix: store clip length in the header, clamp converter padding

* fix: publish free slots safely and preserve clip duration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant