-
Notifications
You must be signed in to change notification settings - Fork 749
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
Run VMAF Library in FFMPEG #111
Comments
@ashk43712 |
Hi @ecomte , configure file is there inside FFmpeg/ so if you want to run vmaf using FFmpeg first install libvmaf library using make install and then from the root directory of FFmpeg (which is FFmpeg/) do ./configure --enable-libvmaf . After that do make install. Run vmaf through FFmpeg using the following command: |
Hi. Thank you for your quick response, I greatly appreciate it. Will I have to do make install libvmaf from an external source, or is the library included in the FFmpeg development package? Thanks. |
Hi @ecomte, FFmpeg only links to libvmaf, the library itself is not included in the FFmpeg development package. You can install libvmaf from Netflix's VMAF package (this repo) using make and then make install. |
Hi @ashk43712. I was able to successfully install libvmaf. After installing, I "cd'ed" into the root FFmpeg directory and ran "./configure --enable-libvmaf". It gave the following error: "ERROR: libvmaf not found using pkg-config". Do you happen to have any idea what this could be? I was wondering if it could be an issue with how I have my CentOS machine set up, or if it is a problem with FFmpeg and the newly installed libvmaf. Thanks. |
@i have same issues too. and my vmaf version is 1.3.1 thanks |
Hi @chuanY , can you mention your issues? |
when i run "./configure --enable-libvmaf" , i get "ERROR: libvmaf not found using pkg-config" issues |
Hi, @ecomte and @chuanY . Can you check if the pkg-config file (libvmaf.pc) is copied inside /usr/local/lib/pkgconfig/ after running make install. Can you also check if the library (libvmaf.a) and the |
I checked all of those directories and they are containing the correct files. I tried running sudo make install, and then './configure --enable-libvmaf' and still got the same results: "ERROR: libvmaf not found using pkg-config". @chuanY, let me know what you find out, I'm curious to see. Maybe it is an issue with my machine, but I will wait for an update to see if you're still having the same issues. |
Hi @ecomte and @chuanY, can you check the default path of your system's pkg-config files (using "pkg-config --variable pc_path pkg-config" or similar commands). Can you try moving libvmaf.pc at one of these paths and see if it works. |
hi @ashk43712 @ecomte i fixed by i use latest master branch code, not 1.3.1 release tag, and i success |
Was able to configure ffmpeg with vmaf. Check ffbuild/config.log - you may need to set PKG_CONFIG_PATH. |
So, just to summarize, for VMAF:
For FFmpeg:
|
Has anyone tried executing the vmaf command itself through ffmpeg? I've been trying based on the description https://ffmpeg.org/ffmpeg-filters.html#libvmaf, but not successful so far. |
@nandakd If you're having issues, you need to show exactly what you've been doing and what output / errors you are getting. When you say that you were "not successful", that's not really a proper problem description. |
I tried the exact examples mentioned on that ffmpeg page, and got an ffmpeg segmentation fault. I then tried using ffmpeg2vmaf, which worked, but does not support specifying a log file - need to use stdout/stderr redirecting . ffmpeg2vmaf also exits with this weird tty error, where echo is turned off (needs a reset). |
Same here – I've reported it on the FFmpeg bug tracker |
Hi everyone, I have started looking into the issues. I'll try to resolve them as soon as possible. |
The segfault from ffmpeg bug #6691 is now fixed since 4c38aa79ece4fa0ea7533774197d6408d7d3b9e5. |
I've compiled libvmaf on Windows for integration with FFmpeg, so to clarify on what @slhck said above , python and its packages are not required in order to compile either the static libvmaf.a library or the standalone vmafossexec tool. |
@ashk43712 Any idea? How to compare 2 yuv files? |
That's an ffmpeg issue, not VMAF. The short answer is that since the inputs are raw, there's no metadata to inform ffmpeg about the properties of the input. ffmpeg needs that to initialize the decoder. For raw YUV, you'll have to specify the resolution, frame rate and pixel format for each input e.g. |
@GyanD 👍 |
still get segmentation fault at centos run ffmpeg @rbultje |
The patch isn't in ffmpeg yet, so you're probably running the old version. |
@rbultje what's time patch can be include as ffmpeg main branch |
This was merged mid-december: http://git.videolan.org/?p=ffmpeg.git;a=commit;h=df3222d4bb18cbceda443def17b1b29067ed6e3f |
my server has 16 cores,but when run libvmaf(do vmaf or psnr or ssim) filter only use one,is there a problem? #131 CentOS + ffmpeg4.0 + glibc2.17 |
http://ffmpeg.org/pipermail/ffmpeg-devel/2018-April/229205.html contains a suggested fix for the pthread_join() issue in ffmpeg. Kevin |
Above patch available at https://patchwork.ffmpeg.org/patch/8699/ |
Hi, |
FFmpeg contains a wrapper for VMAF, but the library is separate and has to be linked. Pass However, at the present time, I believe ffmpeg build with libvmaf HEAD will fail as the VMAF API has changed and the wrapper hasn't been updated. |
Hi Gyan, At https://github.com/Netflix/vmaf , I see the instructions for getting the vmaf only for linux and mac os. Any idea what I need to do to get the vmaf tool on Windows. Is there any repository where the compiled version of the tool is present for Windows OS? ( As no instructions are mentioned for Windows OS, I am just worried whether there will be quite a few prerequisites for building it on windows..) Thanks |
There is no pre-built version that I know of. Compiling ffmpeg under Windows is a little more complicated. You may be able to use https://github.com/jb-alvarado/media-autobuild_suite which should enable libvmaf. |
Latest snapshot of ffmpeg (as of 8/7 I believe) will compile against latest libvmaf (1.3.9). I think this issue can be closed. |
my question is:
|
libvmaf is used via a filter, so it's |
Edit your shell configuration file (e.g.,
It's actually just required for running the Python wrapper for VMAF since the program is not installed as a package. For running the The whole procedure is documented here: https://github.com/Netflix/vmaf/blob/master/resource/doc/libvmaf.md#use-libvmaf-with-ffmpeg |
Thanks. @slhck @GyanD
|
We have a new section at: https://github.com/Netflix/vmaf/blob/master/resource/doc/libvmaf.md#use-libvmafa-with-ffmpeg |
Hello, I aslo has the same problem with
It is libvmaf with ffmpeg, ubuntu in my case. How did you @yayaMissie resolve it? The link is not working @li-zhi . |
😔 |
@droukd did this problem have been solved ? I have the same question. |
Merge in MCE/vmaf-private-lts from feature/add-save_workfiles-to-Executor to master * commit '0b376c44bf95dbd2b335f85fb5f4aa7e825dab47': Add save_workfiles input argument to Executor.
@droukd @hotkidfamily, how did you solve the issue? |
mkfifo ref.y4m dist.y4m
vmaf --reference ref.y4m --distorted dist.y4m &
(ffmpeg -y -v error -i Football.mp4 ref.y4m & ffmpeg -y -v error -i av1.webm dist.y4m & ) & fg vmaf
65 frames ⠍⠀ 2.52 FPS for my machine at least, you have to open the files for reading first and then write to it, else it blocks ffmpeg from writing and vmaf from reading. If you wanted to use libvmaf directly from ffmpeg without all of this, it should be outlined at https://github.com/Netflix/vmaf/blob/master/resource/doc/ffmpeg.md ffmpeg -i av1.webm -i Football.mp4 -lavfi libvmaf -f null - |
After reading documentation, I saw it is able to run VMAF via a plugin on ffmpeg. I have yet to figure out how to though.
ffmpeg says "simply" install libvmaf, and run ./configure --enable-libvmaf. This makes sense, but there are no ./configure files to be found and after scrounging everywhere to figure out how this is possible, I have come up empty. I have significant experience using VMAF outside of ffmpeg, but I would very much like to run VMAF through the libvmaf on ffmpeg. Please let me know how this is possible.
Thanks
The text was updated successfully, but these errors were encountered: