1 import ./make-test-python.nix ({ pkgs, lib, ...} :
5 meta.maintainers = with lib.maintainers; [ hexa ];
8 machine = { config, ... }: {
12 hostname = "localhost";
19 input_args = "-fflags nobuffer -strict experimental -fflags +genpts+discardcorrupt -r 10 -use_wallclock_as_timestamps 1";
21 path = "http://127.0.0.1:8080";
29 record.enabled = true;
33 systemd.services.video-stream = {
34 description = "Start a test stream that frigate can capture";
43 ExecStart = "${lib.getBin pkgs.ffmpeg-headless}/bin/ffmpeg -re -f lavfi -i smptebars=size=800x600:rate=10 -f mpegts -listen 1 http://0.0.0.0:8080";
52 machine.wait_for_unit("frigate.service")
54 machine.wait_for_open_port(5001)
56 machine.succeed("curl http://localhost:5001")
58 machine.wait_for_file("/var/cache/frigate/test-*.mp4")