VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Hi,
    I'm currently encoding a 1h23min video in 1280x720 resolution and 29.97 FPS framerate, using ffmpeg 32 bits + libx264 -crf 20 -preset "slower", through an Avisynth script which involves mainly interpolation commands to repair blurry frames (quite a lot – about 8000 out of 150000, using a combination of FrameSurgeon, Morpheus and Morph), from a losslessly rendered movie in Lagarith codec (about 120GB), with a computer based on an Intel i7 6700K CPU with 16GB of RAM. And the encoding rate is surprisingly low : 0.127x which is about 3.80 frames per second if I'm not mistaken (I started it at 02:51 and now at 11:22 it's about 75% completed). I remember having similar encoding rates with similar kind of footage with my former machine based on a 2009 low-end E5200 CPU (without frame interpolation but with at least as resource-intensive denoising functions). Is this to be expected in this case ? Are there ways to improve the performance ? Is it in part due to Avisynth running monothreaded ? I've read a while ago that Avisynth could be run multithreaded but that it was considered experimental / potentially unreliable ; is it still the case, or has it improved since then ? Does this affect the outcome of the compression ? (I've read somewhere that multithreaded encoding tended to be a tad less efficient.) Also, would it improve matters to use Avisynth and ffmpeg in 64 bits ? I managed to run the Avisynth script in 64 bits, but then I noticed that some frame interpolations (among those made by the Morph function, not all of them) were wonky, I have no idea why, and it's unlikely to be solved (according to "StainleSS" from Doom9, "Jenyok functions sometimes have 'undocumented features', and tend to be a bit big and cumbersome"), so I'll have to stick to 32 bits Avisynth for this task.
    Thanks for any kind of clue.

    EDIT : Also, ffmpeg process is running at 20-23% of available CPU power, and currently taking up about 2.2GB of RAM.
    Last edited by abolibibelot; 28th Dec 2019 at 04:40.
    Quote Quote  
  2. I used to run AviSynth multithreaded all the time. Now I use AviSynth+ which was built to be multithreaded from day one.

    Yes, the slowness of your script is probably because of the single threaded AviSynth. Encoding a 1280x720 video with x264 at the slower preset runs about 9 fps on my old i5 2500K.
    Quote Quote  
  3. Thank you for these insights. I asked the same questions and some more at Doom9 and got more replies there, if anyone is interested, now or in the far future :
    https://forum.doom9.org/showthread.php?t=177309
    https://forum.doom9.org/showthread.php?t=177310

    As a quick note, the versions of Avisynth I had installed previously were Avisynth 2.6.0.5 from 2015/02/20 (if I remember correctly I had to install it over Avisynth+ 0.1 r2772 32 bits a few months ago because the latter wouldn't work with ffmpeg, using AvisynthInstaller) and Avisynth+ 0.1 r2772 x64. The former was very slow and the latter had an issue with the Morph function. Yesterday I installed Avisynth+ 3.4.0 and had an astonishing 24x processing speed improvement (from 11h24min down to 28 minutes according to AVSMeter) from Avisynth alone, while the encoding with ffmpeg was made at approximately 1x the playing rate or 30 FPS, instead of 0.127x. And the Morph issue is not present with this version (although in the mean time, as a workaround, since there were only a dozen Morph commands, I completely removed them from the script, after taking screenshots, and then re-inserted those frames with RemapFrames, either the Morph processed frames as-is or a combination of the native frame and the interpolation(s) that worked best, pasted together with GIMP {*}, and likewise re-insterted the result with RemapFrames – as I had already done this for a bunch of problematic frames it wasn't too much of a hassle).



    {*} For those few frames I chose to process with Morph, the interpolation produced by either FrameSurgeon or Morpheus produced ugly artifacting on moving objects, so Morph, although usually inferior as it basically blends adjacent frames instead of actually interpolating the missing one(s), was better than nothing in those cases. For some of them I managed to get a better result by combining the interpolation of the background and a layer from the native frame with only the moving objects (usually people, which are a particular kind of mobile objects with the ability to talk, write opera and design nuclear weapons). At that point, I was definitely overkilling the overkillness, akin to Son Goku who gets smaller arteries upon his trunk-sized arteries when going Super Saiyan level 3...
    Quote Quote  



Similar Threads

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