I have been using this tooling for a couple of years. After a painful learning curve I was able to get a compiled version of this working for RHEL5 and Java 6 a couple of years ago. It's been working great. Recently though I ran across an issue where the encoding for h264 wasn't working. I thought I had compiled in support for it two years ago when I originally built the binaries and jar but apparently I didn't because I get this error when I run my app:
org.bytedeco.javacv.FrameRecorder$Exception: avcodec_find_encoder() error: Video codec not found.
at org.bytedeco.javacv.FFmpegFrameRecorder.startUnsafe(FFmpegFrameRecorder.java:333)
at org.bytedeco.javacv.FFmpegFrameRecorder.start(FFmpegFrameRecorder.java:273)
at org.bsfinternational.filemgr.MergeUsingFFMPEG.run(MergeUsingFFMPEG.java:237)
at java.lang.Thread.run(Thread.java:662)
The codec is #28
So I decided to go ahead an rebuild ffmpeg with h264 enabled. Fortunately I had preserved the original compile environment in a VM so I didn't have to walk through all the details to get a RHEL5 compile environment set up. All *seems* well but when I run cppbuild,sh in javacpp-presets to build ffmpeg 2.2.1 I see the following errors:
LD ffmpeg_g
libavcodec/libavcodec.so: undefined reference to `x264_encoder_open_142'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
make: *** Waiting for unfinished jobs....
LD ffplay_g
libavcodec/libavcodec.so: undefined reference to `x264_encoder_open_142'
collect2: ld returned 1 exit status
make: *** [ffplay_g] Error 1
The final entry in the listing is:
LD ffmpeg_g
libavcodec/libavcodec.so: undefined reference to `x264_encoder_open_142'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
A little research says this is an issue with an older set of libraries being referenced but the only libraries I can find are the ones built by cppbuild with the current date and time. If I remove the reference to --enable-libx264 in the build script, it compiles and builds just fine.
It has been a while since I have done this so I must have missed something. Ideas? I understand I am running an "old" version here but I have to compile in RHEL5 and use Java 6.
Thanks