-
-
Notifications
You must be signed in to change notification settings - Fork 425
Open
Labels
Description
Describe the bug
ProgressListener nerver trigered but the video is in converting.
found the error log: Error closing progress log, loss of information possible: Broken pipe
To Reproduce
fun ffmpeg(inputPath: String, outputPath: String, byteRate: Long) {
val ffmpeg = FFmpeg("ffmpeg")
val ffprobe = FFprobe("ffprobe")
val inputProbe = ffprobe.probe(inputPath)
val builder = FFmpegBuilder()
.setInput(inputPath) // Filename, or a FFmpegProbeResult
.overrideOutputFiles(true) // Override the output if it exists
.addOutput(outputPath) // Filename for the destination
.setAudioBitRate(byteRate * 1024) // at 32 kbit/s
.done()
val executor = FFmpegExecutor(ffmpeg, ffprobe)
executor.createJob(builder) { progress ->
val duration_ns: Double = inputProbe.getFormat().duration * TimeUnit.SECONDS.toNanos(1)
val percentage = progress.out_time_ns / duration_ns
log.info(String.format(
"[%.0f%%] time:%s ms status:%s frame:%d fps:%.0f speed:%.2fx",
percentage * 100,
FFmpegUtils.toTimecode(progress.out_time_ns, TimeUnit.NANOSECONDS),
progress.status,
progress.frame,
progress.fps,
progress.speed
));
}.run()
}
Expected behavior
A clear and concise description of what you expected to happen.
Version (if applicable):
- OS: Linux version 6.4.16-linuxkit ubuntu
- Java Version: 1.8
- FFmpeg version: 6.1.1-3ubuntu5
- sdk version: 0.8.0
Additional context
my dockerfile:
FROM ubuntu
RUN apt-get update -y
RUN apt-get install ffmpeg -y
icguy
