View Full Version : [Neo] f3kdb
FranceBB
17th May 2020, 16:30
Because of the grain you added?
That must be it.
@Boulder... By default, f3kdb adds grain to compensate debanding which of course takes more bits to be encoded properly with crf. You can try to turn the grain off in f3kdb and play with the other parameters. I generally use:
neo_f3kdb(range=15, Y=45, Cb=30, Cr=30, grainY=0, grainC=0, sample_mode=2, blur_first=true, dynamic_grain=false, mt=true, keep_tv_range=true)
so grainY=0, grainC=0 and dynamic_grain=false will make sure that you don't add any grain to luma and chroma, thus making compressibility better.
ChaosKing
17th May 2020, 16:56
He wrote the file was bigger without neo_f3kdb, so with neo_f3kdb it is smaller.
MeteorRain
17th May 2020, 17:28
Oops, then I don't know.
Boulder
17th May 2020, 17:28
Yes, folks, it was the other way around which is why I was confused. Debanding made the result a whole lot smaller than the one in which the debanding line was commented out. Really weird.. and with SDR sources it definitely works like expected with an increase in filesize.
So I made another test, source with borders cropped off and downscaled to 2560x1064 with resamplehq, kernel bicubic and b=-0.56, c=0.25. 2673 frames in the test clip. AQ-mode 1, aq-strength 1.0, CRF 13 and pretty much preset --slower + HDR options in x265. In this case where I chose a scene with much more light (where K goes to visit Gaff), the difference is not so big. The earlier one was from a dark scene closer to the end of the movie where Deckard tries to shoot K.
No debanding: 6384 kbps
core.neo_f3kdb.Deband(clp, preset="medium", output_depth=16, sample_mode=4): 6069 kbps
core.neo_f3kdb.Deband(clp, preset="medium/nograin", output_depth=16, sample_mode=4): 5740 kbps
This is the amplified difference between the clip before and after debanding, so it's clearly adding a layer of grain over the whole frame (even with nograin in the preset):
https://i.ibb.co/RyJxwNG/bladerunner-vpy-105107.png (https://ibb.co/bJGS9Fj)
MeteorRain
17th May 2020, 17:38
I see, that's a bug in parsing preset string. The code didn't recognize slashes so "medium/nograin" is considered an invalid preset. For the time being can you test it without using slash preset? You can try preset="medium" with grainy/c = 0.
Boulder
17th May 2020, 17:58
I see, that's a bug in parsing preset string. The code didn't recognize slashes so "medium/nograin" is considered an invalid preset. For the time being can you test it without using slash preset? You can try preset="medium" with grainy/c = 0.
Thanks, that definitely fixed the grain thing and there's mostly the banded areas visible in the diff in frames with a lot of light.
I re-encoded the sample and it came out at 5800 kbps.
Boulder
17th May 2020, 20:05
Maybe the encoder doesn't like the banding, very hard to say. I definitely need to test this on the TV, as my PC display is a normal one. But I can tell that the non-graded frames look better in Vapoursynth Editor when debanded so maybe it's also true on the TV after encoding.
ChaosKing
17th May 2020, 21:39
I would say banding = hard edges = more bitrate is needed to preserve them. But 35% still is impressive, and it looks overall better I guess?
And there is also something like "moving banding", this would also disappear.
mastrboy
25th May 2020, 21:24
I got a warning in AVSPmod I've never seen before when loading this plugin:
neo-f3kdb.dll
Above plugin names contain undesirable symbols.
Rename them to only use alphanumeric or underscores,
or make sure to use them in short name style only.
Should I assume it is safe to ignore this warning?
FranceBB
25th May 2020, 21:53
I got a warning in AVSPmod I've never seen before when loading this plugin:
neo-f3kdb.dll
Above plugin names contain undesirable symbols.
Rename them to only use alphanumeric or underscores,
or make sure to use them in short name style only.
Should I assume it is safe to ignore this warning?
That's something that always pops up in AVSPmod when using dash like "plugin-name.dll", however I never had any troubles other than a simple warning when I open AVSPmod.
Besides, no other software seem to care and it's been like that for years, so I don't know, but I think it's kinda safe to ignore the warning...
My best guess is that this comes from the fact that AVSPmod *thinks* that the plugin name corresponds to the function name and therefore issues a warning.
In other words, although the DLL is called "neo-f3kdb" the function that you call inside Avisynth is "neo_f3kdb" which is a perfectly valid function, however if it was with the "-" instead of "_" it could have caused problems inside Avisynth, that's why AVSPmod complains.
(If you want it to disappear, though, you can easily rename it to neo_f3kdb.dll yourself).
mastrboy
25th May 2020, 22:04
(If you want it to disappear, though, you can easily rename it to neo_f3kdb.dll yourself).
Thanks for the quick reply and especially that rename tip.
MeteorRain
29th May 2020, 23:22
core.neo_f3kdb.Deband(clp, preset="medium/nograin", output_depth=16, sample_mode=4)
This should be working in r6.
Dorohedoro
25th June 2020, 07:18
Sorry guys, I'm a total noob on this things and I need help.
How can I use this on potplayer or ffdshow raw? I can't get this to work. For example, I'm using this in AviSynth (ffdshow):
LoadPlugin("C:\.....\neo-f3kdb.dll")
neo_f3kdb(clip, y=64, cb=64, cr=64, grainy=0, grainc=0)
and I'm getting an error saying "I don't know what clip means" or something like that.
Can anyone help me please? Thank you so much.
Boulder
25th June 2020, 07:23
You don't need the "clip" parameter there at all if your script is like that.
Dorohedoro
25th June 2020, 07:31
Cam you give me an example of a working script please?
Because this doesn't work, I'm also getting an error on line 2
LoadPlugin("C:\.....\neo-f3kdb.dll")
neo_f3kdb(y=64, cb=64, cr=64, grainy=0, grainc=0)
Thanks!
Boulder
25th June 2020, 07:33
What error do you get with that one?
Dorohedoro
25th June 2020, 07:43
Unknown parameter or something like that (I'm at work right now and I don't remember, sorry)
Dorohedoro
26th June 2020, 07:37
Got it working on ffdshow but it's too demanding for my pc.
Thanks.
tormento
6th March 2021, 13:25
I saw r7 on GitHub but no release yet. Why?
GMJCZP
15th May 2021, 18:55
I am migrating to this version but I am getting a 1280x480 green image, when it should be 640x480, I am using the r6 msvc x86 on w7 32 bit c2d e5800. My old script is this:
f3kdb(0,0,0,0,0,0, keep_tv_range=true, dither_algo=2, input_mode=2, input_depth=12, output_mode=0, output_depth=8) # for avs+
Now I am using like this but with the aforementioned problem:
neo_f3kdb(0,0,0,0,0,0, keep_tv_range=true, dither_algo=2, output_depth=8) # for avs+
Any idea please?
GMJCZP
17th May 2021, 15:18
I am not an expert in bit conversions, I have used f3kdb with the script that I put previously but with neo_f3kdb I don't know how to do it, I have a 12-bit video that converted to 8 bits.
Edit: Can't seem to do bit conversions with neo_ f3kdb
mp3dom
17th May 2021, 17:14
It works right on my end, tried with colorbars with 12bpc (4:2:0, 4:2:2 and 4:4:4) and all produce correct result (converted to 8bpc).
How are you loading your source? Unlike old f3kdb, neo_f3kdb accepts native hbd with no hacks (stacked or double width)
GMJCZP
17th May 2021, 23:45
LwLibavVideoSource("Video.mp4")
Thanks
Edit: Now I use Clang x86 version
GMJCZP
19th May 2021, 15:42
I don't want to back to f3kdb only for this problem, i need help
Arx1meD
19th May 2021, 17:51
In my videos, I used your neo_f3kdb settings and there was no problem.
As I understand it, you are loading a video with a color depth of 12 bits in AviSynth.
Try it:ConvertBits (12) # or comment this line
neo_f3kdb(0,0,0,0,0,0, keep_tv_range=true, dither_algo=2)
ConvertBits (8)
GMJCZP
19th May 2021, 21:50
In my videos, I used your neo_f3kdb settings and there was no problem.
As I understand it, you are loading a video with a color depth of 12 bits in AviSynth.
Try it:ConvertBits (12) # or comment this line
neo_f3kdb(0,0,0,0,0,0, keep_tv_range=true, dither_algo=2)
ConvertBits (8)
Thanks but the problem continúes, a green image of 1280x480
mp3dom
19th May 2021, 22:52
Does your processor supports SSE4.1?
GMJCZP
20th May 2021, 03:10
Does your processor supports SSE4.1?
It seems not, e5800 Dual core 45 nm.
Edit: fron wiki:
Requirements
AviSynth+ (x86/x64)
Supported color formats: Y8, YV12, YV16, YV24, [all planar Y/YUV formats (8/10/12/14/16bit) are supported]
mp3dom
20th May 2021, 10:10
Uhm, do you still see errors with this code?
colorbars(pixel_type="yuv422p12")
neo_f3kdb(output_depth=8)
GMJCZP
20th May 2021, 12:14
Uhm, do you still see errors with this code?
colorbars(pixel_type="yuv422p12")
neo_f3kdb(output_depth=8)
I'm getting the 640x480 colorbars at 29,970fps, but it's telling me virtualdub2 in File Information is on the internal dib decoder (yv16). I also use VirtualDubMod and it tells me that Couldn't locate decompressor for format 'yv16' (unknown).
Edit: if I delete neo_f3kdb line obtain a P216 colorbars clip.
mp3dom
20th May 2021, 20:27
It's perfectly fine that you're getting yv16 output colorbars, since neo_f3kdb is converting the bit depth from 12 to 8, and planar 8bit for yuv422 is yv16. If you're not getting any trouble and you see the colorbars right, then it shouldn't be a neo_f3kdb problem the green video you're getting, or it doesn't fully depends on neo_f3kdb.
You said you're opening the file with LWLibav... how you see the file with just plain LWLibav (no neo_f3kdb) and what's its colorspace inside VDub2?
GMJCZP
20th May 2021, 22:28
It's perfectly fine that you're getting yv16 output colorbars, since neo_f3kdb is converting the bit depth from 12 to 8, and planar 8bit for yuv422 is yv16. If you're not getting any trouble and you see the colorbars right, then it shouldn't be a neo_f3kdb problem the green video you're getting, or it doesn't fully depends on neo_f3kdb.
You said you're opening the file with LWLibav... how you see the file with just plain LWLibav (no neo_f3kdb) and what's its colorspace inside VDub2?
Just using LwLibavVideoSource I get a 1280x480 green image and it says Vdub2 in Decompressor that it is Internal DIB decoder (Yv12).
mp3dom
20th May 2021, 23:26
That's the culprit... maybe you can try to update LSMASH (pick one of the latest compile).
12 bpc file on mp4 it sounds a bit weird... what's also telling you MediaInfo?
GMJCZP
21st May 2021, 02:39
I have the last version of Lsmash, the 20210423.
Mediainfo data:
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Format Range@L3@Main
Codec ID : hvc1
Codec ID/Info : High Efficiency Video Coding
Duration : 21 min 2 s
Bit rate : 1 384 kb/s
Maximum bit rate : 3 199 kb/s
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 25,000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 12 bits
Bits/(Pixel*Frame) : 0.180
Stream size : 208 MiB (93%)
Writing library : x265 2.0+4-43ca544799c2:[Windows][MSVC 1900][64 bit] 12bit
Encoding settings : wpp / ctu=64 / min-cu-size=8 / max-tu-size=32 / tu-intra-depth=1 / tu-inter-depth=1 / me=1 / subme=2 / merange=57 / no-rect / no-amp / max-merge=2 / temporal-mvp / no-early-skip / rskip / rdpenalty=0 / no-tskip / no-tskip-fast / strong-intra-smoothing / no-lossless / no-cu-lossless / no-constrained-intra / no-fast-intra / open-gop / no-temporal-layers / interlace=0 / keyint=250 / min-keyint=25 / scenecut=40 / rc-lookahead=20 / lookahead-slices=0 / bframes=4 / bframe-bias=0 / b-adapt=2 / ref=3 / limit-refs=3 / no-limit-modes / weightp / no-weightb / aq-mode=1 / qg-size=32 / aq-strength=1.00 / cbqpoffs=0 / crqpoffs=0 / rd=3 / psy-rd=2.00 / rdoq-level=0 / psy-rdoq=0.00 / no-rd-refine / signhide / deblock=0:0 / sao / no-sao-non-deblock / b-pyramid / cutree / no-intra-refresh / rc=crf / crf=21.0 / qcomp=0.60 / qpmin=0 / qpmax=51 / qpstep=4 / ipratio=1.40 / pbratio=1.30
Encoded date : UTC 2016-07-18 23:03:09
Tagged date : UTC 2016-07-18 23:03:14
Codec configuration box : hvcC
mp3dom
21st May 2021, 09:19
Have you tried also LSMASHVideoSource? Same results? Otherwise you can also try to force the output to 16bit:
LWLibavVideoSource(source,format="yuv420p16")
GMJCZP
21st May 2021, 12:08
Have you tried also LSMASHVideoSource? Same results? Otherwise you can also try to force the output to 16bit:
LWLibavVideoSource(source,format="yuv420p16")
Both with LsmahVideoSource and with the script that you propose, I get the same greenish image of 1280 * 480. If I add format = "yuv420p8" I do get the correct image but I would be giving up editing in Hbd and neo_f3kdb.
mp3dom
21st May 2021, 15:55
I think the last chance would be to share a trimmed part of your file so everyone can try to solve this.
GMJCZP
21st May 2021, 18:19
Sample:
Here (http://www.filedropper.com/sample_10)
mp3dom
21st May 2021, 18:33
I still find no issue whatsoever.
Correctly opened with both LW and LSMASH, and with VDub2 with ffmpeg decoder as well. Unless it's a recent bug of LW/LSMASH (you can try to use an older version just in case) I think you have something wrong somewhere on your system.
GMJCZP
21st May 2021, 22:22
I still find no issue whatsoever.
Correctly opened with both LW and LSMASH, and with VDub2 with ffmpeg decoder as well. Unless it's a recent bug of LW/LSMASH (you can try to use an older version just in case) I think you have something wrong somewhere on your system.
But with neo_f3kdb?
What is your script?
Edit: with Dss2mod and Vdub2 directly i can Open the File without problem.
Edit2: If I can open the file with dss2mod then the following question arises, why then use neo_f3kdb or f3kdb? of course this doesn't solve the problem with l-smash.
mp3dom
22nd May 2021, 13:09
neo_f3kdb is not the problem here, because you told me that even the plain LWLibav (opening plugin) give you the problem. You can try an older version of Lsmashsource and see if something change (btw I'm using a 07/2020 version of the plugin).
If you open the file with dss2mod I guess you're opening it at 8bit with (good) or without (bad) the dither applied, so you lose hbd processing. F3kdb main use is for debanding, but can be used for dithering.
You have the latest Lsmashsource and latest neo_f3kdb... do you also have latest avs+ 3.7?
GMJCZP
22nd May 2021, 14:08
neo_f3kdb is not the problem here, because you told me that even the plain LWLibav (opening plugin) give you the problem. You can try an older version of Lsmashsource and see if something change (btw I'm using a 07/2020 version of the plugin).
If you open the file with dss2mod I guess you're opening it at 8bit with (good) or without (bad) the dither applied, so you lose hbd processing. F3kdb main use is for debanding, but can be used for dithering.
You have the latest Lsmashsource and latest neo_f3kdb... do you also have latest avs+ 3.7?
You were right, the problem was with Lsamsh, I downloaded version 20200111 and everything now works perfectly, including neo_f3kdb, thanks.
In short, at some point in the development of Lsmash a bug was introduced.
PD: recently update to last version of Avs+
StainlessS
22nd May 2021, 14:23
LWLibavVideoSource(".\Sample_yuv420p12le.mp4") # LSMASHSource_x86_20200322(HolyWu).dll
info
https://i.postimg.cc/3dc42rgK/g.jpg (https://postimg.cc/3dc42rgK)
click to see Info().
EDIT: OK, you got it sorted.
GMJCZP
22nd May 2021, 14:33
The bug was introduced this year, I tested the 20200728 Lsmash version and works.
GMJCZP
22nd May 2021, 15:00
LWLibavVideoSource(".\Sample_yuv420p12le.mp4") # LSMASHSource_x86_20200322(HolyWu).dll
info
https://i.postimg.cc/3dc42rgK/g.jpg (https://postimg.cc/3dc42rgK)
click to see Info().
EDIT: OK, you got it sorted.
TinMan, how did you go about getting the information from the video in yellow letters?
StainlessS
22nd May 2021, 15:08
already posted, ie
LWLibavVideoSource(".\Sample_yuv420p12le.mp4") # LSMASHSource_x86_20200322(HolyWu).dll
info <<<<<<======= Here !!!
It would be a big help at times, if LSmash (and others) added version resouce to their dll's,
so we knew what ver$ worked, or had problems.
[EDIT: downloading all versions and comparing file size/MD5 is a real pain]
GMJCZP
22nd May 2021, 15:19
already posted, ie
LWLibavVideoSource(".\Sample_yuv420p12le.mp4") # LSMASHSource_x86_20200322(HolyWu).dll
info <<<<<<======= Here !!!
It would be a big help at times, if LSmash (and others) added version resouce to their dll's,
so we knew what ver$ worked, or had problems.
[EDIT: downloading all versions and comparing file size/MD5 is a real pain]
Thanks, with a celular maybe difficult see some things.
The problem was introduced from this year, at least the latest version
No issue with latest lsmash version (20210423):
https://images2.imgbox.com/c6/d1/PFOttvu9_o.png
GMJCZP
23rd May 2021, 01:52
No issue with latest lsmash version (20210423):
https://images2.imgbox.com/c6/d1/PFOttvu9_o.png
Thanks StvG, your comment motivated me to take action on the matter...
I was finally able to solve the problem, as follows:
- I downloaded the latest version of Lsmash again
- Then I noticed, by chance, that some videos were played wrong by mpc-hc, I updated it as well as lav filters (when I uninstalled it I had problems reinstalling it but it was solved)
- Finally I tried the video and it worked correctly.
It still seems a mystery to me that the latest version did not work at first, it is possible that there was a conflict with the programs I mentioned before.
Thanks everyone for your help.
StainlessS
23rd May 2021, 12:31
Some time ago, there was some kind of problem concerning a VDub source plugin, and either ffmpeg or FfmpegSource, dll's.
It was something to do with path search order to find a dll, one softwares change in search order interfered with the other.
No idea if relevant.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.