import { Rtsp } from "rtsp-stream/lib";

const main = async () => {
  const rtsp = new Rtsp("rtsp://brandon:asdf1234@192.168.1.229/live", {
    rate: 10,
  });

  rtsp.on("data", async (data: Buffer) => {
    console.log();
    process.exit(0);
  });

  rtsp.on("error", (err) => {
    console.log(err);
  });

  rtsp.start();
};

main();
