Skip to content
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

MIOpenX ffmpeg7 support #149

Open
lamikr opened this issue Aug 28, 2024 · 5 comments
Open

MIOpenX ffmpeg7 support #149

lamikr opened this issue Aug 28, 2024 · 5 comments

Comments

@lamikr
Copy link
Owner

lamikr commented Aug 28, 2024

@jeroen-mostert I created the binfo/extra/amd_media.blist which builds some amd media apps
on top of the basic rocm sdk library. Originally the included MIVisionX builds only against the ffmpeg4 but I patched it to at least build against the ffmpeg5 and I can also test it against the ffmpeg6 later.

Would you be able to test whether it works with archlinux/ffmpeg7.

ffmpeg patch is this one: patches/rocm-6.1.2/MIVisionX/0003-ffmpeg5-6-build-fixes.patch

@jeroen-mostert
Copy link
Contributor

Do you happen to know of code or an application that will definitely exercise the FFmpeg path? I have no experience using any of this and while MIVisionX has some sample apps, it's not clear to me if they all use FFmpeg under the covers. Just testing if it builds or links should be trivial, but that doesn't say much. PS. there is no amd_media.blist in the main branch, just the MIVisionX.binfo.

@jeroen-mostert
Copy link
Contributor

jeroen-mostert commented Aug 28, 2024

Re: building, currently I just get a bunch of "undefined reference" linker errors in libopencv_viz, because it seems to latch on to my system's OpenCV libs rather than the ones it's supposed to build itself. This may be an issue with priority of the library directories.

Edit: apparently it also needs vtk, which is an optional dependency. So for Arch/Manjaro, the extra deps are either opencv vtk, or neither of these if building without OpenCV support.

@jeroen-mostert
Copy link
Contributor

The only sample I could find that (seems) to use ffmpeg through amd_media is mv_objdetect... which doesn't build due to a missing source file. The amd_media extension itself only shows an "example gdf". Apparently that's an OpenVX graph, but I'm not going to immerse myself into this whole vision stack any time soon.

@lamikr
Copy link
Owner Author

lamikr commented Aug 29, 2024

Ok, I needed myself to install the lmdb-devel and opencv-devel to get the MIVisionX to build.
Then in addition I needed to add the rapidjson.binfo to get it build also for MIVisionX as at least the fedora and mageia too old release from 2014 while the api changes required has happened to rapidjson on 2015.
Funny thing that this rapidjson seems to be still in active development and latest version from master branch was good for the MIVisionX, they just have not made any releases for distros to pick up for 10 years. I think it would make sense for them to switch to some other json library which provides stable version to build against.

Anyway, after I got the MIVisionX to build, I tested it by building and running the edge detection test app
/opt/rocm_sdk_612/share/mivisionx/samples/gdf which seemed to work ok. Not sure whether there are any ffmpeg/video encoding examples.

I am now focusing to MIVisionX spinoff project project named rocAI to check whether it would provide something interesting apps o use. It can operate with different backends like pytorch(caffe) and tf, but unfortunately it's missing the plugin type of approach and expects that all of those are present while building. Plus it's ffmpeg api usage relies also to angient ffmpeg 4.

I just do not like to build the tensorflow due to it's usage of bazel build system, so I have modifying the rocAI sources to check whether it would make sense to have the tensorflow dependency optional.
Even if I could get it build on my distros ok, it's way of relying to bazel which allows all kind of non-tradidional hacks during the build time may make it hard to support building tensorflow on all distros we want.

@jeroen-mostert
Copy link
Contributor

I didn't check the lmdb dependency; one "problem" with my Manjaro installation has is that it's a daily driver and so there's a lot of stuff installed already (including lmdb, as part of dbus, which is in turn part of some other applications). So yeah, lmdb also needs installing on Arch/Manjaro. A proper dependency list requires a clean installation, but there's only so many hours in the day to rebuild everything cleanly from scratch. :P Maybe with some generous sponsorship we can set up CI pipelines for every distro under the sun...

rapidjson is not installed on my distro, but the version available is the "latest" (that is, 1.1.0 from 2016).

The gdf samples (through runvx) do run on my machine and load the libav* libs of FFmpeg, so I guess we can call that a pass until and unless there's a contraindication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@lamikr @jeroen-mostert and others