View Full Version : HEVC for VapourSynth?
asarian
6th December 2018, 18:02
I recently successfully upgraded to VP R45 (all the way from R32). I tend to use the following:
core.lsmas.LWLibavSource
I was wondering whether any HEVC compatible import filters exist, though. I bought an UHD Blu-ray namely, figuring my TV/Kodi would just scale it down automagically (which it probably will), but found out the bitrate is just too high for streaming over my 1G network. So, guess I need to re-encode it to 1080p myself first.
So, is there an import filter that can take HEVC material as input yet?
poisondeathray
6th December 2018, 18:48
Yes, ffms2 and lsmash support HEVC
asarian
6th December 2018, 18:53
Yes, ffms2 and lsmash support HEVC
Cool. Thx. Didn't even realize lsmash supports it already. :o
Selur
6th December 2018, 19:51
but found out the bitrate is just too high for streaming over my 1G network.
UHD Blu-ray should max out at ~128 Mbit/s, if that 1G stands for 1 gigabit your network might also need to be checked,..
amichaelt
6th December 2018, 20:26
but found out the bitrate is just too high for streaming over my 1G network.
Then you have something else wrong with either bad QoS settings, some sort of congestion or something is potentially set at 10 or 100mbit. I stream UHD Blurays both across a wired gigabit network and over wireless AC using Plex and no transcoding all the time with zero problems. Even a triple-layer UHD Blu-ray at max data rate cannot saturate a 1 gigabit network.
asarian
6th December 2018, 20:34
Then you have something else wrong with either bad QoS settings, some sort of congestion or something is potentially set at 10 or 100mbit. I stream UHD Blurays both across a wired gigabit network and over wireless AC using Plex and no transcoding all the time with zero problems. Even a triple-layer UHD Blu-ray at max data rate cannot saturate a 1 gigabit network.
It's a wired 1G network. I only tested it briefly (in Kodi) and decided it's likely a bitrate issue. May have been something else, though. I'm not even sure Kodi actually supports H265 hardware acceleration(at least I don't remember a setting for it). My Zbox, with an i5, should support it, though.
I shall run some more definitive tests.
amichaelt
6th December 2018, 20:36
It's a wired 1G network. I only tested it briefly (in Kodi) and decided it's likely a bitrate issue. May have been something else, though. I'm not even sure Kodi actually supports H265 hardware acceleration(at least I don't remember a setting for it). My Zbox, with an i5, should support it, though.
I shall run some more definitive tests.
Yeah, before spend a lot of time transcoding, I would definitely investigate more your streaming setup. You should be perfectly capable of having it work just fine over wired gigabit. I do Plex to both an AppleTV and a Samsung UHD Blu-ray player (which sounds weird but is often more convenient then disc swapping...).
videoh
6th December 2018, 20:54
Yes, ffms2 and lsmash support HEVC Also DGDecNV.
asarian
9th December 2018, 02:15
Also DGDecNV.
Are you sure about that? I used
vid = core.dgdecodenv.DGSource ("i:/jobs/test.dgi", resize_w=1920, resize_h=1080, fulldepth=False)
Just getting a totally green output. :(
videoh
9th December 2018, 02:40
Please give nVidia card and driver details. Also, Vapoursynth and Python versions. DG version. Also give the complete script and your OS. Finally, a link to the stream. Thank you.
asarian
9th December 2018, 03:02
Please give nVidia card and driver details. Also, Vapoursynth and Python versions. DG version. Also give the complete script and your OS. Finally, a link to the stream. Thank you.
I'm using dgdecnv2053, VS R45, a GTX 1080 Ti, and Python 3.7. And 417.22 video drivers. And windows 10, 64-bit.
The script is pretty simple:
import vapoursynth as vs
import havsfunc as haf
import muvsfunc as muf
core = vs.get_core ()
core.max_cache_size = 16384
vid = core.dgdecodenv.DGSource ("i:/jobs/solo.dgi", resize_w=1920, resize_h=1080, fulldepth=False)
vid.set_output ()
asarian
9th December 2018, 04:14
^^ Sigh.
I figured it out. If you look at the green output closely, you'll see, in small font, the phrase "Bad license." Apparently, you need to copy the original license.txt to the 64-bit plugins directory as well (and all places you have DGDecNV loaded, really).
videoh
9th December 2018, 13:25
That requirement is clearly stated as item 2 in the Readme.txt file.
asarian
9th December 2018, 18:26
That requirement is clearly stated as item 2 in the Readme.txt file.
Of course it is.
Thing is, my license.txt file *does* reside in the dgdecnv2053 directory. I figured the DGDecodeNV.dll hardlink, from the plugins64 folder, would trigger it too. Guess not. And the 'Bad license' text on the green output is very faint, and very, very small. :)
Myrsloik
9th December 2018, 21:55
That requirement is clearly stated as item 2 in the Readme.txt file.
How come you don't simply return an error for invalid licenses? That'd be a lot less confusing than clips with small text.
videoh
9th December 2018, 23:50
I try to avoid giving easy things for crackers to search for and break on. Let's please not start a debate about it.
asarian
10th December 2018, 03:08
I try to avoid giving easy things for crackers to search for and break on. Let's please not start a debate about it.
Little confused here. Are you Neuron2?! Or did you take over the DGDecNV project for him, at some point? (Sorry, been out of it for a while).
Anyway, love the hardware-assisted resize! Since I'm using UHD material here, downsizing in VS directly left vpspipe with a 12G (!) memory footprint (out of a 32G I have, but still). Using DGDecNV as input filter, vspipe only uses a stub 300MB (for just the input filter).
videoh
10th December 2018, 03:24
Glad you like the functionality!
It is no secret that videoh=DG. I retired my neuron2 handle when I retired from moderation here.
asarian
10th December 2018, 03:31
Ah. :) Thx.
asarian
11th December 2018, 11:00
Glad you like the functionality!
It is no secret that videoh=DG. I retired my neuron2 handle when I retired from moderation here.
Any way to get DGDenoise to work, btw? It doesn't appear to be recognized in VS (like dgdecodenv.DGDenoise).
asarian
11th December 2018, 11:30
^^ Scratch that! :) Apparently you need to load DGDecNV via the avs LoadPlugin method, for DGDenoise to work.
EDIT: And allow me this opportunity to again express how happy I am with DGDecNV. :) I used to use KNLMeansCL (with haf.QTGMC), but DGDenoise goes so much faster!
videoh
11th December 2018, 13:07
Again, glad you like it and thanks for your kind words. Note that DGDenoise is spatial only. Some people prefer also to do temporal. I have often asked for a sample that shows the need for temporal but nobody ever provided me with one. I'm still willing to add temporal but only if the need is clearly shown.
Sharc
11th December 2018, 14:23
Again, glad you like it and thanks for your kind words. Note that DGDenoise is spatial only. Some people prefer also to do temporal. I have often asked for a sample that shows the need for temporal but nobody ever provided me with one. I'm still willing to add temporal but only if the need is clearly shown.
Well, for VHS tape captures I have been using
DGDenoise(strength=0.04)
temporalsoften(4,4,8,10,mode=2)
fluxsmoothST(3,3)
Not sure whether a temporal component in DGDenoise would have been a substitute for the temporalsoften() and fluxsmooth()
videoh
11th December 2018, 14:42
Hard to say without a sample that shows the actual need for temporal processing. Can you provide one?
Sharc
11th December 2018, 19:59
I hope to still find one deep in the basement ….
ChaosKing
17th December 2018, 00:55
Again, glad you like it and thanks for your kind words. Note that DGDenoise is spatial only. Some people prefer also to do temporal. I have often asked for a sample that shows the need for temporal but nobody ever provided me with one. I'm still willing to add temporal but only if the need is clearly shown.
Bluray source:
https://www.dropbox.com/s/935tqt6osbffa5x/temporal_sample.mkv?dl=1
I don't know how it looks with DGDenoise since I don't have DGDecNV or a nvidia card, but I doubt It will be as clear as with a spatio-temporal filter.
videoh
17th December 2018, 18:03
Thank you, ChaosKing. What spatiotemporal denoiser and settings would you use for this sample?
DJATOM
17th December 2018, 18:46
Such source can be denoised without major detail loss using double denoiser technique: mv.Degrain(tr=1, thsad=48...120) and prefilter (for example, dfttest with tbsize=3 and sirma=1..7) on super-clip. That's my common solution on gainy animes.
videoh
17th December 2018, 18:58
Full script would be appreciated. Also, what frame rate would you get for (say) a 1920x1080 stream with that denoising?
ChaosKing
17th December 2018, 19:21
Just a quick test - I use vapoursynth, ryzen 1700, rx480 gpu
3.5 fps with knlm.KNLMeansCL(d=2, a=6, s=5, h=2.2)
9fps TemporalDegrain2(clip, degrainTR=3, postFFT=0)
this is more grainy, but the grain ist much more stable
50fps haf.SMDegrain(clip, tr=3, thSAD=800, prefilter=clip.flux.SmoothT(temporal_threshold=6))
There are avisynth equivalents for the used filters.
Edit
this looks actually very good (noisefree) and is still "fast"
15fps haf.MCTemporalDenoise(clip, settings="high")
videoh
17th December 2018, 19:23
Thank you!
asarian
17th December 2018, 20:55
this looks actually very good (noisefree) and is still "fast"
15fps haf.MCTemporalDenoise(clip, settings="high")
I don't think I've actually ever used MCTemporalDenoise with 'settings=high', as even 'medium' is very, very strong. :) Unless the presets are attenuated some in VS. They aren't, are they?
ChaosKing
17th December 2018, 22:26
I think they are pretty close to the avs version.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.