VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    has anyone ever had that feeling where encoding has gotten slower and slower over the years, even when you don't change anything major in your hardware? i'm still rocking an i7-8700k, 64gb ddr4, an an nvidia rtx 2070. x264 encoding through ffmpeg has been pretty slow for a 480i avisynth script and i don't know why. i'm only getting 20fps with preset slow. shouldn't it be a little faster? at least a bit more than realtime?

    x264 command:
    Code:
    ffmpeg -hwaccel auto -i "script.avs" -pix_fmt yuv420p -aspect 652:480 -vf setfield=bff -c:v libx264 -x264opts bff=1 -x264-params opencl=true -preset slow -crf 16 -c:a libfdk_aac -cutoff 18000 -vbr 5 "output.mkv"
    i also tried to encode another avisynth script. the source is a 1080i mpeg2 file deinterlaced with qtgmc and upscaled to 4k for youtube. i'm not expecting realtime encoding with this of course, but in 2023 i could get about 2-4fps with hevc_nvenc. now it takes 20 minutes just for the encode to even start and i only get 0.05fps and maybe an slow increase to 1-3 overtime. same encoding settings and same script.

    i'm trying to find some benchmarks of my cpu made when it came out (2017) and they aren't helpful. for x264 encoding benchmarks, a lot of them don't share the encoding preset or the resolution of the source, just framerates. so i can't tell if the speeds are accurate.

    does anyone have any tips that could potentially help in slightly speeding things up? or are these speeds expected with my cpu? i could've swore it was faster a couple years ago.

    hevc_nvenc command:
    Code:
    ffmpeg -hwaccel auto -i "script.avs" -pix_fmt yuv420p10le -c:v hevc_nvenc -rc vbr -cq 16 -qmin 16 -qmax 16 -b:v 0K -preset p7 -c:a copy "output.mkv"
    maybe these have always been the speeds i got. i'm not sure. does anyone know what's up?
    Quote Quote  
  2. What is your "script.avs" ?
    Since you mentioned QTGMC, be aware that if you updated it, filters and the effect of presets might have changed.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  3. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by Selur View Post
    What is your "script.avs" ?
    480i script:
    Code:
    SetFilterMTMode("DEFAULT_MT_MODE", 2)
    v = lwlibavvideoSource("G:\BlackMagic Captures\\Atlantic Record Music Video Tape_01.mkv", fpsnum=30000,fpsden=1001,rap_verification=false,prefer_hw=3)
    a = lwlibavaudiosource("G:\BlackMagic Captures\\Atlantic Record Music Video Tape_01.mkv")
    audiodub(v,a)
    Trim(774, 31345)
    Levels(0, 1,1035, 0, 1020, coring=false,dither=true)
    #turnRight().Histogram().TurnLeft()
    Trim(0, 30168)
    normalize(0.8912)
    Crop(0, 3, -0, -3)
    converttoyuv420(matrix="rec601", interlaced=true,chromaresample="spline36")
    prefetch(6)
    my source for that is a 10 bit 4:2:2 uncompressed avi, so i know that's part of the issue. but the script itself runs at over 200fps.

    1080i script:
    Code:
    SetFilterMTMode("DEFAULT_MT_MODE", 2)
    v = D2VSource("F:\fixed ts\CBS (WEVV) - 2-17-26 - Comics Unleashed With Byron Allen (2006) - S02E49 - Talia Reese; DeRay Davis; Matty Chymbor; Gabriel Rutledge.d2v")
    a = lwlibavaudioSource("F:\fixed ts\CBS (WEVV) - 2-17-26 - Comics Unleashed With Byron Allen (2006) - S02E49 - Talia Reese; DeRay Davis; Matty Chymbor; Gabriel Rutledge PID 101 2_0ch 192Kbps DELAY 30ms.ac3")
    audiodub(v,a)
    delayaudio(.030)
    Trim(0, 55744)
    v1=last
    v = D2VSource("F:\fixed ts\CBS (WEVV) - 2-18-26 - Comics Unleashed With Byron Allen (2006) - 2023-10-10 07 00 00 - Comics Unleashed With Byron Allen.d2v")
    a = lwlibavaudioSource("F:\fixed ts\CBS (WEVV) - 2-18-26 - Comics Unleashed With Byron Allen (2006) - 2023-10-10 07 00 00 - Comics Unleashed With Byron Allen PID 101 2_0ch 192Kbps DELAY 11ms.ac3")
    audiodub(v,a)
    delayaudio(.011)
    Trim(1978, 57477)
    #Trim(0, 55744)
    v2=last
    v1++v2
    normalize(0.8912)
    Trim(0, 110507)
    Trim(0, 1891) ++ Trim(2522, 110507)
    Trim(0, 2070) ++ Trim(14888, 109877)
    Trim(0, 8286) ++ Trim(14455, 97060)
    Trim(0, 15076) ++ Trim(22769, 90892)
    Trim(0, 21116) ++ Trim(28346, 83200)
    Trim(0, 21208) ++ Trim(30584, 75971)
    Trim(0, 27398) ++ Trim(33413, 66596)
    Trim(0, 34175) ++ Trim(44066, 60582)
    Trim(0, 40221) ++ Trim(48824, 50692)
    QTGMC(Preset="slow", ezdenoise=0.0, tr2=0, tuning="dv-hd", sourcematch=3, MatchEnhance=1, NoiseProcess=1, NoiseRestore=1.0, Sigma=0.0 , sharpness=0, border=false)
    SuperRes(matrixin="rec709", 2, .43, 0, """nnedi3_rpow2(2, nns=4, cshift="Spline36Resize")""", matrixout="rec709")
    prefetch(6)
    Originally Posted by Selur View Post
    Since you mentioned QTGMC, be aware that if you updated it, filters and the effect of presets might have changed.
    that might explain it the 1080i slowness.
    Quote Quote  
  4. Have you checked how fast the script runs through ffmpeg without encoding? Something like:

    ffmpeg -i "script.avs" -an -f null -

    That will show how fast AviSynth can actually deliver frames to ffmpeg. If the fps there is already low, then the bottleneck is the script (QTGMC, nnedi3, source filters, etc.), not the encoder.

    Also, did anything change recently (QTGMC version, plugins, AviSynth+, ffmpeg build, GPU driver)? QTGMC and its dependencies have changed over time and some presets can behave differently depending on plugin versions.
    Quote Quote  
  5. Originally Posted by ENunn View Post
    Code:
    ffmpeg -hwaccel auto -i "script.avs" -pix_fmt yuv420p -aspect 652:480 -vf setfield=bff -c:v libx264 -x264opts bff=1 -x264-params opencl=true -preset slow -crf 16 -c:a libfdk_aac -cutoff 18000 -vbr 5 "output.mkv"
    1) Use the newest FFmpeg release
    2) Omit -hwaccel auto
    3) Use a hardware-supported x264 encoder like h264_qsv (Intel platform), h264_nvenc (Nvidia graphics), h264_amf (AMD platform), instead of libx264.
    Quote Quote  
  6. Member
    Join Date
    May 2014
    Location
    United states
    Search Comp PM
    well, i guess this is something that only helped me. but when i'd be about to throw something into bd rebuilder and i knew had hours of encoding ahead and lots of x264 filters in the mix.

    i always got a nice speed boost by simply re-booting the computer. this was especially helpfully if the computer had been on for awhile.
    Last edited by geek gift; 5th Mar 2026 at 09:57.
    Quote Quote  
  7. Member
    Join Date
    Mar 2019
    Location
    Henderson, KY, USA
    Search PM
    Originally Posted by lumaField View Post
    Have you checked how fast the script runs through ffmpeg without encoding? Something like:

    ffmpeg -i "script.avs" -an -f null -

    That will show how fast AviSynth can actually deliver frames to ffmpeg. If the fps there is already low, then the bottleneck is the script (QTGMC, nnedi3, source filters, etc.), not the encoder.
    for my 480i script, i get 215fps.

    Originally Posted by lumaField View Post
    Also, did anything change recently (QTGMC version, plugins, AviSynth+, ffmpeg build, GPU driver)? QTGMC and its dependencies have changed over time and some presets can behave differently depending on plugin versions.
    i do update everything i can from time to time. that might explain it.

    Originally Posted by ProWo View Post
    1) Use the newest FFmpeg release
    2) Omit -hwaccel auto
    3) Use a hardware-supported x264 encoder like h264_qsv (Intel platform), h264_nvenc (Nvidia graphics), h264_amf (AMD platform), instead of libx264.
    done that. not a fan of nvenc's quality with low bitrates + last i tried, interlace support was weird.

    Originally Posted by geek gift View Post
    well, i guess this is something that only helped me. but when i'd be about to throw something into bd rebuilder and i knew had hours of encoding ahead and lots of x264 filters in the mix.

    i always got a nice speed boost by simply re-booting the computer. this was especially helpfully if the computer had been on for awhile.
    that definitely helps!
    Quote Quote  



Similar Threads

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