mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
current stand: trying to improve concatenation of file
This commit is contained in:
parent
1be3912812
commit
0d618380fa
@ -119,7 +119,7 @@ dependencies {
|
||||
annotationProcessor 'com.google.dagger:hilt-compiler:2.46.1'
|
||||
implementation "androidx.hilt:hilt-navigation-compose:1.1.0"
|
||||
|
||||
implementation 'com.arthenica:ffmpeg-kit-min-gpl:5.1'
|
||||
implementation 'com.arthenica:ffmpeg-kit-full-gpl:5.1'
|
||||
|
||||
implementation "androidx.datastore:datastore-preferences:1.0.0"
|
||||
|
||||
|
@ -7,6 +7,7 @@ import java.time.LocalDateTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
import com.arthenica.ffmpegkit.FFmpegKitConfig
|
||||
import android.os.ParcelFileDescriptor
|
||||
import android.util.Log
|
||||
import kotlinx.coroutines.CompletableDeferred
|
||||
import java.io.FileDescriptor
|
||||
import kotlin.reflect.KFunction3
|
||||
@ -129,6 +130,7 @@ abstract class BatchesFolder(
|
||||
val filePaths = getBatchesForFFmpeg()
|
||||
|
||||
for (parameter in ffmpegParameters) {
|
||||
Log.i("Concatenation", "Trying parameter $parameter")
|
||||
onNextParameterTry(parameter)
|
||||
|
||||
try {
|
||||
|
@ -49,9 +49,9 @@ class MediaConverter {
|
||||
}
|
||||
|
||||
private fun createTempFile(content: String): File {
|
||||
val name = UUID.randomUUID().toString()
|
||||
val id = UUID.randomUUID().toString()
|
||||
|
||||
return File.createTempFile("temp-$name", ".txt").apply {
|
||||
return File.createTempFile(".temp-ffmpeg-files-$id", ".txt").apply {
|
||||
writeText(content)
|
||||
}
|
||||
}
|
||||
@ -63,7 +63,7 @@ class MediaConverter {
|
||||
): CompletableDeferred<Unit> {
|
||||
val completer = CompletableDeferred<Unit>()
|
||||
|
||||
val listFile = createTempFile(inputFiles.joinToString("\n", prefix = "file "))
|
||||
val listFile = createTempFile(inputFiles.joinToString("\n") { "file '$it'" })
|
||||
|
||||
val command =
|
||||
" -f concat" +
|
||||
|
Loading…
x
Reference in New Issue
Block a user