开发者

How to show progressbar for FFMPEG process in java

I am merging two files using FFMPEG command in java. I want to 开发者_C百科show a progressbar for the conversion process. How can I achieve this.

FFMpeg Command:

ffmpeg -i audioFile -i videoFile -sameq -vcodec libx264 -r10 -ar 44100 -y -async 1 -crf 30 -b 500K outputFile

I am using ProcessBuilder to execute this command in a separate thread. Everything is working fine. Now I just want to show the progressbar for this process.

Could someone please guide me on this.

Thanks.


Expanding on what you can find here: Can ffmpeg show a progress bar?

You should use process.getErrorStream() to get the stream and read in the progress information. When ever you see a progress message, you can make the respective change to your progress bar.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜