VideoHelp Forum
+ Reply to Thread
Results 1 to 22 of 22
Thread
  1. Some annoying issues start to occur with my Windows 10 computer, but only while I use AviSynth+ and QTGMC and nnedi3 to deinterlace and upscale video.

    Two of these issues are:
    • web browser functions much slower than normal
    • audio randomly stops working in all programs

    For audio to start to work again, I have to restart Windows 10. But I can't restart because the video processing in AviSynth+ is not finished. And I have to wait until video processing finished, and then restart, in order to have audio again.

    What solution exists so that nnedi3 doesn't take over the CPU like that, and not leave any CPU resources for audio to work? How do I set process priority to low for nnedi3 and QTGMC? I don't want to use another computer just for video processing.

    CPU temperature on this computer doesn't go over 46 degrees C. Computer audio never stopped working when I was using yadif and lanczos for deinterlacing and scaling. Audio only stopped working after I switched to QTGMC and nnedi3 for deinterlacing and scaling.
    Last edited by codemaster; 8th Oct 2023 at 16:48.
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Does your script use Prefetch() ? This would use more cpu threads thus probably increasing the overall % in use.
    Have you looked at the Windows Task Manager to see what is happening system-wide when this job is running?
    Quote Quote  
  3. Yes, I always added Prefetch() to the avs script in order to use multi-threading, so that it will process faster. I didn't know it could cause system instability. In Task Manager all I was able to do is to set x264.exe process priority to low, which improved stability but not enough. Now I'll try using AviSynth+ in single threading mode, to see if it solves these stability issues.
    Last edited by codemaster; 8th Oct 2023 at 18:45.
    Quote Quote  
  4. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Just wind back the number of logical processors Prefetch is using. As I increased mine, my scripts ran faster, because more of my CPU was being "used". I therefore assume the opposite will also true.
    Quote Quote  
  5. But other programs that were made to run automatically in multi threading mode, like x264 and ffmpeg, did not cause any stability issues so far on my computer. And AviSynth+ and it's plugins, by default are running in single threading mode, and maybe they're too old and not properly optimized for multi core processors.
    Quote Quote  
  6. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Specs of the computer could be a factor, but it's a guess since you haven't divulged those details
    Last edited by davexnet; 8th Oct 2023 at 20:18.
    Quote Quote  
  7. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    If the specs of your computer are current in your computer details then your system is very slow and will cause your issues,if not what's your current specs?
    I think,therefore i am a hamster.
    Quote Quote  
  8. I updated my computer specs on this forum. They are: Windows 10 64 bit, dual core CPU, 8 GB RAM.

    Running x264 and ffmpeg used both CPU cores, and there were no issues with stability. Running AviSynth+ with Prefetch() for deinterlacing and upscaling always causes stability issues like: web browser returns error message "out of memory" instead of loading web page, Windows audio stops working, web browser is no longer fast and has lag. And all these issues are gone after I restart Windows. So it seems that by running two instances of nnedi3 in multi threading mode, doesn't leave CPU resources for anything else that I need to do, such as web browsing and video playback.

    I'll remove Prefetch() from my avs script and test to see if these issues occur again. Because I suspect that nnedi3 is not properly optimized for multi core CPU. Otherwise, why would the QTGMC documentation include the recommendation to run QTGMC in single threaded mode?

    But I was also searching for a way to set AviSynth+ to start with low process priority. I can start x264 with low process priority, but I can't start AviSynth+ with low process priority because I don't know how or if it's possible.
    Quote Quote  
  9. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Originally Posted by codemaster View Post
    I updated my computer specs on this forum. They are: Windows 10 64 bit, dual core CPU, 8 GB RAM.

    Running x264 and ffmpeg used both CPU cores, and there were no issues with stability. Running AviSynth+ with Prefetch() for deinterlacing and upscaling always causes stability issues like: web browser returns error message "out of memory" instead of loading web page, Windows audio stops working, web browser is no longer fast and has lag. And all these issues are gone after I restart Windows. So it seems that by running two instances of nnedi3 in multi threading mode, doesn't leave CPU resources for anything else that I need to do, such as web browsing and video playback.

    I'll remove Prefetch() from my avs script and test to see if these issues occur again. Because I suspect that nnedi3 is not properly optimized for multi core CPU. Otherwise, why would the QTGMC documentation include the recommendation to run QTGMC in single threaded mode?

    But I was also searching for a way to set AviSynth+ to start with low process priority. I can start x264 with low process priority, but I can't start AviSynth+ with low process priority because I don't know how or if it's possible.
    You have to set it at the level of the host program. If you use x264 it's that, if you use Virtualdub, it's that.
    You symptoms seem suggestive of some kind of memory constraint; I have 8GB myself and don't have these issues
    (slowness due to under-powered CPU is another thing)
    Perhaps you should investigate your memory usage by using task manager and the Resource Monitor

    Encoding 4K video wil make great demands of your PC's RAM
    Quote Quote  
  10. I was encoding 480p. And CPU is not under powered, it's desktop CPU, 53W, 3.0 GHz. Task Manager shows no indication RAM is full during encoding. And before I used AviSynth+ and QTGMC, I used AviSynth with QTGMC, which is single threaded, and there were no stability issues. The stability issues started after I switched from AviSynth to AviSynth+ and Prefetch().
    Last edited by codemaster; 9th Oct 2023 at 15:45.
    Quote Quote  
  11. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Check the task manager for the memory available.
    Are you running a 32 bit version of x264 or your web browser?

    Did you set prefetch to (2) ?
    Image Attached Thumbnails Click image for larger version

Name:	tm_mem.jpg
Views:	7
Size:	116.8 KB
ID:	74272  

    Quote Quote  
  12. avs+ x64 or x86 ? If x86, that could be the problem. Nobody else has stability issues with QTGMC and NNEDI3 multithreading using prefetch with x64
    Quote Quote  
  13. This is my avs script that when I use it it causes issues:
    Code:
    SetFilterMTMode("DEFAULT_MT_MODE", 2)
    SetFilterMTMode("MPEG2Source", 3)
    MPEG2Source("Title03.d2v")
    QTGMC(Preset="Slower")
    nnedi3_rpow2(rfactor=2, cshift="Spline36Resize")
    Spline36Resize(854, 480)
    Prefetch(4)
    And the bat script with the x264 parameters is:
    Code:
    start /low /wait /b ^
    x264 --preset slower --tune film --crf 23 --colormatrix smpte170m --min-keyint 50 --keyint 500 --output outputfile.264 "avisynth script.avs"
    While x264 is running with this avs script as input, all kinds of annoying and weird issues occur that prevent me from using my computer. I just want it to run with low process priority, and at the same time be able to use my computer. I don't want to have to use two computers.

    Device Manager shows two CPUs. I use Prefetch(4) because what I know is that two CPUs equals 4 threads.

    CPU is not overclocked. CPU temperature in full load is maximum 46 C (115 F).

    I use AviSynth+ 64 bit, x264 64 bit, QTGMC 64 bit, chrome 64 bit, firefox 64 bit.

    After an issue occurs while using this avs script, I open Task Manager and RAM usage is below 75%. I tested RAM with memtest86 twice, and it found 0 errors. If QTGMC is not the cause of these issues, then nnedi3_rpow2 is. I tested SSD and HDD with chkdsk and Crystal Disk Info, and they have 0 bad sectors.

    Another question I have is: Is AviSynth+ more stable in single threading mode than in multi threading mode?
    Last edited by codemaster; 9th Oct 2023 at 16:19.
    Quote Quote  
  14. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    What CPU are you using?
    Quote Quote  
  15. Pentium G3220

    Doesn't matter what CPU, Windows 10 should be able to split CPU resources so I can use my computer while I deinterlace, upscale, and encode video. It can do that with ffmpeg, it can do it with x264, but it can't do it with avisynth+ and qtgmc and nnedi3_rpow2.
    Quote Quote  
  16. Originally Posted by codemaster View Post
    If QTGMC is not the cause of these issues, then nnedi3_rpow2 is.
    How did you come across that conclusion ? Did you run without nnedi3_rpow2 , and QTGMC only ?

    While x264 is running with this avs script as input, all kinds of annoying and weird issues occur that prevent me from using my computer. I just want it to run with low process priority, and at the same time be able to use my computer. I don't want to have to use two computers.
    Sure, but it's not a problem for other people - I do that all the time with multiple different computers, different hardware, with more complicated scripts that that with both QTGMC/NNEDI3_rpow2 and a few other filters. Thousands of other users do too - There aren't any bug reports like yours .

    So that suggests a local issue on your end, either with hardware, or some setup issue (maybe old plugin ? maybe old avs+ version ? maybe old nnedi3 version ?)

    Try updating your prerequisites / plugins / avs+ version

    Another question I have is: Is AviSynth+ more stable in single threading mode than in multi threading mode?
    It should be, if you have system problems . But it should be stable either way. Current AVS+ x64 along with current plugins are very stable now for multithreading.

    The old avs classic was the one with stability issues for multithreading, along with other issues like mixing up frames
    Quote Quote  
  17. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    According to this page, that CPU is 2 cores/2 threads.
    Perhaps you should adjust the prefetch to (2) or just leave it out
    https://www.techpowerup.com/cpu-specs/pentium-g3220.c1636
    Quote Quote  
  18. Originally Posted by poisondeathray View Post
    Did you run without nnedi3_rpow2 , and QTGMC only ?
    I did. Before I started to use nnedi3_rpow2, I was using QTGMC to deinterlace, and spline64 to resize to 720x406px. In single threading mode. And there were no stability issues, I could use the computer while processing video.
    Quote Quote  
  19. Originally Posted by davexnet View Post
    that CPU is 2 cores/2 threads.
    True, I should use Prefetch(2), not Prefetch(4). I thought that all Intel CPUs have that hyper threading feature, but this one doesn't have it.
    Quote Quote  
  20. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    I would do some tests with prefetch(2) and again with it commented out.
    Use task manager and look at cpu and memory utilization.
    Quote Quote  
  21. I found out what was causing all the stability issues while deinterlacing and upscaling with QTGMC and nnedi3. It was using Prefetch(4) with a CPU that has 2 threads.

    I removed Prefetch(4) from the avs script, and while encoding with x264 there were no stability issues, and I didn't even notice a drop in performance while using other programs.

    With Prefetch(4) added in the avs script, there are issues while encoding with x264, such as:
    - YouTube in Chrome frequently switches from 720p to 360p or 240p
    - Chrome returns error "out of memory" when accesing a website
    - audio stops working for all programs
    - lag in web apps in Chrome

    It was because I thought that my Intel CPU from 2013 has 4 threads. But it has two. Then later I found out that in 2013, Celeron and Pentium had 2 threads, and only i3, i5, and i7 had 4 threads.

    Similarly, the AVX feature is missing from Celeron and Pentium CPUs launched in 2013. And the stability issues were not caused by me installing AviSynth+ plugins compiled with AVX support, because I knew my CPU doesn't have AVX and AVX2 when I installed all AviSynth+ plugins.
    Last edited by codemaster; 17th Oct 2023 at 06:47.
    Quote Quote  
  22. Originally Posted by codemaster View Post
    But I was also searching for a way to set AviSynth+ to start with low process priority. I can start x264 with low process priority, but I can't start AviSynth+ with low process priority because I don't know how or if it's possible.
    You can do so with Task Manager. Find the encoding process and set the Priority to low. Here I'm encoding with x264 CLI:

    Image
    [Attachment 74377 - Click to enlarge]


    You can start a process with low priority via a drag-and-drop batch file. Here I'm using x264 CLI:

    Code:
    start /b /low "x264" "g:\program files\x264\x264-64bit.exe" --preset=slow --crf 18 --sar=1:1 --output "%~1.mkv" "%~1"
    Some GUI programs have an explicit setting for this. For example VirtualDub2's preferences:

    Image
    [Attachment 74378 - Click to enlarge]
    Last edited by jagabo; 17th Oct 2023 at 07:06.
    Quote Quote  



Similar Threads

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