Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > New and alternative video codecs

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th October 2017, 17:48   #1  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,340
FFMpeg VMAF filter

https://ffmpeg.org/ffmpeg-filters.html#libvmaf
https://github.com/Netflix/vmaf

Quote:
(8/12/17) VMAF is now included as a filter in FFmpeg main branch, and can be configured using: ./configure --enable-libvmaf.
Anyone compile or use this yet in ffmpeg?

Is it "complete" yet ?

Experiences /observations / comments ?
poisondeathray is offline   Reply With Quote
Old 14th October 2017, 18:45   #2  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 696
Super. Will there be any examples for correct usage for all images and video codecs?
Is the filter VMAF only linux like neftix?
Jamaika is offline   Reply With Quote
Old 29th January 2019, 18:16   #3  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
I'd like to check out this FFMPEG filter, ideally on Windows 10; I'm running Zeranoe Static Windows 64-bit nightly builds currently.

If this is possible, how do you install the pre-requisite libvmaf library ?

I see there is also now a VapourSynth VMAF plugin:

https://forum.doom9.org/showthread.p...AF+vapoursynth

But I would prefer to use commandline FFMPEG.
__________________
Nostalgia's not what it used to be
WorBry is offline   Reply With Quote
Old 31st January 2019, 15:27   #4  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
Thanks, but I still need to install and point to the libvmaf library (model) do I not ?



How to do that ?
__________________
Nostalgia's not what it used to be
WorBry is offline   Reply With Quote
Old 31st January 2019, 15:35   #5  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
Place the model file in the same folder and try
Code:
ffmpeg -i main -i ref -lavfi libvmaf="model_path=vmaf_v0.6.1.pkl" -f null -
__________________
Monochrome Anomaly
Wolfberry is offline   Reply With Quote
Old 31st January 2019, 16:46   #6  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
Ah, OK, so no need to compile/install anything - I just copy the vmaf_v0.6.1.pkl file from here ?:

https://github.com/Netflix/vmaf/tree/master/model

Tried that, but still:

__________________
Nostalgia's not what it used to be

Last edited by WorBry; 31st January 2019 at 16:48.
WorBry is offline   Reply With Quote
Old 1st February 2019, 03:11   #7  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
I believe you need *.pkl and *.pkl.model in the same path as ffmpeg, not just the pkl file.
__________________
Monochrome Anomaly
Wolfberry is offline   Reply With Quote
Old 1st February 2019, 06:47   #8  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
Nope, it's still not reading vmaf_v0.6.1.pkl.

I've got the VapourSynth vmaf filter working though so I'll use that for now.

I really just wanted to see how the VMAF and SSIM measures compare for x264 encoded over a range of CRF values, using a high quality uncompressed source as reference. And also how the LibVMAF derived SSIM 'aggregate' score tallies with the standard FFMPEG SSIM metric 'average' score. This series shows quite a difference:

https://github.com/Netflix/vmaf/issues/22

Cheers.
__________________
Nostalgia's not what it used to be

Last edited by WorBry; 1st February 2019 at 07:29.
WorBry is offline   Reply With Quote
Old 1st February 2019, 07:16   #9  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
It works for me using a relative path.
I also tried libvmaf=model_path=vmaf_b_v0.6.3.pkl:enable_conf_interval=1 and that also works.
Something must be wrong on your side, but still good to know that the vapoursynth filter works.
__________________
Monochrome Anomaly
Wolfberry is offline   Reply With Quote
Old 1st February 2019, 07:28   #10  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,197
Thanks. I'll look at again once I've done testing with the VapourSynth filter.
__________________
Nostalgia's not what it used to be
WorBry is offline   Reply With Quote
Old 3rd February 2019, 02:57   #11  |  Link
utack
Registered User
 
Join Date: Apr 2018
Posts: 63
I think the "phone model" is not working for me. Am I using this incorrectly?
Quote:
ffmpeg -i HDsource -i lowresencode -filter_complex [0]scale=960:512,libvmaf=model_path=/usr/share/model/vmaf_v0.6.1.pklhone_model -f null -
Both with and without "phone model" resulted in the same score
utack is offline   Reply With Quote
Old 4th February 2019, 21:11   #12  |  Link
Beelzebubu
Registered User
 
Join Date: Feb 2003
Location: New York, NY (USA)
Posts: 109
Quote:
Originally Posted by utack View Post
I think the "phone model" is not working for me. Am I using this incorrectly?

Both with and without "phone model" resulted in the same score
IIRC in FFmpeg syntax you need to specify the boolean value explicitly, e.g. "phone_model=1".
Beelzebubu is offline   Reply With Quote
Old 4th February 2019, 22:24   #13  |  Link
utack
Registered User
 
Join Date: Apr 2018
Posts: 63
Quote:
Originally Posted by Beelzebubu View Post
IIRC in FFmpeg syntax you need to specify the boolean value explicitly, e.g. "phone_model=1".
Yep, that worked. My bad
utack is offline   Reply With Quote
Old 8th February 2019, 18:08   #14  |  Link
Chrisputer
Registered User
 
Join Date: Jun 2018
Posts: 1
Quote:
Originally Posted by Wolfberry View Post
It works for me using a relative path.
I also tried libvmaf=model_path=vmaf_b_v0.6.3.pkl:enable_conf_interval=1 and that also works.
Something must be wrong on your side, but still good to know that the vapoursynth filter works.


Hey Wolfberry,
I'm actually have the exact same issue. I have to punch in the path *nix style to get it work. But I'm also getting a VMAF Score = nan for some reason... :'(
Chrisputer is offline   Reply With Quote
Old 26th February 2019, 13:41   #15  |  Link
Iron_Mike
Registered User
 
Join Date: Jul 2010
Posts: 132
cannot get this to work under Windows w/ latest Zeranoe ffmpeg build 4.1.1... copied both "vmaf_v0.6.1.pkl" and "vmaf_v0.6.1.pkl.model" into same folder as ffmpeg.exe... running this command:

Quote:
ffmpeg -i main.mpg -i ref.mpg -lavfi libvmaf="model_path=vmaf_v0.6.1.pklsnr=1:log_fmt=json" -f null -
throws this error:

Quote:
No such filter: 'libvmaf'
docs state that ffmpeg requires to be configured with
Quote:
--enable-libvmaf
but the Zeranoe Windiows build does not come with that...

any advice ?

from the posts above I assumed that simply copying the .pkl files into the correct folder would work...

Thanks.
Iron_Mike is offline   Reply With Quote
Old 26th February 2019, 15:28   #16  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
You can get my custom build of ffmpeg with libvmaf here
__________________
Monochrome Anomaly

Last edited by Wolfberry; 27th February 2019 at 09:47.
Wolfberry is offline   Reply With Quote
Old 26th February 2019, 18:10   #17  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,738
Quote:
Originally Posted by Wolfberry View Post
You can get my custom build of ffmpeg with libvmaf here


Cool. Anything special/awesome about your build?


Sent from my iPhone using Tapatalk
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 26th February 2019, 22:53   #18  |  Link
Iron_Mike
Registered User
 
Join Date: Jul 2010
Posts: 132
Quote:
Originally Posted by Wolfberry View Post
You can get my custom build of ffmpeg with libvmaf here
Hi,

get the following error trying to run VMAF filter using your build:

Quote:
---------------------------
ffmpeg.exe - System Error
---------------------------
The program can't start because VSScript.dll is missing from your computer. Try reinstalling the program to fix this problem.
---------------------------
what are the dependencies for this build ?

Thanks.
Iron_Mike is offline   Reply With Quote
Old 27th February 2019, 07:19   #19  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
ffmpeg-4.2-N-93255-g4571c7c05d built with gcc 8.3.1 (G41) 20190222

The vapoursynth dependencies is now included.

The build can also be found in my signature, future updates will be there.

Code:
configuration: --disable-autodetect --disable-debug --disable-w32threads --enable-amf --enable-avisynth --enable-bzlib --enable-cuda --enable-d3d11va --enable-ffnvcodec --enable-iconv --enable-libaom --enable-libass
--enable-libbluray --enable-libdav1d --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libmfx --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus 
--enable-librubberband --enable-libsoxr --enable-libsrt --enable-libssh --enable-libtesseract --enable-libvidstab --enable-libvmaf --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 
--enable-libzimg --enable-lzma --enable-mbedtls --enable-nvdec --enable-nvenc--enable-opencl --enable-pthreads --enable-sdl2 --enable-vapoursynth --enable-zlib --enable-gpl --enable-version3

libavutil      56. 26.100 / 56. 26.100
libavcodec     58. 47.102 / 58. 47.102
libavformat    58. 26.101 / 58. 26.101
libavdevice    58.  6.101 / 58.  6.101
libavfilter     7. 48.100 /  7. 48.100
libswscale      5.  4.100 /  5.  4.100
libswresample   3.  4.100 /  3.  4.100
libpostproc    55.  4.100 / 55.  4.100
Comparison with Zeranoe builds:
Code:
w/ libfribidi liblensfun librubberband libsrt libssh libtesseract libvmaf mbedtls opencl vapoursynth
w/o gmp gnutls libmp3lame libopencore-amrnb libopencore-amrwb libshine libsnappy libspeex libtheora libtwolame libvorbis libvo-amrwbenc libwavpack libxvid
__________________
Monochrome Anomaly

Last edited by Wolfberry; 27th February 2019 at 09:44.
Wolfberry is offline   Reply With Quote
Old 27th February 2019, 09:28   #20  |  Link
Iron_Mike
Registered User
 
Join Date: Jul 2010
Posts: 132
Wolfberry,

thank you !

In addition to the VMAF filter, your build also support 12bit encoding !

Do you have a website or where can I follow you for future releases ?

Thanks.
Iron_Mike is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:34.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.