File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -44,10 +44,11 @@ const FFMPEG_MACOS_RELEASE_URL: &str = "https://evermeet.cx/ffmpeg/ffmpeg-{}.zip
4444const FFMPEG_RECORD_FRAME_RATE : & str = "30" ;
4545const FFMPEG_RECORD_DESKTOP_WINDOWS_COMMAND : & str = "{} -f gdigrab -i desktop -r {} -q:v 1 -y {}" ;
4646const FFMPEG_RECORD_DESKTOP_LINUX_COMMAND : & str =
47- "{} -f x11grab -i {}: 0 -r {} -vcodec huffyuv -y {}" ;
47+ "{} -f x11grab -i {}+0, 0 -r {} -vcodec huffyuv -y {}" ;
4848const FFMPEG_RECORD_DESKTOP_MACOS_COMMAND : & str = r#"{} -f avfoundation -i "0:0" -r {} -y {}"# ;
4949const FFMPEG_RECORDING_EXTENSION : & str = "avi" ;
5050const FFMPEG_RECORDING_FOLDER : & str = "recordings" ;
51+ const FFMPEG_DEFAULT_DISPLAY : & str = ":0" ;
5152
5253pub fn download_ffmpeg (
5354 ffmpeg_version : String ,
@@ -211,7 +212,7 @@ pub fn record_desktop_with_ffmpeg(
211212 FFMPEG_NAME , & recording_name
212213 ) ) ;
213214 let command = if LINUX . is ( os) {
214- let env_display = env:: var ( ENV_DISPLAY ) . unwrap_or_default ( ) ;
215+ let env_display = env:: var ( ENV_DISPLAY ) . unwrap_or ( FFMPEG_DEFAULT_DISPLAY . to_string ( ) ) ;
215216 Command :: new_single ( format_four_args (
216217 get_recording_command ( os) ,
217218 & path_to_string ( & ffmpeg_path) ,
You can’t perform that action at this time.
0 commit comments