From f8f1cababe68f47ef0dd558fb08b0f0a5f7cbdad Mon Sep 17 00:00:00 2001 From: Kai Date: Thu, 17 Apr 2025 15:06:30 -0500 Subject: [PATCH] increase analyze duration Changelog: changed --- .../java/com/futo/platformplayer/downloads/VideoDownload.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/futo/platformplayer/downloads/VideoDownload.kt b/app/src/main/java/com/futo/platformplayer/downloads/VideoDownload.kt index ede24707..1937e939 100644 --- a/app/src/main/java/com/futo/platformplayer/downloads/VideoDownload.kt +++ b/app/src/main/java/com/futo/platformplayer/downloads/VideoDownload.kt @@ -58,6 +58,7 @@ import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.suspendCancellableCoroutine import kotlinx.coroutines.withContext import kotlinx.serialization.Contextual +import kotlinx.serialization.InternalSerializationApi import kotlinx.serialization.Transient import java.io.File import java.io.FileOutputStream @@ -72,6 +73,7 @@ import java.util.concurrent.ThreadLocalRandom import kotlin.coroutines.resumeWithException import kotlin.time.times +@InternalSerializationApi @kotlinx.serialization.Serializable class VideoDownload { var state: State = State.QUEUED; @@ -633,7 +635,9 @@ class VideoDownload { val fileList = File(context.cacheDir, "fileList-${UUID.randomUUID()}.txt") fileList.writeText(segmentFiles.joinToString("\n") { "file '${it.absolutePath}'" }) - val cmd = "-f concat -safe 0 -i \"${fileList.absolutePath}\" -c copy \"${targetFile.absolutePath}\"" + // 8 second analyze duration is needed for some Rumble HLS downloads + val cmd = "-analyzeduration 8M -f concat -safe 0 -i \"${fileList.absolutePath}\"" + + " -c copy \"${targetFile.absolutePath}\"" val statisticsCallback = StatisticsCallback { _ -> //TODO: Show progress?