Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ A simple webcam recorder for Omarchy. Choose your camera and microphone once, th
- Automatically selects the camera's maximum advertised video resolution, preferring 30 fps at that resolution. Preview preserves the whole frame.
- Live microphone meter with peak hold and clipping indication, including while paused. No microphone playback through your speakers.
- Explicit No audio option for silent recordings.
- Mirror preview toggle: flip the live preview horizontally (recording stays unmirrored so text reads correctly). Persisted in settings.
- Live Omarchy accent syncing, including theme symlink switches. Controls and dialogs follow Hyprland's active corner rounding, including personal overrides. Dark chrome and a yellow fallback follow Omacut; button foregrounds adapt for contrast.
- Built-in editing: split the take into clips on an Omacut-style filmstrip, trim each clip with its handles, see where you paused, and undo. Edits never touch the original.
- H.264 MP4 with AAC audio, retained originals, and atomic Save.
Expand Down
13 changes: 12 additions & 1 deletion src/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ ApplicationWindow {
Rectangle {
Layout.fillWidth: true; Layout.fillHeight: true; Layout.minimumHeight: 120
color: "black"; clip: true
VideoOutput { id: liveVideo; anchors.fill: parent; visible: !win.finished; fillMode: VideoOutput.PreserveAspectFit; focus: true }
VideoOutput { id: liveVideo; anchors.fill: parent; visible: !win.finished; fillMode: VideoOutput.PreserveAspectFit; focus: true; mirrored: backend.mirror }
// Hold the last frame at the end of the file rather than clearing to black.
VideoOutput { id: clipVideo; objectName: "clipVideo"; endOfStreamPolicy: VideoOutput.KeepLastFrame; anchors.fill: parent; visible: win.finished; fillMode: VideoOutput.PreserveAspectFit }
MouseArea { anchors.fill: parent; onClicked: { liveVideo.forceActiveFocus(); if (win.finished) win.togglePlayback() } }
Expand Down Expand Up @@ -487,6 +487,17 @@ ApplicationWindow {
RowLayout {
Layout.fillWidth: true; Layout.preferredWidth: 1; spacing: 8
Item { Layout.fillWidth: true }
ActionButton {
objectName: "mirrorButton"
text: backend.mirror ? "Mirror: on" : "Mirror: off"
onClicked: backend.setMirror(!backend.mirror)
visible: !win.finished
enabled: !win.busy
flat: true
ToolTip.visible: hovered
ToolTip.text: "Flip the live preview horizontally"
Accessible.name: backend.mirror ? "Mirror preview on" : "Mirror preview off"
}
ActionButton {
objectName: "saveButton"
readonly property bool saving: backend.state === "saving"
Expand Down
7 changes: 7 additions & 0 deletions src/backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Backend::Backend(FilePicker *picker, bool activateHardware, QObject *parent)
m_root = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/recordings";
m_cameraId=m_settings.value("camera/id").toString();
m_audioId=m_settings.value("microphone/id").toString();
m_mirror=m_settings.value("mirror", false).toBool();
m_capture.setVideoSink(&m_sink);
connect(&m_sink,&QVideoSink::videoFrameChanged,this,&Backend::receiveVideo);
if(m_activateHardware) {
Expand Down Expand Up @@ -230,6 +231,12 @@ void Backend::selectMicrophone(int index) {
if(m_writer || index<0 || index>=m_microphones.size() || m_state=="saving" || m_probing) return;
m_audioId=m_microphones[index].toMap()["id"].toString(); activateSources();
}
void Backend::setMirror(bool value) {
if (m_mirror == value) return;
m_mirror = value;
m_settings.setValue("mirror", value);
emit mirrorChanged();
}
void Backend::retry() { if(!m_writer && m_state!="finished") activateSources(); }
void Backend::toggleRecording() {
if(m_dialogOpen) return;
Expand Down
5 changes: 5 additions & 0 deletions src/backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Backend : public QObject {
Q_PROPERTY(int cameraIndex READ cameraIndex NOTIFY devicesChanged)
Q_PROPERTY(int microphoneIndex READ microphoneIndex NOTIFY devicesChanged)
Q_PROPERTY(bool ready READ ready NOTIFY changed)
Q_PROPERTY(bool mirror READ mirror NOTIFY mirrorChanged)
Q_PROPERTY(bool audioEnabled READ audioEnabled NOTIFY changed)
Q_PROPERTY(bool takeActive READ takeActive NOTIFY changed)
Q_PROPERTY(bool dialogOpen READ dialogOpen NOTIFY changed)
Expand Down Expand Up @@ -58,6 +59,7 @@ class Backend : public QObject {
int cameraIndex() const;
int microphoneIndex() const;
bool ready() const;
bool mirror() const { return m_mirror; }
bool audioEnabled() const { return m_audioId != "none"; }
bool takeActive() const { return m_writer != nullptr; }
bool dialogOpen() const { return m_dialogOpen; }
Expand All @@ -79,6 +81,7 @@ class Backend : public QObject {
Q_INVOKABLE void setPreview(QObject *sink);
Q_INVOKABLE void selectCamera(int index);
Q_INVOKABLE void selectMicrophone(int index);
Q_INVOKABLE void setMirror(bool value);
Q_INVOKABLE void retry();
Q_INVOKABLE void toggleRecording();
Q_INVOKABLE void finish();
Expand All @@ -102,6 +105,7 @@ class Backend : public QObject {
signals:
void changed();
void devicesChanged();
void mirrorChanged();
void meterChanged();
void editChanged();
void safeToClose();
Expand Down Expand Up @@ -170,5 +174,6 @@ class Backend : public QObject {
qint64 m_clipUntil = 0, m_peakUntil = 0, m_signalAt = 0;
double m_duration = 0, m_level = -60, m_peak = -60, m_pendingPeak = 0, m_fps = 30;
bool m_cameraHealthy = false, m_audioHealthy = false, m_dialogOpen = false;
bool m_mirror = false;
bool m_hasSaved = false, m_discardAfter = false, m_restartAfter = false, m_probing = false;
};
2 changes: 2 additions & 0 deletions tests/ui_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ QtObject {
property real peakLevel: -6
property bool clipping: false
property string meterText: "−9 dBFS"
property bool mirror: false
property url clip: ""
property string clipName: "Monologue-2026-09-17.mp4"
property real saveProgress: 0
Expand All @@ -62,6 +63,7 @@ QtObject {
function setPreview(sink) {}
function toggleRecording() { toggles++; state = state === "ready" || state === "paused" ? "recording" : "paused"; changed() }
function finish() { state = "finished"; changed() }
function setMirror(value) { mirror = value; changed() }
function selectCamera(i) {}
function selectMicrophone(i) {}
function newRecording() { newRecordings++; state = "ready"; changed() }
Expand Down