brarcher / video-transcoder

Android app for video and audio transcoder, based on FFmpeg
GNU General Public License v3.0
480 stars 57 forks source link

Add X265 support #35

Open nulledone opened 6 years ago

brarcher commented 6 years ago

If someone is interested in contributing X265 support (if I do not get to it) the following needs to be done:

anotherdirtbag commented 6 years ago

It looks like most of the work will be centered here: https://github.com/bravobit/FFmpeg-Android/issues/12 Adding x265 to video-transcoder's menus is simple enough, but ffmpeg and the x265 library need to be rebuilt and pushed to the above library. https://github.com/anotherdirtbag/video-transcoder/commit/be0b9153ff0bef7ac20c4941c6aa74672e6889a2

brarcher commented 6 years ago

Bummer. I suspect I'll need to create my own fork of FFmpeg-Android at some point to (1) build architecture-specific binaries instead of shipping all architectures in one apk, and (2) enable FFmpeg features as needed. I'm not looking forward to it, though. (:

anotherdirtbag commented 6 years ago

i'm working on the rebuild now. I've built ffmpeg from sources before, but never attempted cross-compiling for java. also, that library uses a binary that was custom built by the author. The closest source for that I could find was https://github.com/WritingMinds/ffmpeg-android which hasn't been updated in over a year. here's my attempt at it so far https://github.com/anotherdirtbag/ffmpeg-android-1. I'm new to 'make' and cross-compiling, so this is a bit of an adventure.

brarcher commented 6 years ago

Thanks for taking a look, @anotherdirtbag. I'm also taking a shot at it. For right now I trying to reproduce a build on macOS before going further and get it building on Travis-CI. I was not able to build your fork from a few issues, one in the x265 build script. If you do get to a good stopping point, let me know and I'll see if there are any changes I can suggest.

brarcher commented 6 years ago

@anotherdirtbag, I've finished creating a fork of both the ffmpeg binaries (https://github.com/brarcher/ffmpeg-android) and the java wrappers (https://github.com/brarcher/ffmpeg-android-java). The ffmpeg-android project builds x86 and arm on Travis-CIto ensure it builds successfully, and the Video Transcoder project has automated tests to ensure that encoding files works as expected. The Video Transcoder project is also setup to use the ffmpeg-android-java fork library, though updating it is a manual process (e.g. checking in a new aar file).

X265 support has not been added to ffmpeg-android yet. If you are far enough along that you have that figured out, feel free to post some merge requests. Otherwise, I'll look into it as time allows. If you do, kindly add one request per new format, if possible.

wnpllrzodiac commented 5 years ago

SHOULD build ffmpeg with libx265. I have got it.