mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2025-04-02 07:44:54 +03:00
update merge
This commit is contained in:
parent
84d4dc4b7e
commit
58f516c40a
@ -296,23 +296,28 @@ impl Ffmpeg {
|
|||||||
return Err(Error::msg("Unable to validate tmp video file."));
|
return Err(Error::msg("Unable to validate tmp video file."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let mut ffmpeg_command = FfmpegCommand::new();
|
if is_input_audio_record(&self.temp_input_audio_filename) ||
|
||||||
ffmpeg_command.input(&self.temp_video_filename);
|
is_output_audio_record(&self.temp_output_audio_filename) {
|
||||||
ffmpeg_command.format("ogg");
|
let mut ffmpeg_command = FfmpegCommand::new();
|
||||||
if is_input_audio_record(&self.temp_input_audio_filename) {
|
ffmpeg_command.input(&self.temp_video_filename);
|
||||||
ffmpeg_command.input(&self.temp_input_audio_filename);
|
ffmpeg_command.format("ogg");
|
||||||
}
|
if is_input_audio_record(&self.temp_input_audio_filename) {
|
||||||
if is_output_audio_record(&self.temp_output_audio_filename) {
|
ffmpeg_command.input(&self.temp_input_audio_filename);
|
||||||
ffmpeg_command.input(&self.temp_output_audio_filename);
|
}
|
||||||
}
|
if is_output_audio_record(&self.temp_output_audio_filename) {
|
||||||
ffmpeg_command.args([
|
ffmpeg_command.input(&self.temp_output_audio_filename);
|
||||||
"-c:a",
|
}
|
||||||
"aac",
|
ffmpeg_command.args([
|
||||||
&self.filename,
|
"-c:a",
|
||||||
]);
|
"aac",
|
||||||
ffmpeg_command.overwrite()
|
&self.saved_filename.clone()
|
||||||
.spawn()?
|
]);
|
||||||
.wait()?;
|
ffmpeg_command.overwrite()
|
||||||
|
.spawn()?
|
||||||
|
.wait()?;
|
||||||
|
} else {
|
||||||
|
std::fs::copy(&self.temp_video_filename, &self.saved_filename)?;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Validate video file integrity
|
// Validate video file integrity
|
||||||
let start_time = Instant::now();
|
let start_time = Instant::now();
|
||||||
|
@ -284,23 +284,28 @@ impl Ffmpeg {
|
|||||||
return Err(Error::msg("Unable to validate tmp video file."));
|
return Err(Error::msg("Unable to validate tmp video file."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let mut ffmpeg_command = FfmpegCommand::new();
|
if is_input_audio_record(&self.temp_input_audio_filename) ||
|
||||||
ffmpeg_command.input(&self.temp_video_filename);
|
is_output_audio_record(&self.temp_output_audio_filename) {
|
||||||
ffmpeg_command.format("ogg");
|
let mut ffmpeg_command = FfmpegCommand::new();
|
||||||
if is_input_audio_record(&self.temp_input_audio_filename) {
|
ffmpeg_command.input(&self.temp_video_filename);
|
||||||
ffmpeg_command.input(&self.temp_input_audio_filename);
|
ffmpeg_command.format("ogg");
|
||||||
}
|
if is_input_audio_record(&self.temp_input_audio_filename) {
|
||||||
if is_output_audio_record(&self.temp_output_audio_filename) {
|
ffmpeg_command.input(&self.temp_input_audio_filename);
|
||||||
ffmpeg_command.input(&self.temp_output_audio_filename);
|
}
|
||||||
}
|
if is_output_audio_record(&self.temp_output_audio_filename) {
|
||||||
ffmpeg_command.args([
|
ffmpeg_command.input(&self.temp_output_audio_filename);
|
||||||
"-c:a",
|
}
|
||||||
"aac",
|
ffmpeg_command.args([
|
||||||
&self.filename,
|
"-c:a",
|
||||||
]);
|
"aac",
|
||||||
ffmpeg_command.overwrite()
|
&self.saved_filename.clone()
|
||||||
.spawn()?
|
]);
|
||||||
.wait()?;
|
ffmpeg_command.overwrite()
|
||||||
|
.spawn()?
|
||||||
|
.wait()?;
|
||||||
|
} else {
|
||||||
|
std::fs::copy(&self.temp_video_filename, &self.saved_filename)?;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Validate video file integrity
|
// Validate video file integrity
|
||||||
let start_time = Instant::now();
|
let start_time = Instant::now();
|
||||||
|
Loading…
Reference in New Issue
Block a user