0

I am using ffmpeg in my java project with javacpp-presets. I want to be able to edit the ffmpeg and libx264 for my needs. I edited the ffmpeg and libx264 source codes, compiled it and use it successfully through the command line. now I want to use the new source code within my java code using the javacpp-preset. how do I configure the javacpp-preset to work with my version of ffmpeg?

Gitty
  • 11
  • 6
  • I suggest you edit your question to clarify... What command line terminal (Linux? Windows? Mac?). To have that command line app share a connection with your Java code you need to use **ProcessBuilder**. But you also tagged JavaCPP which sounds like you want to import the (uncompiled) C++ source code of ffmpeg and use. **So please clarify..** You want to connect the already installed ffmpeg (.exe?) to work with your code? (= no JavaCPP needed).. Or really using JavaCPP you want to compile some C++ within Java? Also try google for tutorials first and then show any problem code here – VC.One Feb 07 '16 at 23:08
  • If just connecting.. try **[this tutorial](http://alvinalexander.com/java/java-exec-processbuilder-process-1)**. The converted video bytes will be available via Standard OutPut (**stdout**) and you can get some feedback via Standard Error (**stderr**). Instead of outputting a file on disk it send the bytes to your Java app and you do whatever... – VC.One Feb 07 '16 at 23:16
  • 1
    I edited the question to be more clear, I want to be able to control (use/debug) the ffmpeg c code through my java application. – Gitty Feb 08 '16 at 14:57
  • `how do I configure the javacpp-preset to work with my version of ffmpeg` if you kept the source file names the same then it should work just as it did before you edited them, only difference is now in your java code you can work with the code "edits" since you know what they are. I feel am missing your point, sorry – VC.One Feb 08 '16 at 15:41
  • 1
    thank you for trying to help. I found what I was missing. I have to rebuild the javacpp-presets in order to have control on the ffmpeg that it uses. javacpp-prests have good instructions on how to build the project. https://github.com/bytedeco/javacpp-presets – Gitty Feb 08 '16 at 19:23

0 Answers0