Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProgressListener nerver trigered but the video is in converting #332

Open
peihuanhuan opened this issue Jul 19, 2024 · 7 comments
Open

ProgressListener nerver trigered but the video is in converting #332

peihuanhuan opened this issue Jul 19, 2024 · 7 comments
Labels

Comments

@peihuanhuan
Copy link

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

image

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

@Euklios
Copy link
Collaborator

Euklios commented Aug 8, 2024

Thank you for the report!
This might be fixed by #315, but that one sadly hasn't been released yet

If possible, could you share some information about the file you're encoding? Especially the duration would be interesting.

@peihuanhuan
Copy link
Author

Thank you @Euklios , do we have a plan to release it?
I'm converting .m4s to .mp3 file.
It's a minute or two mostly, up to a couple hours, but they all have this problem.

@Euklios
Copy link
Collaborator

Euklios commented Aug 8, 2024

That's a hard question.
There is #319, which is technically ready, but releasing is a responsibility of @bramp .
The cleanest option would be going through him.

Alternatively: I used to be doing unofficial snapshot releases, I think I could get that back up for you

@peihuanhuan
Copy link
Author

Thank you @Euklios ! let's wait @bramp 's feedback first.

@Euklios
Copy link
Collaborator

Euklios commented Aug 8, 2024

Fine by me. I don't know how fast you need this fixed.

I just tried to create a test based on the code you provided, but couldn't re-create the issue.
Could you please try your code using the big_buck_bunny_720p_1mb.mp4 file from this repository?

Euklios added a commit to Euklios/ffmpeg-cli-wrapper that referenced this issue Aug 8, 2024
@peihuanhuan
Copy link
Author

peihuanhuan commented Aug 8, 2024

it's not a urgent ticket, let me have a try. but i think it will occur, it should be a ffmpeg version issue.

@peihuanhuan
Copy link
Author

for the big_buck_bunny_720p_1mb.mp4, there is no closing progress log, loss of information possible: Broken pipe error log or any other log, this video seems to short.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants