video-pedal: a loop pedal for your webcam that any video app sees as a camera
A loop pedal for your webcam: hold a key to record, release to loop, press to go live. Outputs a virtual camera.
At a glance
- What is it?
- video-pedal is about 650 lines of Python that turns a webcam into a looper. Hold a key to record, release to loop through a virtual camera with a crossfaded seam, press a second key to dissolve back to live, and every app that reads a camera sees an ordinary device.
- Who is it for?
- Use video-pedal if you want to loop a few seconds of camera into a call or a recording and every app involved accepts a normal camera device. Skip it if you need multitrack looping or anything longer than a few seconds, since frames are held as JPEGs in a ring buffer sized by --max-seconds.
- Can I use it commercially?
- Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
- Is it still maintained?
- Yes. The repository last received commits 30 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 4, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What it gives you
video-pedal is a loop pedal for a webcam in the sense a guitarist means it. You hold a key to record what the camera sees, let go, and the recording plays on repeat as your camera output. A second key dissolves back to live.
The output is a virtual camera, so anything that reads a webcam sees an ordinary device. The README names Zoom, Meet, Teams, Discord, QuickTime and OBS itself. That single design decision is why about 650 lines of Python on OpenCV, pyvirtualcam and pynput is enough.
Defaults are right Option to record and right Command to go live on macOS, with right Alt and the right Windows or Super key on Windows and Linux, changeable with --key and --live-key. Both are global, so they work while another application has focus.
The ring buffer and the seam
While recording, each frame is JPEG-encoded and pushed onto a collections.deque capped at --max-seconds times fps, so the newest N seconds are always kept and a long hold simply slides the window. The README puts the cost at about 2 MB/s at 720p, with --quality trading memory for artifacts.
The seam is handled twice. build_loop dissolves the last k frames of the recording into the first k with cv2.addWeighted and drops the overlap, so the loop wraps with a short fade where the cut would be. Then, on release, the player starts k frames before the seam, which means the first thing that goes out is the recording tail dissolving into its head. Since that tail was the live feed a moment earlier, the viewer sees a dissolve from live into the loop rather than a jump cut. Going live runs the same ramp backwards, blending each loop frame with the current live frame until everything is live.
The state machine and the two-key rule
States run LIVE to REC to LOOP and back to LIVE, and the edges are where the care is. Holds shorter than --min-seconds are ignored. Holding the pedal while a loop plays re-records. Pressing the live key mid-recording cancels the recording. Pressing the live key during a dissolve is a no-op.
The hotkey listener has one detail worth copying elsewhere. pynput listens system-wide and ignores key-repeat, and the live key only counts as a solo press: if any other key goes down while it is held, right-Command plus Tab for instance, it is treated as a shortcut and ignored. Without that rule, ordinary use of the focused application would end your loop.
Camera discovery, and the OBS trap
Once the OBS extension is installed, the virtual camera itself shows up as a capture index, and reading it would loop its placeholder image back into itself. So discovery reads a few frames from each index and picks the first one whose frames actually change over time.
The second trap is simpler and more likely. On macOS and Windows you have to keep OBS closed while the script runs. If OBS is open with its own virtual camera started, OBS owns the device and pushes its empty black scene out instead of your feed.
Installing it and getting a virtual camera
git clone https://github.com/haxybaxy/video-pedal
cd video-pedal
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtPython 3.9 or newer, with three dependencies: opencv-python 4.10 or newer, pyvirtualcam 0.14 or newer and pynput 1.7 or newer.
The one-time part is getting a virtual camera device onto the system, because pyvirtualcam publishes to whatever device exists and does not create one. On macOS that means installing OBS Studio 30 or newer with brew install --cask obs, then opening OBS, cancelling any setup wizard, clicking Start Virtual Camera, allowing the OBS camera extension under System Settings and Privacy and Security, rebooting if asked, then Stop Virtual Camera and quitting OBS. On Windows the OBS installer registers the driver and you never open OBS. On Linux:
sudo apt install v4l2loopback-dkms
sudo modprobe v4l2loopback video_nr=10 card_label="Video Pedal" exclusive_caps=1Linux users also need the module to survive a reboot, which the README does by writing v4l2loopback into /etc/modules-load.d/ and the options line into /etc/modprobe.d/. The video_nr=10 choice puts the device above the indexes camera discovery probes, and exclusive_caps=1 is what makes Chrome and Zoom list it as a camera at all.
Permissions, and what breaks without them
Two permissions matter on macOS. Camera access is requested on first run. Input Monitoring is not: you have to enable your terminal app under System Settings, Privacy and Security, Input Monitoring, then restart it. Without it the script prints a warning at startup and the two global keys do nothing, although the preview-window keys still work. On Windows, desktop apps need camera access enabled in Settings under Privacy and security.
The README is also clear about its own testing gap. The author has only run it on a Mac, and describes the Windows and Linux paths as what the libraries document rather than something exercised.
Testing approach, and the limits of the design
The interesting parts are tested without hardware. 31 tests cover the loop builder, the ring buffer, the player, the state machine including the dissolve back to live, the overlay blend and the two-key hotkey mapping. They swap in a raw codec for JPEG and never touch a camera, which is the right way to test something whose whole job is a global hotkey and a video device.
The practical limits follow from the design. Frames are held as JPEGs in memory, so loop length is bounded by --max-seconds and your RAM. The ghosted preview is preview-only: it alpha-blends the loop over the live frame for your screen while the virtual camera receives the plain loop. And since the output really is a camera, every application that can record a camera can record your loop.
The last push was on 2026-09-11 and the repository declares no licence.
Editorial conclusion
Use video-pedal if you want to loop a few seconds of camera into a call or a recording and every app involved accepts a normal camera device. Skip it if you need multitrack looping or anything longer than a few seconds, since frames are held as JPEGs in a ring buffer sized by --max-seconds. Do the two one-time steps in order: create the virtual camera device first, then grant Input Monitoring to your terminal, because without the second one the script starts, warns you, and the two global keys do nothing.
Frequently asked questions
Which apps can see the video-pedal output?
Anything that reads a webcam, because pyvirtualcam publishes to a virtual camera device the OS exposes as a normal camera. The README names Zoom, Meet, Teams, Discord, QuickTime and OBS itself.
Why do the hotkeys do nothing on macOS?
Input Monitoring. Enable your terminal app under System Settings, Privacy and Security, Input Monitoring, then restart it. Without it the script warns at startup and the two global keys do nothing, though preview-window keys still work.
Do I need OBS running to use video-pedal?
You need it installed once to create the virtual camera device, but not running. On macOS and Windows, if OBS is open with its own virtual camera started it owns the device and pushes a black scene instead of your feed.
Official sources
Where developers are discussing it
Posts on Hacker News, dev.to and Lobsters that link to this repository, found by our scan of those communities. 0 in the last 30 days; newest first.
- Show HN: Loop Pedal for VideoHacker News · Sep 11, 2026 · 2 points · 0 comments
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/haxybaxy-video-pedal)