fix: Fix ffmpeg

This commit is contained in:
Myzel394 2023-11-30 23:20:48 +01:00
parent 0d618380fa
commit 3cee858b56
No known key found for this signature in database
GPG Key ID: 79CC92F37B3E1A2B
2 changed files with 7 additions and 3 deletions

View File

@ -138,14 +138,15 @@ abstract class BatchesFolder(
filePaths, filePaths,
outputFile, outputFile,
parameter, parameter,
) ).await()
return outputFile
} catch (e: MediaConverter.FFmpegException) { } catch (e: MediaConverter.FFmpegException) {
continue continue
} }
} }
} }
return outputFile throw MediaConverter.FFmpegException("Failed to concatenate")
} }
fun exportFolderForSettings(): String { fun exportFolderForSettings(): String {

View File

@ -70,13 +70,16 @@ class MediaConverter {
" -safe 0" + " -safe 0" +
" -i ${listFile.absolutePath}" + " -i ${listFile.absolutePath}" +
extraCommand + extraCommand +
" -strict normal" +
" -y" + " -y" +
" $outputFile" " $outputFile"
FFmpegKit.executeAsync( FFmpegKit.executeAsync(
command command
) { session -> ) { session ->
listFile.delete() runCatching {
listFile.delete()
}
if (!ReturnCode.isSuccess(session!!.returnCode)) { if (!ReturnCode.isSuccess(session!!.returnCode)) {
Log.d( Log.d(