INFORMAÇÕES: [Parsed_subtitles_0 @ 00000204926e0340] Unable to parse option value "UsersIraniAppDataLocalTempvideosubtitle1f345c57-bd90-431e-80d2-c29d4d81b44718170660379795976944.srt" as image size
nov. 02, 2024 4:30:52 PM data.CommandRunnerImp runCommand$lambda$0
INFORMAÇÕES: Error applying option 'original_size' to filter 'subtitles': Invalid argument
nov. 02, 2024 4:30:52 PM data.CommandRunnerImp runCommand$lambda$0
INFORMAÇÕES: Error opening output file C:\Users\Irani\Desktop\noites brancas\Le.Notti.Bianche.1957.BLURAY.1080p.BluRay.x264.AAC-[YTS.MX]_with_subs.mp4.
nov. 02, 2024 4:30:52 PM data.CommandRunnerImp runCommand$lambda$0
INFORMAÇÕES: Error opening output files: Invalid argument
nov. 02, 2024 4:30:52 PM data.CommandRunnerImp runCommand
INFORMAÇÕES: process.errorStream: java.lang.ProcessBuilder$NullInputStream@10d68fcd
nov. 02, 2024 4:30:55 PM ui.JOptionPaneUserNotifier showError
GRAVE: Erro ao adicionar legendas
Process failed with exit code: -22

package ffmpeg

import data.CommandRunnerImp
import data.FileUtilities
import ffprobe.FfprobeStreams
import interfaces.Codecs
import interfaces.CommandRunner
import interfaces.Streams
import interfaces.SubtitleCodecs
import interfaces.VideoLegend
import ui.JOptionPaneUserNotifier
import ui.interfaces.UserNotifier
import java.io.File
import java.util.UUID
import java.util.logging.Logger

class FfmpegVideoSubtitle(
    private val commandRunner: CommandRunner = CommandRunnerImp(),
    private val streams: Streams = FfprobeStreams(),
    private val fileUtilities: FileUtilities = FileUtilities(),
    private val codecs: Codecs = FfmpegVideoCodecs(),
    private val userNotifier: UserNotifier = JOptionPaneUserNotifier(),
    private val subtitleCodecs: SubtitleCodecs = FfmpegSubtitleCodecs()
) : VideoLegend {
    private val logger = Logger.getLogger(this.javaClass.name)

    override fun buildAndRunCommand(videoFile: File, subtitleFile: File) {
        val videoBitrate = streams.getVideoBitrate(videoFile)

        val availableCodecs = codecs.getAvailableCodecs()

        val outputFile = fileUtilities.generateUniqueFileName(
            File(videoFile.parentFile, "${videoFile.nameWithoutExtension}_with_subs.mp4")
        )

        val targetSubtitleFile = File.createTempFile("videosubtitle${UUID.randomUUID()}", ".srt").also {
            it.deleteOnExit()
        }

        subtitleFile.copyTo(targetSubtitleFile, true)

        val charset = subtitleCodecs.charset(targetSubtitleFile)
        logger.info(charset.toString())

        val supportedSubtitleCodecs = subtitleCodecs.getSupportedSubtitleCodecs()

        if (charset.toString() !in supportedSubtitleCodecs) {
            subtitleCodecs.convertSubtitleIfNeeded(targetSubtitleFile, "srt", charset.toString())
        }

        val selectedCodec = userNotifier.codecSelection(availableCodecs)
        logger.info(selectedCodec)

        val command = arrayOf(
            "ffmpeg",
            "-i",
            videoFile.absolutePath,
            "-vf",
            "subtitles=${targetSubtitleFile.absolutePath}",
            "-c:v",
            selectedCodec,
            "-b:v",
            "$videoBitrate",
            "-preset",
            "slow",
            "-c:a",
            "copy",
            outputFile.absolutePath
        )

        commandRunner.runCommand(command, streams.getDuration(videoFile))
    }
}

como corrigir??