mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-19 07:15:25 +02:00
fix: Fix batches folder concatenation
This commit is contained in:
parent
986bf1d98a
commit
caeb966598
@ -277,11 +277,21 @@ abstract class BatchesFolder(
|
|||||||
runCatching {
|
runCatching {
|
||||||
// `fullTime` is not accurate as the last batch might be shorter,
|
// `fullTime` is not accurate as the last batch might be shorter,
|
||||||
// but it's good enough for the progress bar
|
// but it's good enough for the progress bar
|
||||||
|
|
||||||
|
// Using the code below results in a nasty bug:
|
||||||
|
// since we use ffmpeg to extract the duration, the saf parameter is already
|
||||||
|
// "used up" and we can't use it again for the actual concatenation
|
||||||
|
// Since an accurate progress bar is less important than speed,
|
||||||
|
// we currently don't use this code
|
||||||
|
/*
|
||||||
val lastBatchTime = (FFprobeKit.execute(
|
val lastBatchTime = (FFprobeKit.execute(
|
||||||
"-i ${filePaths.last()} -show_entries format=duration -v quiet -of csv=\"p=0\"",
|
"-i ${filePaths.last()} -show_entries format=duration -v quiet -of csv=\"p=0\"",
|
||||||
).output.toFloat() * 1000).toLong()
|
).output.toFloat() * 1000).toLong()
|
||||||
fullTime =
|
fullTime =
|
||||||
((durationPerBatchInMilliseconds * (filePaths.size - 1)) + lastBatchTime).toFloat()
|
((durationPerBatchInMilliseconds * (filePaths.size - 1)) + lastBatchTime).toFloat()
|
||||||
|
*/
|
||||||
|
// We use an approximation for the duration of the batches
|
||||||
|
fullTime = (durationPerBatchInMilliseconds * filePaths.size).toFloat()
|
||||||
}
|
}
|
||||||
|
|
||||||
val outputFile = getOutputFileForFFmpeg(
|
val outputFile = getOutputFileForFFmpeg(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user