conda-forge / ffmpeg-feedstock

A conda-smithy repository for ffmpeg.
BSD 3-Clause "New" or "Revised" License
14 stars 44 forks source link

Added OpenVINO 2.0 support for FFMPEG (avfilter) #223

Closed ilya-lavrenov closed 8 months ago

ilya-lavrenov commented 10 months ago

Checklist

conda-forge-webservices[bot] commented 10 months ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

ilya-lavrenov commented 8 months ago

@conda-forge-admin, please rerender

ilya-lavrenov commented 8 months ago

@conda-forge-admin, please rerender

ilya-lavrenov commented 8 months ago

@conda-forge-admin, please rerender

hmaarrfk commented 8 months ago

i think you had it right at some point, just the windows libraries are never in a standard location nor do they have "standard" names.

So typically you have to "help" windows find them.

Many projects have somewhat refused our pkg-config files so we are stuck with often specifying configuration arguments.

ilya-lavrenov commented 8 months ago

@conda-forge-admin, please rerender

github-actions[bot] commented 8 months ago

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you but ran into some issues. Please check the output logs of the latest rerendering GitHub actions workflow run for errors. You can also ping conda-forge/core for further assistance or try re-rendering locally.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/ffmpeg-feedstock/actions/runs/7498732569.

ilya-lavrenov commented 8 months ago

@conda-forge-admin, please rerender

hmaarrfk commented 8 months ago

is the run export not setup correctly in libopenvino:

2024-01-12T11:33:16.5581706Z WARNING (ffmpeg,lib/libavfilter.so.9): Needed DSO lib/libopenvino_c.so.2320 found in ['conda-forge/linux-64::libopenvino==2023.2.0=h59595ed_0']
2024-01-12T11:33:16.5582483Z WARNING (ffmpeg,lib/libavfilter.so.9): .. but ['conda-forge/linux-64::libopenvino==2023.2.0=h59595ed_0'] not in reqs/run, (i.e. it is overlinking) (likely) or a missing dependency (less likely)
ilya-lavrenov commented 8 months ago

is the run export not setup correctly in libopenvino:

2024-01-12T11:33:16.5581706Z WARNING (ffmpeg,lib/libavfilter.so.9): Needed DSO lib/libopenvino_c.so.2320 found in ['conda-forge/linux-64::libopenvino==2023.2.0=h59595ed_0']
2024-01-12T11:33:16.5582483Z WARNING (ffmpeg,lib/libavfilter.so.9): .. but ['conda-forge/linux-64::libopenvino==2023.2.0=h59595ed_0'] not in reqs/run, (i.e. it is overlinking) (likely) or a missing dependency (less likely)

good finding. libopenvino-dev exports via run_exports a list of plugins and frontends, which depend on libopenvino. So, finally libopenvino will be installed as a transitive dependency via plugins, frontends.

But to avoid this warning, I've explicitly added libopenvino to run_exports for libopenvino-dev https://github.com/conda-forge/openvino-feedstock/pull/61/files#diff-f3725a55bf339595bf865fec73bda8ac99f283b0810c205442021f29c06eea9aR551

ilya-lavrenov commented 8 months ago

@hmaarrfk do you know why old packages are installed?

    libopenvino:                          2023.2.0-h59595ed_0       conda-forge
    libopenvino-auto-batch-plugin:        2023.2.0-h59595ed_0       conda-forge
    libopenvino-auto-plugin:              2023.2.0-h59595ed_0       conda-forge
    libopenvino-dev:                      2023.2.0-hb80d9b1_0       conda-forge
    libopenvino-hetero-plugin:            2023.2.0-h59595ed_0       conda-forge
    libopenvino-intel-cpu-plugin:         2023.2.0-h59595ed_0       conda-forge
    libopenvino-intel-gpu-plugin:         2023.2.0-h59595ed_0       conda-forge
    libopenvino-ir-frontend:              2023.2.0-h59595ed_0       conda-forge
    libopenvino-onnx-frontend:            2023.2.0-h59595ed_0       conda-forge
    libopenvino-paddle-frontend:          2023.2.0-h59595ed_0       conda-forge
    libopenvino-pytorch-frontend:         2023.2.0-h59595ed_0       conda-forge
    libopenvino-tensorflow-frontend:      2023.2.0-h59595ed_0       conda-forge
    libopenvino-tensorflow-lite-frontend: 2023.2.0-h59595ed_0       conda-forge

Latest version is py312h53d5487_2.conda

hmaarrfk commented 8 months ago

well one of my theories was protobuf, but it doesn't seem like protobuf is installed at all.

If you have a linux machine, you can "slowly" add the dependencies and see when it "fails" or "downgrades"

That is typically my strategy.

hmaarrfk commented 8 months ago

Doing the above:

mamba env create --name ffmpeg=6.1.1
mamba activate ffmpeg
mamba install libopenvino

revelease that libxml2 is the culprit.

mamba repoquery whoneeds libxml2

reveals that we will need to push the migration forward https://github.com/conda-forge/libhwloc-feedstock/pull/73

hmaarrfk commented 8 months ago

@conda-forge-admin please rerender

hmaarrfk commented 8 months ago

ok seems like it is picking up the new version now.

hmaarrfk commented 8 months ago

if one has filters, do they have to "opt-in" to use openvino, or will openvino automatically use "special hardware" instead of the CPU?

ilya-lavrenov commented 8 months ago

if one has filters, do they have to "opt-in" to use openvino, or will openvino automatically use "special hardware" instead of the CPU?

According to https://www.phoronix.com/news/FFmpeg-OpenVINO-GPU:

The default behavior for now with FFmpeg OpenVINO support is CPU-based inference.

So, by default all DNN workloads are optimized on CPU, while GPU can also be used together with HW decoders