bramp / ffmpeg-cli-wrapper

Java wrapper around the FFmpeg command line tool
BSD 2-Clause "Simplified" License
1.73k stars 413 forks source link

Bundle ffmpeg/ffprobe #284

Closed fingerguns83 closed 1 year ago

fingerguns83 commented 1 year ago

Is there any means to bundle ffmpeg/ffprobe in a resulting jar file? I've tried putting them in the resource path and referencing their relative path, but it doesn't seem to like that. Says it doesn't have permission. I know this isn't an "issue" per se, I'm just hoping someone has a solution

Euklios commented 1 year ago

The operating system neither knows nor cares about your jar files; this is all handled by the JVM instead. Therefore, executing an executable stored within the JAR file is only possible by extracting it to another location outside of the jar file.

See the following SO question as a reference: https://stackoverflow.com/questions/600146/run-exe-which-is-packaged-inside-jar-file

Also, please make the file executable after extracting unless you only target Windows systems.

bramp commented 1 year ago

Thanks, yes it looks like Stackoverflow is the place to resolve this question.