Open McPringle opened 3 years ago
That seems to be a bug in libx264? In any case, we can set the string value directly to whatever libx264 needs with, for example, FFmpegFrameRecorder.setVideoOption("crf", "24")
,
Thank you very much, for GPX Animator this setter solved the problem.
In my application I use the
FFmpegFrameRecorder
with the following configuration:Setting the video quality (
recorder.setVideoQuality(24);
) works or crashes based on the locale of the user. The error message states the reason very clearly:I JavaCV, the parameter of
setVideoQuality
is of typedouble
. libx264 parses the double value which works with an English locale, because an English locate uses the period.
character as a decimal separator. In other locales, like mine, the comma,
character is used as a decimal separator and the period separates the thousands (like 1.234,56).I'm using JavaCV 1.5.5 with Java 16.0.1 on macOS 11.4.
Steps to reproduce using the GPX Animator project:
Using the steps to reproduce above, the first run uses the English locale and is successful. The second run uses the Swiss-German locale and fails. The
it
target is my integration test. Don't omit theclean
, because Gradle caches the results and we don't change the source during the runs.If you need more information, please ask and I'm happy to provide any helpful answers.