mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2025-04-02 07:44:54 +03:00
fix mic record in windows
This commit is contained in:
parent
982c64800b
commit
e20b7e456a
@ -702,8 +702,8 @@ impl Ffmpeg {
|
|||||||
if self.audio_output_switch.is_active() {
|
if self.audio_output_switch.is_active() {
|
||||||
ffmpeg_command.format("pulse")
|
ffmpeg_command.format("pulse")
|
||||||
.input(&self.audio_output_id);
|
.input(&self.audio_output_id);
|
||||||
|
ffmpeg_command.format("ogg");
|
||||||
}
|
}
|
||||||
ffmpeg_command.format("ogg");
|
|
||||||
|
|
||||||
// Disable bitrate if value is zero
|
// Disable bitrate if value is zero
|
||||||
if self.audio_record_bitrate.value() as u16 > 0 {
|
if self.audio_record_bitrate.value() as u16 > 0 {
|
||||||
|
@ -531,7 +531,7 @@ impl Ffmpeg {
|
|||||||
// Record audio input
|
// Record audio input
|
||||||
if self.audio_input_switch.is_active() {
|
if self.audio_input_switch.is_active() {
|
||||||
ffmpeg_command.format("dshow");
|
ffmpeg_command.format("dshow");
|
||||||
ffmpeg_command.input(format!("audio=\"{}\"", &self.audio_input_id.active_text()
|
ffmpeg_command.input(format!("audio={}", &self.audio_input_id.active_text()
|
||||||
.ok_or_else(|| anyhow!("Failed to get audio input source."))?)
|
.ok_or_else(|| anyhow!("Failed to get audio input source."))?)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -539,7 +539,7 @@ impl Ffmpeg {
|
|||||||
// Record audio output
|
// Record audio output
|
||||||
if self.audio_output_switch.is_active() {
|
if self.audio_output_switch.is_active() {
|
||||||
ffmpeg_command.format("dshow");
|
ffmpeg_command.format("dshow");
|
||||||
ffmpeg_command.input(format!("audio=\"{}\"", &self.audio_output_id));
|
ffmpeg_command.input(format!("audio={}", &self.audio_output_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable bitrate if value is zero
|
// Disable bitrate if value is zero
|
||||||
@ -626,12 +626,12 @@ impl Ffmpeg {
|
|||||||
pub fn start_input_audio(&mut self) -> Result<()> {
|
pub fn start_input_audio(&mut self) -> Result<()> {
|
||||||
let mut ffmpeg_command = FfmpegCommand::new();
|
let mut ffmpeg_command = FfmpegCommand::new();
|
||||||
ffmpeg_command.format("dshow")
|
ffmpeg_command.format("dshow")
|
||||||
.input(format!("audio=\"{}\"", &self.audio_input_id.active_text()
|
.input(format!("audio={}", &self.audio_input_id.active_text()
|
||||||
.ok_or_else(|| anyhow!("Failed to get audio input source."))?)
|
.ok_or_else(|| anyhow!("Failed to get audio input source."))?)
|
||||||
);
|
);
|
||||||
if self.audio_output_switch.is_active() {
|
if self.audio_output_switch.is_active() {
|
||||||
ffmpeg_command.format("dshow")
|
ffmpeg_command.format("dshow")
|
||||||
.input(&self.audio_output_id);
|
.input(format!("audio={}", &self.audio_output_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable bitrate if value is zero
|
// Disable bitrate if value is zero
|
||||||
@ -685,7 +685,7 @@ impl Ffmpeg {
|
|||||||
pub fn start_output_audio(&mut self) -> Result<()> {
|
pub fn start_output_audio(&mut self) -> Result<()> {
|
||||||
let mut ffmpeg_command = FfmpegCommand::new();
|
let mut ffmpeg_command = FfmpegCommand::new();
|
||||||
ffmpeg_command.format("dshow")
|
ffmpeg_command.format("dshow")
|
||||||
.input(format!("audio=\"{}\"", &self.audio_output_id));
|
.input(format!("audio={}", &self.audio_output_id));
|
||||||
|
|
||||||
// Remove metadate
|
// Remove metadate
|
||||||
ffmpeg_command.args(["-map_metadata", "-1"]);
|
ffmpeg_command.args(["-map_metadata", "-1"]);
|
||||||
|
Loading…
Reference in New Issue
Block a user