feat: Add metadata to audio file

This commit is contained in:
Myzel394 2023-08-05 20:56:55 +02:00
parent 0b9bb48fdc
commit 26b78ff485
No known key found for this signature in database
GPG Key ID: 79CC92F37B3E1A2B

View File

@ -112,7 +112,14 @@ class RecorderService: Service() {
return outputFile
}
val command = "-i \"concat:$paths\" -acodec copy $outputFile"
val command = "-i 'concat:$paths'" +
" -acodec copy" +
" -metadata title='$fileName' " +
" -metadata date='${recordingStart!!.format(ISO_DATE_TIME)}'" +
" -metadata batch_count='${filePaths.size}'" +
" -metadata batch_duration='${settings.intervalDuration}'" +
" -metadata max_duration='${settings.maxDuration}'" +
" $outputFile"
val session = FFmpegKit.execute(command)