-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FFmpegFrameRecorder setFormat H265/HEVC #41
Comments
We would have to compile x265 and link it to FFmpeg. Would you be interested in working on this? It would require modifying the |
I'm interested in working on this but I'm afraid I have moderate experience in this. I remember when you compiled x264 and ffmpeg :). I'll try and see what I can do |
Great! Let me know if you run into any problems |
I've put the x265 files in the correct Android NDK arch-arm folders. I'm currently trying to compile ffmpeg to make the .so files. I'm using ffmpeg 2.2.9. It takes around 15 mins to compile but I don't think it's working correctly as it says the folders/commands aren't found :/. This is my build script #!/bin/bash NDK=~/Downloads/android-ndk-r10c |
Try to use the |
I've used the cppbuild.sh script and that created the native libraries within the cppbuild/android-arm folder. Now I'm trying to run |
Does it do the same with the source code from the |
Well develop branch gives the following: [WARNING] The POM for org.bytedeco:javacpp:jar:0.9.1-SNAPSHOT is missing, no dependency information available Changing the version in the pom file to simply '0.9' gives the same could not parse message |
That means you also need to install the |
Ok, I get the same could not parse error. |
Well, it works here. Can you let me know the exact sequence of |
Alright here's what I'm doing:
I actually cppbuilded all projects, not just ffmpeg. Here is where the could not parse error is shown. If I try a maven install on opencv I get a similar error: Thanks |
Running And you'll need to specify the directory of the NDK for the export ANDROID_NDK=~/Downloads/android-ndk-r10c/
bash cppbuild.sh -platform android-arm install ffmpeg
mvn install -Pandroid-arm -Dplatform.root=$ANDROID_NDK --projects ffmpeg |
Thanks, that's fixed but now later on in the build process I'm getting this error but the file does exist. [ERROR] Failed to execute goal org.bytedeco:javacpp:0.9.1-SNAPSHOT:build (process-classes) on project ffmpeg: Failed to execute JavaCPP Builder: Cannot run program "toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++": error=2, No such file or directory -> [Help 1] |
What's the command you used for |
I managed to get past that by setting Next error... :( It seems to be looking at the |
As explained above, we need to specify the
|
FYI, work started for x265 support here: bytedeco/javacpp-presets@778d34b |
Thanks Sam, I started work on this too but lost track. I'll try and have a look again. |
x265 is now included in version 0.11. Thanks for your effort, it helped a lot!! Let me know if you see anything wrong with the current build. |
Hi Sam, Just compiled latest version 0.11 and when calling I'm having a look into it. |
Ok, thanks! Let me know what you find out. |
Hi Peter, did you find the solution. I am facing the same issue. I am using version 0.11 on Nexus 5 with lollipop. |
Could you guys try on Linux or Mac OS X and let me know if it works or not? It would help, thanks |
I dont have access to any Macs, I will try on Linux and let you know. |
I didn't find a solution but the codecs (encoder & decoder) were definitely there. But it still would not load. I'm away at the moment but didn't try on Linux. Only android. |
I tried on Linux (ubuntu 14.04 LTS). I converted a h264 video to HEVC using FFmpegFrameGrabber and FFmpegFrameRecorder and it works. |
So it works on Linux, but not on Android? Strange...
|
A bit of strangeness is remaining. Let me check it out on Mac.
|
Does the same thing happen with FFmpeg 2.7 and x265 1.7 recently updated in the presets? |
Latest git downloaded and built. This does not work But this appears to. Very odd. |
Sounds like a bug to report upstream :)
|
Is HEVC encoder supported? |
I'd like to change the video codec to H265 (AV_CODEC_ID_H265) instead of (AV_CODEC_ID_MPEG4) for large resolution videos. The following gives me avcodec_find_encoder() error, Video codec not found. How can I add this video codec?
recorder.setVideoCodec(org.bytedeco.javacpp.avcodec.AV_CODEC_ID_H265);
recorder.setFormat("mp4");
recorder.setPixelFormat(org.bytedeco.javacpp.avutil.AV_PIX_FMT_YUV420P);
recorder.setFrameRate(24);
recorder.setVideoQuality(0);
The text was updated successfully, but these errors were encountered: