kokorin / Jaffree

______ Stop the War in Ukraine! _______ Java ffmpeg and ffprobe command-line wrapper
Apache License 2.0
476 stars 82 forks source link

Process timeout #391

Closed jbensley closed 7 months ago

kokorin commented 7 months ago

@jbensley I checked your fork.

First of all, ffmpeg process should not be timed out as it can take different time for ffmpeg to process files. Timeout is set not for ffmpeg process, but for different supporting threads which interact with ffmpeg.

Second, I think you by "preInput" arguments you meant global arguments. There is no need to put global arguments before input (but I agree it make sense). With Jaffree you can use FFmpeg.addArgument(...) method to add global arguments.

jbensley commented 7 months ago

I accidentally opened a PR against this project, which is why I immediately closed it. For my own specific purposes I need the ffmpeg process to respect a timeout value, as it non-deterministically hangs in certain situations.

As for order of arguments, we have found that the process runs about an order of magnitude faster if the arguments are specified in a certain order. Speed is important for us (see above) but I was not expecting either of these changes to be directly applied to the main library branch. Apologies for the notification.