Skip to content

Commit 8f3d4a1

Browse files
committed
[rust] Change macOS command to record desktop
1 parent 1b95a53 commit 8f3d4a1

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

rust/src/ffmpeg.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ const FFMPEG_MACOS_RELEASE_URL: &str = "https://evermeet.cx/ffmpeg/ffmpeg-{}.zip
4444
const FFMPEG_RECORD_FRAME_RATE: &str = "30";
4545
const FFMPEG_RECORD_DESKTOP_WINDOWS_COMMAND: &str = "{} -f gdigrab -i desktop -r {} -q:v 1 -y {}";
4646
const FFMPEG_RECORD_DESKTOP_LINUX_COMMAND: &str = "{} -f x11grab -i {} -r {} -vcodec huffyuv -y {}";
47-
const FFMPEG_RECORD_DESKTOP_MACOS_COMMAND: &str = r#"{} -f avfoundation -list_devices true -i """#;
48-
// const FFMPEG_RECORD_DESKTOP_MACOS_COMMAND: &str = "{} -f avfoundation -i {} -r {} -y {}";
47+
const FFMPEG_RECORD_DESKTOP_MACOS_COMMAND: &str = r#"{} -f avfoundation -i "{}" -r {} -y {}"#;
4948
const FFMPEG_RECORDING_EXTENSION: &str = "avi";
5049
const FFMPEG_RECORDING_FOLDER: &str = "recordings";
5150

@@ -217,11 +216,6 @@ pub fn record_desktop_with_ffmpeg(
217216
FFMPEG_RECORD_FRAME_RATE,
218217
&recording_name,
219218
))
220-
} else if MACOS.is(os) {
221-
Command::new_single(format_one_arg(
222-
get_recording_command(os),
223-
&path_to_string(&ffmpeg_path),
224-
))
225219
} else {
226220
let env_display = env::var(ENV_DISPLAY).unwrap_or_default();
227221
Command::new_single(format_four_args(

0 commit comments

Comments
 (0)