bytedeco / javacpp-presets

The missing Java distribution of native C++ libraries
Other
2.68k stars 744 forks source link

ffmpeg encoding crashes when a video profile is set #1550

Open b005t3r opened 1 week ago

b005t3r commented 1 week ago

When encoding with the new release, I get this error:

Error: [libx264 @ 0x7f9ec011f2c0] [Eval @ 0x309c69968] Undefined constant or missing '(' in 'high'

Error: [libx264 @ 0x7f9ec011f2c0] Unable to parse option value "high"

Error: [libx264 @ 0x7f9ec011f2c0] Error setting option profile to value high.

It looks like an issue with ffmpeg 7.1, but I'm not certain about that, wasn't able to reproduce with the command line static builds for macOS (7.1 and the one from 2024-11-15 both work with no issues, so maybe just a libav issue?), but definitelly everything worked fine with 1.5.10.

b005t3r commented 1 week ago

Update: it does work when setting the profile using a numerical value instead (tested "100" which is "high" for both h264_videotoolbox and libx264).

b005t3r commented 1 week ago

Another update: this trick with numerical values does not work for dnxhd for somre reason, which makes it impossible to select the dnxhr_hq profile, which in turn makes it impossible to encode anything about 1080p.

I think the best bet would be to build and older version of ffmpeg for the official release, as this is a pretty serious issue, however ideally still something 7.x, because 6.x (used in 1.5.10) had another major issue with ProRes (transparency didn't work on the most recent macOS).

saudet commented 1 week ago

Please try with this patch: https://github.com/HandBrake/HandBrake/issues/6340#issuecomment-2472444059