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. |
![]() |
#21 | Link | ||
Registered User
Join Date: Jul 2010
Posts: 132
|
Quote:
I cannot get the .pkl path to work on your ffmpeg Win build... I tried relative path (file in same folder as ffmpeg.exe), full Windows path or Unix style path... it throws the Quote:
|
||
![]() |
![]() |
![]() |
#22 | Link |
Helenium(Easter)
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
|
Code:
ffmpeg -i 1.mkv -i 1.mkv -lavfi libvmaf=model_path=vmaf_v0.6.1.pkl:log_path=vmaf.log:log_fmt=json:psnr=1:ssim=1:ms_ssim=1 -f null -
__________________
Monochrome Anomaly |
![]() |
![]() |
![]() |
#23 | Link | |
Lost my old account :(
Join Date: Jul 2017
Posts: 321
|
Quote:
Code:
Caught VmafException: Error loading model (.pkl): Trouble reading the file:vmaf_v0.6.3.pkl Code:
Input model at vmaf_v0.6.1.pkl cannot be read successfully. Caught VmafException: Error loading model (.pkl): Unknown token Last edited by excellentswordfight; 27th February 2019 at 12:45. |
|
![]() |
![]() |
![]() |
#24 | Link |
Registered User
Join Date: Jul 2010
Posts: 132
|
okay, made some progress...
if you call "ffmpeg" from CLI because you're either already in that folder or location (of that ffmpeg version) is on Windows PATH, then the relative path to VMAF will work ! but if you call ffmpeg with a fully qualified path (e.g. "d:/path/to/ffmpeg.exe" -i test.mkv.... etc ) then the relative path to the vmaf.pkl will not work... and for whatever reason I cannot seem to get fully qualified paths to the .pkl files working... |
![]() |
![]() |
![]() |
#25 | Link |
Helenium(Easter)
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
|
Yes, exactly that. Future updates will be in my signature, update frequency will probably be every other day.
__________________
Monochrome Anomaly |
![]() |
![]() |
![]() |
#26 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,285
|
Thanks Wolfberry, (and for vpy support!)
For people having syntax issues - For Windoze, the issue with ffmpeg and filters is escape characters . To enter full paths, for every colon , you need to enter a preceding backslash. This is true for all filters syntax in windows ffmpeg with full paths eg. (I marked in red in this example) Code:
-lavfi "libvmaf=model_path='C\:/Program Files (x86)/VapourSynth/plugins64/VMAF-r3/plugins64/model/vmaf_v0.6.1.pkl':log_path='F\:/TEST/vmaf.log':log_fmt=json:psnr=1:ssim=1:ms_ssim=1" |
![]() |
![]() |
![]() |
#27 | Link | |
Registered User
Join Date: Jul 2010
Posts: 132
|
Quote:
but got it to work now by using your exact syntax of wrapping the full VMAF filter command in double quotes, then wrapping the .pkl path in single quotes (that was t6he missing part), and then escaping the colon... Thanks ! |
|
![]() |
![]() |
![]() |
#28 | Link |
Registered User
Join Date: Jul 2010
Posts: 132
|
follow up question in regards to using VMAF:
I understand that one needs to upscale a video to the source resolution in order to compare via VMAF, but what about bit depth ? so if I compare a 16-bit EXR sequence (full RGB) with a 12-bit 444 encode (yuv444p12le) - both in same resolution - do I need to adjust anything for the VMAF comparison to be as accurate as possible ? read the VMAF FAQs but it does not mention bit depth differences... |
![]() |
![]() |
![]() |
#29 | Link |
Registered User
Join Date: Feb 2003
Location: New York, NY (USA)
Posts: 109
|
If the encoded video and the source video have a different bitdepth, then yes, you need to choose what to measure it at. I would recommend to use the evaluation bitdepth used by the display device, and make sure to use a model tuned to that bitdepth (and resolution) also.
|
![]() |
![]() |
![]() |
#30 | Link | |
Registered User
Join Date: Jul 2010
Posts: 132
|
Quote:
I've tried passing in different pixel formats (for both inputs), VMAF score never changed... both vids are HD res, so I used model 0.6.1... lmk what parameters to change and I'll run tests... Thanks. |
|
![]() |
![]() |
![]() |
#31 | Link | |
ангел смерти
![]() Join Date: Nov 2004
Location: Lost
Posts: 9,555
|
Quote:
|
|
![]() |
![]() |
![]() |
#32 | Link |
Registered User
Join Date: Mar 2006
Posts: 44
|
Hi.
I think I need some help with libvmaf. No matter what I do, after ffmpeg has scanned the files it ends up with VMAF nan The version of ffmpeg used is the most recent downloaded from Wolfberry. My command line is: ffmpeg -i encoded.mkv -i lossless.mkv -lavfi libvmaf=vmaf_4k_v0.6.1.pkl -f null - The ouput of ffmpeg is: Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x1608 [SAR 1:1 DAR 160:67], 23.98 fps, 23.98 tbr, 1200k tbn, 23.98 tbc Stream #1:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x1608, 23.98 tbr, 1200k tbn, 23.98 tbc Stream mapping: Stream #0:0 (hevc) -> libvmaf:main Stream #1:0 (hevc) -> libvmaf:reference libvmaf -> Stream #0:0 (wrapped_avframe) frame= 0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A Start calculating VMAF score... Output #0, null, to 'pipe:': Metadata: encoder : Lavf58.31.104 Stream #0:0: Video: wrapped_avframe, yuv420p10le, 3840x1608 [SAR 1:1 DAR 160:67], q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc (default) Metadata: encoder : Lavc58.55.101 wrapped_avframe And then it takes quite a while before the ouput comes. The files have a bit more than 6000 frames. After scanning all the frames the output I get is this: frame= 6151 fps=8.3 q=-0.0 Lsize=N/A time=00:04:16.54 bitrate=N/A speed=0.348x video:3220kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Exec FPS: 8.323916 VMAF score = nan [libvmaf @ 00000284353da5c0] VMAF score: nan I have managed to get vmafossexec.exe to output some numbers, but it only supports raw yuv files, and I would like to doublecheck the numbers as the PSNR and SSIM numbers from vmafossexec.exe, doesn't match what I have previously gotten from ffmpeg. Any help will be most appreciated. rco133 |
![]() |
![]() |
![]() |
#33 | Link | |
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 4,653
|
Quote:
If you can do a lossless encode using the same tool, that would work. like if using ffmpeg, pipe out to .y4m. |
|
![]() |
![]() |
![]() |
#34 | Link |
Registered User
Join Date: Mar 2020
Posts: 2
|
FFMpeg VMAF filter
A second note on the filter usage:
- as in all my last filters, I make use of random selections tha plasma applied is randomly selected, the pattern also - hence, if you do not like one outcome just relaunch the filter and you will get a different one, even with the same parameters |
![]() |
![]() |
![]() |
#35 | Link | |
None
Join Date: Jul 2007
Location: The Background
Posts: 297
|
Quote:
|
|
![]() |
![]() |
![]() |
#36 | Link |
Registered User
Join Date: Feb 2004
Location: the tiny bubble of Creation
Posts: 189
|
is there a way to encode to say x264(software) or h264(nvidia hardware) and to simultanuously pipe/tee input and output frames to libvmaf for comparison?
i.e to do encode and vmaf calculation with single ffmpeg command? |
![]() |
![]() |
![]() |
#37 | Link | |
Moderator
![]() Join Date: Jan 2006
Location: Portland, OR
Posts: 4,653
|
Quote:
There's no reason the ML calculations need to happen while encoding; generating the base metrics is the slow part, and the VMAF calculations can be done later. I like that approach as it allows for running different VMAF models without having to redo those calculations. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|