VideoHelp Forum
+ Reply to Thread
Results 1 to 19 of 19
Thread
  1. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    NVENCc --vpp-pmd denoiser; what do you use? ( -vpp_denoiser ??,??,??)

    I had been using hqdn3d=1:1:5:5 to do some basic denoise and a good dash of degrain, not sure how to accomplish this with NVENCc,
    the documentation is there in the help but I dont fully understand the arguments.

    What denoiser settings do you use with NVENCc?

    Thanks,
    Andrew
    Last edited by RogerTango; 19th Dec 2021 at 15:46.
    Quote Quote  
  2. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    I must be one of the few to use NVENCc, pity too... its pretty good software.
    Quote Quote  
  3. Originally Posted by RogerTango View Post
    NVENCc --vpp-pmd denoiser; what do you use? ( -vpp_denoiser ??,??,??)

    I had been using hqdn3d=1:1:5:5 to do some basic denoise and a good dash of degrain, not sure how to accomplish this with NVENCc,
    the documentation is there in the help but I dont fully understand the arguments.

    What denoiser settings do you use with NVENCc?

    In general it would depend on the source characteristics, the specific type and amount of noise.

    Adjust the settings until you get the results you want. There is no preview, soyou have to run some encoding tests. (In contrast, you can preview filters and settings with avisynth, vapoursynth using vdub2 or avspmod or vsedit, or mpchc. So you can see the result prior to compression, and you don't have to do a dozen test encodes)

    But it looks like a crude filter - probably not many people use that denoiser - not when there are so many other better , more customizable filters available in avisynth and vapoursynth.

    --vpp-pmd [<param1>=<value1>][,<param2>=<value2>],...

    Rather weak noise reduction by modified pmd method, aimed to preserve edge while noise reduction.

    Parameters

    apply_count=<int> (default=2, 1- )
    Number of times to apply the filter.

    strength=<float> (default=100, 0-100)
    Strength of the filter.

    threshold=<float> (default=100, 0-255)
    Threshold for edge detection. The smaller the value is, more will be detected as edge, which will be preserved.

    Example: Slightly weak than default
    --vpp-pmd apply_count=2,strength=90,threshold=120

    I had been using hqdn3d=1:1:5:5 to do some basic denoise and a good dash of degrain, not sure how to accomplish this with NVENCc,
    You can apply hqdn3d with an avs or vpy script, or ffmpeg. NVEncC supports .avs, .vpy and yuv4mpegpipe

    eg
    ffmpeg pipe to NVEncC

    Code:
    ffmpeg -i input.ext -vf hqdn3d=1:1:5:5 -f yuv4mpegpipe - | NvEncC --y4m -i - -o output.mp4
    Quote Quote  
  4. I agree with pdr I usually use something like Vapoursynth or Avisynth for filtering to have more control and a frame-by-frame preview.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  5. Originally Posted by RogerTango View Post
    I must be one of the few to use NVENCc, pity too... its pretty good software.
    I am also using it occasionally when encoding speed matters. But for filtering I prefer Avisynth and provide the .avs script as source for NVEncC, or use Hybrid which accommodates both.
    Last edited by Sharc; 23rd Dec 2021 at 03:58.
    Quote Quote  
  6. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    Ive been trying to get Avisynth+ and NVENCc to play well together, no matter what I do, NVENCc crashes, so does FFMPEG. Im using the last revision, 64 bit version of DGIndex for VOB files (filthy rotten animal, wish they never came out with it).
    Quote Quote  
  7. Originally Posted by RogerTango View Post
    Ive been trying to get Avisynth+ and NVENCc to play well together, no matter what I do, NVENCc crashes, so does FFMPEG. Im using the last revision, 64 bit version of DGIndex for VOB files (filthy rotten animal, wish they never came out with it).
    Any error message ?

    Is it a valid script ? Does it work in vdub2 , avspmod or mpchc ?

    Post your script
    Quote Quote  
  8. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    I didnt try it with vdub2.. It did run in ffplay no problems (usually how I test my script for errors before I launch the encoder)

    Windows 10/32gb ram/plenty of free HD space/Nvidea GTX 1050ti


    excerpts from batch file

    dgindex -i "video.vob" -o dgvideo -om 2 -fo 1 -exit

    rename "dgvideo*.ac3" "dvdaudio.ac3"

    running version 2.0.0.6 of dgindex with 64bit dgdecode.dll

    heres the two encode lines Ive tried

    nvencc64 -i "dvd169.avs" --profile main --level 4 --dar 16:9 --multipass 2pass-full --preset p7 --codec h264 --lookahead 10 --audio-codec aac --audio-bitrate 128 -o "%%~na (HD).mp4"

    ffmpeg_x64 -fflags +genpts -i "dvd169.avs" -c:a aac -ac 2 -rc-lookahead 20 -aq-strength 8 -spatial-aq 1 -preset:v p7 -tune:v hq -rc:v vbr -cq:v 24 -b:v 0 -c:v h264_nvenc -preset medium -profile:v main -level:v 4 -pix_fmt yuv420p -aspect 16:9 -vf "removegrain" -y "%%~na (HD).mp4"



    Heres the basic content of the avs script: (all DLLs are 64bit) (avisynth+ 3.7.0 r3382)

    LoadPlugin("nicaudio.dll")
    LoadPlugin("dgdecode.dll")

    # DGINDEX
    V = MPEG2Source("dgvideo.d2v")
    #A = NicAC3Source("dvdaudio.ac3")
    A = NicAC3Source("dvdaudio.ac3",2,1)
    AudioDub(V, A)



    No rocket science going on here, I havent tried it with the software encoder yet, I am only interested in NVENC encoding (quality is very good with a few minor tweeks)


    If you see anything Im doing weird, let me know... I was using dgindex and ffmpeg waaaay back to make VCDs so neither are new to me (avisynth too...)

    Thanks,
    Andrew
    Last edited by RogerTango; 25th Dec 2021 at 11:14.
    Quote Quote  
  9. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    Frameserving the VOB though Avisynth to an encoder that was parsed with DGIndex is wonderful, you seldom have issues like a/v sync, etc... One reason I wanted to try and get it to work.
    Quote Quote  
  10. If ffplay is ok for the avs script, there is no reason why ffmpeg shouldn't work using the same avs... It suggests an issue with your NVEnc environment. If you check ffmpeg SW encode and it works, that rules out avs issue and strongly suggests NVEnc environment issue

    I just tested NVEncC 5.42 with avs input / dgmpegdec 2006 - and your commandline works ok for me

    Did you check if NVEncC works ok for you without avs ? Drivers ?



    Not related to crash, but is it a 29.97p DVD ? or 25p PAL DVD? - You're not encoding interlaced, and not IVTCing (EDIT: sorry you are IVTCing; -fo 1 forced film for dgindex)
    Last edited by poisondeathray; 25th Dec 2021 at 12:41.
    Quote Quote  
  11. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    Yeah, I was still playing with field order, some progressive VOBs and such.

    NVENC and FFMPEG would process the raw VOB without crashing, but often A/V sync went to hell..


    Oddly, the crash does not occur until LATE in the encoding with AVS, almost as if there is a memory leak or bug.. HandbrakeCLI is working 100% with NVENC, which is what I might have to stick with..

    The thing is... the VPP YADIF (CUDA) deinterlace filter is the *best* I have ever seen, almost indistinguishable from QTGMC! Ive never seen one work so damn good a badly interlaced media, and that outcome with with NVENC only, running it in FFMPEG does not work near as good...

    HandbrakeCLI is about the *only* software that Ive run to date that 99.98% of the time will read a raw VOB (without pre processing, etc..) and A/V sync is never out of step.

    Oddly, I can get (D1/720x480 --upscaled--> 1280x720) encodes with NVENC at around 460fps, but HBCLI is only about 260fps (The HQDN3D filter that I am using in HB may be the cause of it, but with 1:1:1:5:5:5 setting, its an awesome degrain, video looks better than source but never fake)

    Oddly, Ive been fingering with digital video & encoding for a loooong time, over 20 years (?), and I *still* try to make improvements to the system for premium final product.

    Ill go back and try SW encoding.. Previously I was running x264.exe and outcome looked great, but after doing 250+fps, 25fps is almost painfully long... HA HA!

    Thanks for your input, I really do appreciate it!

    Andrew


    Oh, and all Nvidia and CUDA drivers are latest version
    Quote Quote  
  12. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    I ran two test encodes last night with FFMPEG, did 1 progressive and 1 interlaced via DGIndex and AVS+, both ran fine and no crash using NVENC, so today I whipped up the
    automated batch to do bulk encodes and running a test on it.

    For progressive I use:

    16:9
    ffmpeg_x64 -hide_banner -i "dvdpro.avs" -c:a %acodec% -ac 2 -af "compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2,volume=3dB" -rc-lookahead 20 -aq-strength 8 -spatial-aq 1 -rc vbr -b:v %br% -maxrate:v %brmax% -bufsize:v 8M -c:v %vcodec% -profile:v main -level:v 4 -vf "hwupload_cuda,scale_cuda=1280:720,hwdownload" -pix_fmt yuv420p -aspect 16:9 -y "%pte%%%~na - (HD).mp4"

    4:3
    ffmpeg_x64 -hide_banner -i "dvdpro.avs" -c:a %acodec% -ac 2 -af "compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2,volume=3dB" -rc-lookahead 20 -aq-strength 8 -spatial-aq 1 -rc vbr -b:v %br% -maxrate:v %brmax% -bufsize:v 8M -c:v %vcodec% -profile:v main -level:v 4 -vf "hwupload_cuda,scale_cuda=960:720,hwdownload,pad=i h*16/9:ihow-iw)/2oh-ih)/2" -pix_fmt yuv420p -aspect 16:9 -y "%pte%%%~na - (HD).mp4"

    As you see, I am using CUDA resize for higher speed, and appears to be higher quality
    For 4:3, it is padded out to 16:9, just my personal preference even at the cost of slightly
    larger file size.




    For interlaced I use:

    16:9
    ffmpeg_x64 -hide_banner -i "dvdint.avs" -c:a %acodec% -ac 2 -af "compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2,volume=3dB" -rc-lookahead 20 -aq-strength 8 -spatial-aq 1 -rc vbr -b:v %br% -maxrate:v %brmax% -bufsize:v 8M -c:v %vcodec% -profile:v main -level:v 4 -vf "hwupload_cuda,yadif_cuda=1,scale_cuda=1280:720,hw download" -pix_fmt yuv420p -aspect 16:9 -y "%pte%%%~na - (HD).mp4"


    4:3
    ffmpeg_x64 -hide_banner -i "dvdint.avs" -c:a %acodec% -ac 2 -af "compand=.3|.3:1|1:-90/-60|-60/-40|-40/-30|-20/-20:6:0:-90:0.2,volume=3dB" -rc-lookahead 20 -aq-strength 8 -spatial-aq 1 -rc vbr -b:v %br% -maxrate:v %brmax% -bufsize:v 8M -c:v %vcodec% -profile:v main -level:v 4 -vf "hwupload_cuda,yadif_cuda=1,scale_cuda=960:720,hwd ownload,pad=ih*16/9:ihow-iw)/2oh-ih)/2" -pix_fmt yuv420p -aspect 16:9 -y "%pte%%%~na - (HD).mp4"


    As you can see here, I am accessing the video card's CUDA YADI, same as it was being accessed in NVENCc, quality
    is to me, visually identical to QTGMC without the cost of loading a lot of filters in the AVS and much reduced
    frame rate.


    Ill let you know how the long test does... keep your fingers crossed for no crashes! HA HA!
    Quote Quote  
  13. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    With AVS and the YADIF settings, the video has jutter, Im working to resolve it, will follow up when I key it in.
    Quote Quote  
  14. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    Im pretty sure I have it figured out, will be testing throughout the day and post back
    Quote Quote  
  15. If you weren't aware, DGIndexNV is free now . It's like DGIndex, but runs on compatible NVidia cards. It has GPU decoding and GPU filters. DGBob is the same as yadif cuda, or another option is Purevideo deinterlace (Neither are good deinterlacing options IMO; quality is noticable worse, and speed is a non issue for equivalent type of CPU deinterlacing). Also DGDenoise, DGSharpen, GPU cropping and GPU scaling as well. Read the manual for more info on GPU filters


    If the avs yadif is fwd/back/fwd/back jerky then it's likely wrong field order. If it's not smooth motion, then maybe you forgot to set mode=1 (double rate) . YOu can preview scripts in avspmod or mpchc - there is no need to do a dozen encodes
    Quote Quote  
  16. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    I had both with YADIF... first, I let it run auto, which is default TFF if it cant detect, so if it encoded my BFF video with TFF de interlace, thats not good.. I actually got it setup for TFF/TFF and BFF/BFF.

    The other thing was I had it set to one field per frame, it was coming out double frame rate... I changed it to one frame per frame and its just as good visually as double frame rate, only the encode bitrate is not spread across 60 fps.

    So far, so good.. And I need to get the NV version of DGI a run, I have some MTS files that need to be encoded, some come out with A/V sync issues so I think frameserving with AVS will fix that problem, as it has with many common VOB problems.

    So far Ive encoded about 30 videos today with batch file and not 1 crash yet.. I think it may have been the filter chain, or a DLL that was loaded in AVS that I wasnt using but was still "leaky", or something... whatever it was, it looks like "i have it fixed".

    http://underpop.online.fr/f/ffmpeg/help/yadif_005fcuda.htm.gz





    Ill keep yall updated...
    Quote Quote  
  17. Originally Posted by RogerTango View Post
    The other thing was I had it set to one field per frame, it was coming out double frame rate... I changed it to one frame per frame and its just as good visually as double frame rate, only the encode bitrate is not spread across 60 fps.
    It's can't be "just as good visually" . The motion will be smoother at 59.94p vs. 29.97p if you started with interlaced content . You have full motion samples at 59.94p. You discard half the original motion samples at 29.97p. If it looks exactly the same, it's not interlaced...
    Quote Quote  
  18. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    You have a good point, but... it does look good.

    BTW, I am trying the NV version of DGIndex on a BD file, and so far it is working good, Im going to try it with a VOB file later this week.
    Thanks for the tip on that!! I honestly didnt know it existed!


    Results of my encoding test are looking promising, I am going though encoded MP4s right not to evaluate final success, and
    Ill follow up with observations, I dont want to post prematurely and have to issue several corrections.

    Andrew
    Quote Quote  
  19. Member RogerTango's Avatar
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    Dude! I owe you a coffee & a chili dog!

    That DGindexNV is *way* better than the old DGIndex I was using!

    It serves up several BD files with *proper* A/V sync that were bad encodes before, and also I found 2 VOBs that is churned though and encoded to a great MP4, that with the old DG was a problem.

    Thank you!
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!