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

ffmpeg support for v2.0 API and Homebrew #753

Closed
5 tasks
slhck opened this issue Dec 8, 2020 · 10 comments
Closed
5 tasks

ffmpeg support for v2.0 API and Homebrew #753

slhck opened this issue Dec 8, 2020 · 10 comments

Comments

@slhck
Copy link
Contributor

slhck commented Dec 8, 2020

I see that FFmpeg does not support the v2.0 API yet. Are there plans to add support for it, perhaps in a backwards-compatible manner? (That is, switching to the old API if libvmaf is <2.0.)

Only if FFmpeg supports it, libvmaf can be bumped in Homebrew. If there's no support, bumping in Homebrew will mean that compiling ffmpeg with --enable-libvmaf will fail, which would break custom builds.

So IMO the steps would be:

  • Add support for libvmaf 2.0 in FFmpeg
  • Wait for stable FFmpeg release
  • Bump FFmpeg in Homebrew
  • Bump libvmaf in Homebrew
    • Fix the applied patch
@kylophone
Copy link
Collaborator

The current libvmaf ffmpeg works as-is still since the old api call compute_vmaf() Is still supported. That being said, I will be working on an updated filter this week to take advantage of v2.0.0 which I will be sending to ffmpeg-devel. When that is in-progress/done, I will provide updates via this issue.

Packaging libvmaf now should hopefully be a lot less painful now. We are not providing default model files as part of the installation anymore, since built-in models are available. This should solve problems like this: #324 (comment).

@slhck
Copy link
Contributor Author

slhck commented Dec 8, 2020

Thanks for the heads-up! I didn't see that there was support for the old API call. That means we can safely update libvmaf on Homebrew though. I'll check out the failing PR later.

Packaging libvmaf now should hopefully be a lot less painful now

Yeah, I saw that – very nice! Good that the models are JSON now, too.

@vans163
Copy link

vans163 commented Dec 9, 2020

To add to this, it seems VMAF changed the build system around and I cannot seem to build a version of FFMPEG with VMAF statically compiled, it keeps trying to load the libvmaf.so.1 when ffmpeg or ffprobe run now. I even tried the new instructions to build the static lib and indeed i get the static lib and shared built, but FFMPEG keeps trying to want the dynamic one.

(this is a build for podman)

RUN cd ~/ffmpeg_sources && \
    wget -q https://github.com/Netflix/vmaf/archive/v2.0.0.zip -O vmaf-2.0.0.zip && \
    unzip -qq vmaf-2.0.0.zip && cd vmaf-2.0.0 && \
    export PATH="$HOME/ffmpeg_bin:$PATH" && \
    cd libvmaf && \
    meson setup --default-library=static --buildtype=release --prefix="/root/ffmpeg_bin" --libdir=lib build && \
    ninja -vC build && \
    cp build/src/libvmaf.* /root/ffmpeg_build/lib/

@1480c1
Copy link
Contributor

1480c1 commented Dec 9, 2020

you might want to try to brute force it then and delete the shared library

@slhck
Copy link
Contributor Author

slhck commented Dec 9, 2020

This is a bit unrelated to this issue though. Could you open a separate issue please?

@gdavila
Copy link

gdavila commented Dec 10, 2020

When ffmpeg already support v2.0 API, Will “No Enhancement Gain” mode be available through ffmpeg?

@slhck
Copy link
Contributor Author

slhck commented Dec 10, 2020

@gdavila The NEG variant is a model like the others and can be selected freely.

@luigi311
Copy link

@kylophone
Any update on the new ffmpeg patch to use vmaf 2.0 apis and use the builtin model by default?

@pdaga2
Copy link

pdaga2 commented Apr 30, 2021

Any further update on this?

@slhck
Copy link
Contributor Author

slhck commented Jul 29, 2022

This all seems to work now. I am using FFmpeg 5.1 with libvmaf 2.3.1 and I can use all the new model options and features.

@slhck slhck closed this as completed Jul 29, 2022
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

7 participants