Skip to content

Commit 2756c0c

Browse files
committed
* update timelapse app
1 parent 052d97d commit 2756c0c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/app_timelapse/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55

66
ENABLE_PLAYER=0 # The playback function is temporarily disabled due to insufficient memory required for 1440p playback.
7+
ENCODER_BITRATE=8000*1000
78

89
disp = display.Display()
910
disp2 = disp.add_channel()
@@ -203,7 +204,7 @@ def touch_box(t, box, oft = 0):
203204
os.makedirs(dir, exist_ok=True)
204205
path = dir + curr_s_str + '.mp4'
205206
print(f'save to {path}')
206-
encoder = video.Encoder(path, cam.width(), cam.height())
207+
encoder = video.Encoder(path, cam.width(), cam.height(), bitrate=ENCODER_BITRATE)
207208
start_touch_record = time.ticks_ms()
208209
if time.ticks_ms() - last_record_ms >= record_step_ms:
209210
encoder.encode(img=img)

0 commit comments

Comments
 (0)