gonzopi

git clone https://git.tarina.org/gonzopi
Log | Files | Refs | README | LICENSE

commit 00f91f414dddcde0ef22e4fcdb408d3cbbb579dd
parent bb01e27024858074ce813940dacef392165fecb8
Author: rbckman <rob@tarina.org>
Date:   Mon, 14 Apr 2025 07:25:38 +0100

pushing the limits of Raspberry Pi now, I-frames at every fifth frames to not max out GPU

Diffstat:
MVERSION | 2+-
Mgonzopi.py | 5+++--
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/VERSION b/VERSION @@ -1,2 +1,2 @@ -2.03 +2.04 Gilliam diff --git a/gonzopi.py b/gonzopi.py @@ -169,7 +169,7 @@ def main(): fps_selected=8 fps_selection=[] if 'Raspberry Pi 4 Model B' in raspberrypiversion: - quality = 20 + quality = 30 bitrate = 8888888 if 'Raspberry Pi 3 Model B' in raspberrypiversion: quality = 30 @@ -6048,7 +6048,7 @@ def startrecording(camera, takename): # FFmpeg command to take H.264 input from stdin and output to MP4 ffmpeg_cmd = ['ffmpeg','-i', 'pipe:0', '-fflags', '+genpts+igndts', '-c:v', 'copy', '-movflags', 'frag_keyframe+empty_moov', '-bsf:v', 'dump_extra', '-b:v', str(bitrate), '-level:v', '4.2', '-g', '1', '-r', '25', '-f', 'mp4', takename, '-loglevel','debug', '-y'] rec_process = subprocess.Popen(ffmpeg_cmd, stdin=subprocess.PIPE) - camera.start_recording(rec_process.stdin, format='h264', bitrate = bitrate, level=profilelevel, quality=quality, intra_period=1) + camera.start_recording(rec_process.stdin, format='h264', level=profilelevel, quality=quality, intra_period=5, bitrate = bitrate) return rec_process def stoprecording(camera, rec_process): @@ -6396,6 +6396,7 @@ def stopinterface(camera): def startcamera(lens, fps): global camera_model, fps_selection, fps_selected, cammode camera = picamera.PiCamera() + camera.video_stabilization=True if cammode == 'film': reso=(1920,1080) elif cammode == 'picture':