Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

ffmpeg refactor

Brendan Allancfdb27f56633
diff --git a/.gitignore b/.gitignore
index 2cf8a5a22..13b5cf57e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,5 @@ target
.turbo
pnpm-lock.yaml
.zed
+.output
+.vinxi
diff --git a/apps/desktop-solid/src-tauri/Info.plist b/apps/desktop-solid/src-tauri/Info.plist
index 515c123f6..802e977d0 100644
--- a/apps/desktop-solid/src-tauri/Info.plist
+++ b/apps/desktop-solid/src-tauri/Info.plist
@@ -1,23 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
- <dict>
- <key>NSCameraUsageDescription</key>
- <string>Request camera access for WebRTC</string>
- <key>NSMicrophoneUsageDescription</key>
- <string>Request microphone access for WebRTC</string>
- <key>NSScreenCaptureUsageDescription</key>
- <string>Request screen capture access</string>
- <key>CFBundleURLTypes</key>
- <array>
- <dict>
- <key>CFBundleURLName</key>
- <string>so.cap.desktop-solid</string>
- <key>CFBundleURLSchemes</key>
- <array>
- <string>caprecorder</string>
- </array>
- </dict>
- </array>
- </dict>
+<dict>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>cap</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>icon.icns</string>
+ <key>CFBundleTypeName</key>
+ <string>Cap Recording</string>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>LSHandlerRank</key>
+ <string>Default</string>
+ <key>LSTypeIsPackage</key>
+ <true/>
+ </dict>
+ </array>
+ <key>NSCameraUsageDescription</key>
+ <string>Request camera access for WebRTC</string>
+ <key>NSMicrophoneUsageDescription</key>
+ <string>Request microphone access for WebRTC</string>
+ <key>NSScreenCaptureUsageDescription</key>
+ <string>Request screen capture access</string>
+ <key>CFBundleURLTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleURLName</key>
+ <string>so.cap.desktop-solid</string>
+ <key>CFBundleURLSchemes</key>
+ <array>
+ <string>caprecorder</string>
+ </array>
+ </dict>
+ </array>
+</dict>
</plist>
diff --git a/apps/desktop-solid/src-tauri/src/camera.rs b/apps/desktop-solid/src-tauri/src/camera.rs
index ff3658b31..385439fe3 100644
--- a/apps/desktop-solid/src-tauri/src/camera.rs
+++ b/apps/desktop-solid/src-tauri/src/camera.rs
@@ -1,35 +1,32 @@
-use nokhwa::utils::{CameraFormat, FrameFormat, Resolution};
+use nokhwa::utils::{CameraFormat, FrameFormat};
use serde::Serialize;
use specta::Type;
use std::{
io::Write,
path::{Path, PathBuf},
- sync::{
- atomic::{AtomicBool, Ordering},
- Arc,
- },
+ sync::atomic::Ordering,
};
use tokio::sync::oneshot;
use tauri::{AppHandle, Manager, WebviewUrl};
-use crate::ffmpeg::{FFmpegRawVideoSource, NamedPipeCapture};
+use crate::ffmpeg::NamedPipeCapture;
-pub const CAMERA_WINDOW: &str = "camera";
+pub const WINDOW_LABEL: &str = "camera";
const CAMERA_ROUTE: &str = "/camera";
const WINDOW_SIZE: f64 = 230.0;
#[tauri::command]
#[specta::specta]
pub fn create_camera_window(app: AppHandle) {
- if let Some(window) = app.get_webview_window(CAMERA_WINDOW) {
+ if let Some(window) = app.get_webview_window(WINDOW_LABEL) {
window.set_focus().ok();
} else {
let monitor = app.primary_monitor().unwrap().unwrap();
let window = tauri::webview::WebviewWindow::builder(
&app,
- CAMERA_WINDOW,
+ WINDOW_LABEL,
WebviewUrl::App(CAMERA_ROUTE.into()),
)
.title("Cap Camera")
@@ -97,44 +94,7 @@ impl From<CameraIndex> for nokhwa::utils::CameraIndex {
}
}
-pub async fn start_recording(
- output_folder: &Path,
- output_name: &str,
- camera_info: CameraInfo,
-) -> FFmpegRawVideoSource {
- std::fs::create_dir_all(output_folder).ok();
-
- let pipe_path = output_folder.join(format!("{output_name}.pipe"));
-
- let output_path = output_folder.join(format!("{output_name}.mp4"));
- std::fs::remove_file(&output_path).ok();
-
- println!("Beginning camera recording");
-
- let (camera_format, capture) = start_capturing(pipe_path.clone(), camera_info).await;
-
- println!(
- "Received video info: {:?}",
- (camera_format.resolution(), camera_format.frame_rate())
- );
-
- FFmpegRawVideoSource {
- width: camera_format.resolution().width(),
- height: camera_format.resolution().height(),
- fps: camera_format.frame_rate(),
- input: pipe_path,
- output: output_path,
- pix_fmt: match camera_format.format() {
- FrameFormat::YUYV => "uyvy422",
- FrameFormat::RAWRGB => "rgb24",
- FrameFormat::NV12 => "nv12",
- _ => panic!("unimplemented"),
- },
- capture,
- }
-}
-
-async fn start_capturing(
+pub async fn start_capturing(
pipe_path: PathBuf,
camera_info: CameraInfo,
) -> (CameraFormat, NamedPipeCapture) {
@@ -172,9 +132,6 @@ async fn start_capturing(
return;
}
let frame = camera.frame().unwrap();
- dbg!(frame.source_frame_format());
- dbg!(frame.buffer().len());
- dbg!(frame.resolution());
file.write_all(frame.buffer()).ok();
}
});
diff --git a/apps/desktop-solid/src-tauri/src/display.rs b/apps/desktop-solid/src-tauri/src/display.rs
index dd7a89d77..b7e8f6c9a 100644
--- a/apps/desktop-solid/src-tauri/src/display.rs
+++ b/apps/desktop-solid/src-tauri/src/display.rs
@@ -13,7 +13,7 @@ use serde::{Deserialize, Serialize};
use specta::Type;
use crate::{
- ffmpeg::{FFmpegRawVideoSource, NamedPipeCapture},
+ ffmpeg::{FFmpegRawVideoInput, NamedPipeCapture},
macos,
};
@@ -56,38 +56,9 @@ pub fn get_capture_windows() -> Vec<CaptureWindow> {
.collect::<Vec<_>>()
}
-const FPS: u32 = 30;
+pub const FPS: u32 = 30;
-pub fn start_recording(
- output_folder: &Path,
- output_name: &str,
- capture_target: &CaptureTarget,
- camera_target: Option<Target>,
-) -> FFmpegRawVideoSource {
- std::fs::create_dir_all(output_folder).ok();
-
- let pipe_path = output_folder.join(format!("{output_name}.pipe"));
-
- let output_path = output_folder.join(format!("{output_name}.mp4"));
- std::fs::remove_file(&output_path).ok();
-
- println!("Beginning capture recording");
-
- let ((width, height), capture) =
- start_capturing(pipe_path.clone(), &capture_target, camera_target);
-
- FFmpegRawVideoSource {
- width,
- height,
- fps: FPS,
- input: pipe_path,
- output: output_path,
- pix_fmt: "bgra",
- capture,
- }
-}
-
-fn start_capturing(
+pub fn start_capturing(
pipe_path: PathBuf,
capture_target: &CaptureTarget,
camera_target: Option<Target>,
@@ -149,7 +120,6 @@ fn start_capturing(
match capturer.get_next_frame() {
Ok(Frame::BGRA(frame)) => {
- println!("bruh");
file.write_all(&frame.data).ok();
}
_ => println!("Failed to get frame"),
diff --git a/apps/desktop-solid/src-tauri/src/ffmpeg.rs b/apps/desktop-solid/src-tauri/src/ffmpeg.rs
index 3621fd0a9..4b60c52cc 100644
--- a/apps/desktop-solid/src-tauri/src/ffmpeg.rs
+++ b/apps/desktop-solid/src-tauri/src/ffmpeg.rs
@@ -1,7 +1,9 @@
use std::{
+ ffi::OsString,
io::Write,
+ ops::Deref,
path::PathBuf,
- process::{Child, ChildStdin, Command, Stdio},
+ process::{ChildStdin, Command, Stdio},
sync::{
atomic::{AtomicBool, Ordering},
Arc,
@@ -10,12 +12,12 @@ use std::{
use crate::utils::create_named_pipe;
-pub struct FFmpegRecording {
+pub struct FFmpegProcess {
ffmpeg_stdin: ChildStdin,
}
-impl FFmpegRecording {
- pub fn create(mut command: Command) -> Self {
+impl FFmpegProcess {
+ pub fn spawn(mut command: Command) -> Self {
let mut cmd = command
.stdin(Stdio::piped())
.spawn()
@@ -60,55 +62,80 @@ impl NamedPipeCapture {
}
}
-pub struct FFmpegRawVideoSource {
+pub struct FFmpegInput<T> {
+ inner: T,
+ pub index: u8,
+}
+
+impl<T> Deref for FFmpegInput<T> {
+ type Target = T;
+
+ fn deref(&self) -> &Self::Target {
+ &self.inner
+ }
+}
+
+pub trait ApplyFFmpegArgs {
+ fn apply_ffmpeg_args(&self, command: &mut Command);
+}
+
+pub struct FFmpegRawVideoInput {
pub width: u32,
pub height: u32,
pub fps: u32,
- pub input: PathBuf,
- pub output: PathBuf,
pub pix_fmt: &'static str,
- pub capture: NamedPipeCapture,
+ pub input: OsString,
}
-impl FFmpegRawVideoSource {
- pub fn apply_to_ffmpeg(
- self,
- command: &mut std::process::Command,
- index: u8,
- ) -> NamedPipeCapture {
+impl ApplyFFmpegArgs for FFmpegRawVideoInput {
+ fn apply_ffmpeg_args(&self, command: &mut Command) {
let size = format!("{}x{}", self.width, self.height);
- println!("applying to ffmpeg: size: {size}");
-
command
// input
.args(&["-f", "rawvideo", "-pix_fmt", self.pix_fmt])
.args(["-s", &size])
.args(["-r", &self.fps.to_string()])
.args(["-thread_queue_size", "4096", "-i"])
- .arg(self.input)
- // output
- .args(["-f", "mp4", "-map", &format!("{index}:v")])
- .args(["-codec:v", "libx264", "-preset", "ultrafast"])
- .args(["-pix_fmt", "yuv420p", "-tune", "zerolatency"])
- .args(["-vsync", "1", "-force_key_frames", "expr:gte(t,n_forced*3)"])
- .args(["-movflags", "frag_keyframe+empty_moov"])
- .args([
- "-vf",
- &format!("fps={},scale=in_range=full:out_range=limited", self.fps),
- ])
- .arg(self.output);
-
- self.capture
+ .arg(&self.input);
+ // // output
+ // .args(["-f", "mp4", "-map", &format!("{index}:v")])
+ // .args(["-codec:v", "libx264", "-preset", "ultrafast"])
+ // .args(["-pix_fmt", "yuv420p", "-tune", "zerolatency"])
+ // .args(["-vsync", "1", "-force_key_frames", "expr:gte(t,n_forced*3)"])
+ // .args(["-movflags", "frag_keyframe+empty_moov"])
+ // .args([
+ // "-vf",
+ // &format!("fps={},scale=in_range=full:out_range=limited", self.fps),
+ // ])
+ // .arg(self.output);
}
}
-pub struct FFmpegRawSourceEncoder {
- command: Command,
+pub struct FFmpegRawAudioSource {
+ pub sample_format: String,
+ pub sample_rate: u32,
+ pub channels: u16,
+ pub input: OsString,
+}
+
+impl ApplyFFmpegArgs for FFmpegRawAudioSource {
+ fn apply_ffmpeg_args(&self, command: &mut Command) {
+ command
+ .args(["-f", &self.sample_format])
+ .args(["-ar", &self.sample_rate.to_string()])
+ .args(["-ac", &self.channels.to_string()])
+ .args(["-thread_queue_size", "4096", "-i"])
+ .arg(&self.input);
+ }
+}
+
+pub struct FFmpeg {
+ pub command: Command,
source_index: u8,
}
-impl FFmpegRawSourceEncoder {
+impl FFmpeg {
pub fn new() -> Self {
Self {
command: Command::new("ffmpeg"),
@@ -116,14 +143,19 @@ impl FFmpegRawSourceEncoder {
}
}
- pub fn add_source<R>(&mut self, source: impl FnOnce(&mut Command, u8) -> R) -> R {
+ pub fn add_input<S: ApplyFFmpegArgs>(&mut self, source: S) -> FFmpegInput<S> {
let source_index = self.source_index;
self.source_index += 1;
- source(&mut self.command, source_index)
+ source.apply_ffmpeg_args(&mut self.command);
+
+ FFmpegInput {
+ inner: source,
+ index: source_index,
+ }
}
- pub fn start(self) -> FFmpegRecording {
- FFmpegRecording::create(self.command)
+ pub fn start(self) -> FFmpegProcess {
+ FFmpegProcess::spawn(self.command)
}
}
diff --git a/apps/desktop-solid/src-tauri/src/lib.rs b/apps/desktop-solid/src-tauri/src/lib.rs
index 5b9524117..3a95d3c3a 100644
--- a/apps/desktop-solid/src-tauri/src/lib.rs
+++ b/apps/desktop-solid/src-tauri/src/lib.rs
@@ -2,13 +2,13 @@ mod camera;
mod display;
mod ffmpeg;
mod macos;
+mod recording;
mod utils;
-use ffmpeg::{FFmpegRawSourceEncoder, FFmpegRecording, NamedPipeCapture};
use scap::Target;
use serde::{Deserialize, Serialize};
-use std::{path::PathBuf, sync::Arc};
-use tauri::{AppHandle, Manager, State};
+use std::sync::Arc;
+use tauri::{AppHandle, Manager, State, WebviewWindow};
use tauri_specta::Event;
use tokio::sync::RwLock;
@@ -22,19 +22,12 @@ pub struct RecordingOptions {
camera_label: Option<String>,
}
-pub struct InProgressRecording {
- recording_path: PathBuf,
- ffmpeg_recording: FFmpegRecording,
- display_capture: NamedPipeCapture,
- camera_capture: Option<NamedPipeCapture>,
-}
-
#[derive(specta::Type, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct AppState {
start_recording_options: RecordingOptions,
#[serde(skip)]
- current_recording: Option<InProgressRecording>,
+ current_recording: Option<recording::InProgressRecording>,
}
#[derive(specta::Type, Serialize, tauri_specta::Event, Clone)]
@@ -74,69 +67,35 @@ async fn start_recording(app: AppHandle, state: MutableState<'_, AppState>) -> R
let id = uuid::Uuid::new_v4().to_string();
- let recording_path = app
+ let recording_dir = app
.path()
.app_data_dir()
.unwrap()
.join("recordings")
.join(format!("{id}.cap"));
- std::fs::create_dir_all(&recording_path).unwrap();
- let content_path = recording_path.join("content");
-
- let mut ffmpeg = FFmpegRawSourceEncoder::new();
-
- let camera_capture = {
- let Some(camera_info) = recording_options
- .camera_label
- .as_ref()
- .and_then(|camera_label| {
- camera::get_cameras()
- .into_iter()
- .find(|c| &c.human_name == camera_label)
- })
- else {
- todo!()
- };
- let source = camera::start_recording(&content_path, "camera", camera_info).await;
-
- Some(ffmpeg.add_source(move |cmd, i| source.apply_to_ffmpeg(cmd, i)))
- };
- let display_capture = {
- let camera_window_target =
- app.get_webview_window(camera::CAMERA_WINDOW)
- .and_then(|window| {
- let ns_window = window.ns_window().unwrap() as *const objc2_app_kit::NSWindow;
-
- let window_id = unsafe { (*ns_window).windowNumber() };
- scap::get_all_targets()
- .into_iter()
- .find(|target| match target {
- Target::Window(window) => window.raw_handle as isize == window_id,
- _ => false,
- })
- });
-
- let display_source = display::start_recording(
- &content_path,
- "display",
- &recording_options.capture_target,
- camera_window_target,
- );
-
- ffmpeg.add_source(move |cmd, i| display_source.apply_to_ffmpeg(cmd, i))
- };
+ state.current_recording = Some(
+ recording::start(
+ recording_dir,
+ recording_options,
+ app.get_webview_window(camera::WINDOW_LABEL)
+ .and_then(|w| get_target_for_window(&w)),
+ )
+ .await,
+ );
- let current_recording = InProgressRecording {
- recording_path,
- ffmpeg_recording: ffmpeg.start(),
- display_capture,
- camera_capture,
- };
+ Ok(())
+}
- state.current_recording = Some(current_recording);
+fn get_target_for_window(window: &WebviewWindow) -> Option<Target> {
+ let window_number = macos::get_ns_window_number(window.ns_window().unwrap());
- Ok(())
+ scap::get_all_targets()
+ .into_iter()
+ .find(|target| match target {
+ Target::Window(window) => window.raw_handle as isize == window_number,
+ _ => false,
+ })
}
#[tauri::command]
@@ -148,17 +107,13 @@ async fn stop_recording(state: MutableState<'_, AppState>) -> Result<(), String>
return Err("Recording not in progress".to_string());
};
- current_recording.ffmpeg_recording.stop();
- current_recording.display_capture.stop();
- if let Some(camera_capture) = current_recording.camera_capture {
- camera_capture.stop();
- };
+ current_recording.stop();
Ok(())
}
fn on_recording_options_change(app: &AppHandle, options: &RecordingOptions) {
- match app.get_webview_window(camera::CAMERA_WINDOW) {
+ match app.get_webview_window(camera::WINDOW_LABEL) {
Some(window) if options.camera_label.is_none() => {
window.close().ok();
}
diff --git a/apps/desktop-solid/src-tauri/src/macos.rs b/apps/desktop-solid/src-tauri/src/macos.rs
index 3c851b065..36264c6e3 100644
--- a/apps/desktop-solid/src-tauri/src/macos.rs
+++ b/apps/desktop-solid/src-tauri/src/macos.rs
@@ -1,3 +1,5 @@
+use std::ffi::c_void;
+
use core_graphics::{
base::boolean_t,
display::{CFDictionaryRef, CGRect},
@@ -170,6 +172,12 @@ pub fn get_on_screen_windows() -> Vec<Window> {
array
}
+pub fn get_ns_window_number(ns_window: *mut c_void) -> isize {
+ let ns_window = ns_window as *const objc2_app_kit::NSWindow;
+
+ unsafe { (*ns_window).windowNumber() }
+}
+
#[link(name = "CoreGraphics", kind = "framework")]
extern "C" {
pub fn CGRectMakeWithDictionaryRepresentation(
diff --git a/apps/desktop-solid/src-tauri/src/recording.rs b/apps/desktop-solid/src-tauri/src/recording.rs
new file mode 100644
index 000000000..969d73b3e
--- /dev/null
+++ b/apps/desktop-solid/src-tauri/src/recording.rs
@@ -0,0 +1,159 @@
+use std::path::PathBuf;
+
+use scap::Target;
+
+use crate::{camera, display, ffmpeg::*, RecordingOptions};
+
+pub struct InProgressRecording {
+ recording_dir: PathBuf,
+ ffmpeg_process: FFmpegProcess,
+ display: FFmpegCaptureOutput<FFmpegRawVideoInput>,
+ camera: Option<FFmpegCaptureOutput<FFmpegRawVideoInput>>,
+}
+
+impl InProgressRecording {
+ pub fn stop(self) {
+ self.ffmpeg_process.stop();
+ self.display.capture.stop();
+ if let Some(camera) = self.camera {
+ camera.capture.stop();
+ }
+ }
+}
+
+struct FFmpegCaptureOutput<T> {
+ pub input: FFmpegInput<T>,
+ pub capture: NamedPipeCapture,
+ pub output_path: PathBuf,
+}
+
+pub async fn start(
+ recording_dir: PathBuf,
+ recording_options: &RecordingOptions,
+ camera_target: Option<Target>,
+) -> InProgressRecording {
+ let content_dir = recording_dir.join("content");
+
+ std::fs::create_dir_all(&content_dir).unwrap();
+
+ let mut ffmpeg = FFmpeg::new();
+
+ let camera = start_camera_recording(&content_dir, &recording_options, &mut ffmpeg).await;
+ let display =
+ start_display_recording(&content_dir, recording_options, &mut ffmpeg, camera_target).await;
+
+ let ffmpeg_process = ffmpeg.start();
+
+ InProgressRecording {
+ recording_dir,
+ ffmpeg_process,
+ display,
+ camera,
+ }
+}
+
+async fn start_camera_recording(
+ content_path: &PathBuf,
+ recording_options: &RecordingOptions,
+ ffmpeg: &mut FFmpeg,
+) -> Option<FFmpegCaptureOutput<FFmpegRawVideoInput>> {
+ let Some(camera_info) = recording_options
+ .camera_label
+ .as_ref()
+ .and_then(|camera_label| {
+ camera::get_cameras()
+ .into_iter()
+ .find(|c| &c.human_name == camera_label)
+ })
+ else {
+ return None;
+ };
+
+ let pipe_path = content_path.join("camera.pipe");
+ let output_path = content_path.join("camera.mp4");
+
+ let (format, capture) = camera::start_capturing(pipe_path.clone(), camera_info).await;
+
+ use nokhwa::utils::FrameFormat;
+
+ let ffmpeg_input = ffmpeg.add_input(FFmpegRawVideoInput {
+ input: pipe_path.into_os_string(),
+ width: format.resolution().width(),
+ height: format.resolution().height(),
+ fps: format.frame_rate(),
+ pix_fmt: match format.format() {
+ FrameFormat::YUYV => "uyvy422",
+ FrameFormat::RAWRGB => "rgb24",
+ FrameFormat::NV12 => "nv12",
+ _ => panic!("unimplemented"),
+ },
+ });
+
+ ffmpeg
+ .command
+ .args(["-f", "mp4", "-map", &format!("{}:v", ffmpeg_input.index)])
+ .args(["-codec:v", "libx264", "-preset", "ultrafast"])
+ .args(["-pix_fmt", "yuv420p", "-tune", "zerolatency"])
+ .args(["-vsync", "1", "-force_key_frames", "expr:gte(t,n_forced*3)"])
+ .args(["-movflags", "frag_keyframe+empty_moov"])
+ .args([
+ "-vf",
+ &format!(
+ "fps={},scale=in_range=full:out_range=limited",
+ ffmpeg_input.fps
+ ),
+ ])
+ .arg(&output_path);
+
+ Some(FFmpegCaptureOutput {
+ input: ffmpeg_input,
+ capture,
+ output_path,
+ })
+}
+
+async fn start_display_recording(
+ content_path: &PathBuf,
+ recording_options: &RecordingOptions,
+ ffmpeg: &mut FFmpeg,
+ camera_window_target: Option<Target>,
+) -> FFmpegCaptureOutput<FFmpegRawVideoInput> {
+ let pipe_path = content_path.join("display.pipe");
+ let output_path = content_path.join("display.mp4");
+
+ let ((width, height), capture) = display::start_capturing(
+ pipe_path.clone(),
+ &recording_options.capture_target,
+ camera_window_target,
+ );
+
+ let ffmpeg_input = ffmpeg.add_input(FFmpegRawVideoInput {
+ input: pipe_path.into_os_string(),
+ width,
+ height,
+ fps: display::FPS,
+ pix_fmt: "bgra",
+ });
+
+ ffmpeg
+ .command
+ .args(["-f", "mp4", "-map", &format!("{}:v", ffmpeg_input.index)])
+ .args(["-codec:v", "libx264", "-preset", "ultrafast"])
+ .args(["-pix_fmt", "yuv420p", "-tune", "zerolatency"])
+ .args(["-vsync", "1", "-force_key_frames", "expr:gte(t,n_forced*3)"])
+ .args(["-movflags", "frag_keyframe+empty_moov"])
+ .args([
+ "-vf",
+ &format!(
+ "fps={},scale=in_range=full:out_range=limited",
+ ffmpeg_input.fps
+ ),
+ ])
+ .arg(&output_path);
+
+ FFmpegCaptureOutput {
+ input: ffmpeg_input,
+ capture,
+ output_path,
+ }
+}
diff --git a/apps/desktop-solid/src-tauri/tauri.conf.json b/apps/desktop-solid/src-tauri/tauri.conf.json
index efe6233c1..029585fc6 100644
--- a/apps/desktop-solid/src-tauri/tauri.conf.json
+++ b/apps/desktop-solid/src-tauri/tauri.conf.json
@@ -6,7 +6,7 @@
"beforeDevCommand": "pnpm dev",
"devUrl": "http://localhost:1420",
"beforeBuildCommand": "pnpm build",
- "frontendDist": "../dist"
+ "frontendDist": "../.output/public"
},
"app": {
"windows": [