Kitware / fletch

Computer Vision Software Development Environment
63 stars 54 forks source link

Add x264 support #703

Closed daniel-riehm closed 2 years ago

daniel-riehm commented 2 years ago

Add the x264 library (for encoding H.264 video) as a fletch module and hook it up to FFmpeg. I have confirmed that this works (compiles AND produces valid H.264 video in KWIVER) on my Linux machine. However, since we don't build FFmpeg from source on Windows, instead downloading pre-built binaries, we can't hook x264 up to it in fletch. From my understanding, we would need to create new versions of these binaries with x264 support enabled. Probably repeat the process for x265 if / when we ever get to it. @chetnieter - do you have any comment on this?

x264 is under a GPL license. Don't know if that matters for anything.

chetnieter commented 2 years ago

We did not create the pre-built windows binaries hosted on data.kitware.com, they were pulled from other sites on the web. The latest 4.4.1 builds came from https://www.gyan.dev/ffmpeg/builds/. @mleotta may know more about that.

mleotta commented 2 years ago

All I know is that years ago we decided that it was far to tricky to build ffmpeg on Windows in Fletch. It does not use CMake and I think it will not build with Visual Studio. So the solution was to pull down pre-built binaries. It's possible that could manually make and host our own ffmpeg windows binaries with the options and/or patches that we need, but we haven't don't that before.

daniel-riehm commented 2 years ago

I've pushed changes which work on the Windows machine I have access to, by switching to building FFmpeg from source. This is accomplished by using the MSYS2/MINGW64 environment, which lets FFmpeg use Linux utilities (e.g. make) while still producing Windows output libraries (.dll). This is probably the process the creator of the pre-built binaries used. But now we can configure FFmpeg however we want, including building against x264! For right now, only FFmpeg v4.4.1 works with x264 - there's probably an older version of x264 out there that works with FFmpeg 3.3.3, but I haven't gone to the trouble of identifying it.

Could someone with Jenkins permissions run CI on this?

mleotta commented 2 years ago

jenkins please test this

mleotta commented 2 years ago

jenkins please test this

mleotta commented 2 years ago

jenkins test this please

mleotta commented 2 years ago

jenkins test this please

mleotta commented 2 years ago

jenkins test this please

daniel-riehm commented 2 years ago

jenkins test this please

daniel-riehm commented 2 years ago

jenkins test this please

daniel-riehm commented 2 years ago

jenkins test this please

daniel-riehm commented 2 years ago

jenkins test this please

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Linux build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Centos build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Mac build succeeded.

daniel-riehm commented 2 years ago

jenkins test this please

daniel-riehm commented 2 years ago

jenkins test this please

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Centos build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Linux build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Mac build succeeded.

daniel-riehm commented 2 years ago

jenkins test this please

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Centos build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Linux build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Mac build succeeded.

daniel-riehm commented 2 years ago

jenkins test this please

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Centos build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Linux build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Mac build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Linux build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Centos build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Mac build succeeded.

daniel-riehm commented 2 years ago

jenkins test this please

daniel-riehm commented 2 years ago

jenkins test this please

daniel-riehm commented 2 years ago

jenkins test this please

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Linux build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Centos build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Mac build succeeded.

daniel-riehm commented 2 years ago

jenkins test this please

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Centos build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Mac build succeeded.

daniel-riehm commented 2 years ago

jenkins test this please

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Centos build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Linux build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Mac build succeeded.

daniel-riehm commented 2 years ago

jenkins test this please

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Linux build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Centos build succeeded.

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Mac build succeeded.

daniel-riehm commented 2 years ago

jenkins test this please

kwcvrobot commented 2 years ago

Fletch KWIVER against Fletch Linux build succeeded.