Log in

View Full Version : AviSynth Slow Encoding Speed Bug


VideoFanatic
22nd March 2015, 14:35
Hi, I was hoping the latest version of AviSynth would have fixed the following bug but the bug still remains. Would you be able to fix this for the next release please?

The bug is that I could be encoding with MT or Non-MT fine for a few days then at random the next encoding and all encodings after that will encode at half the speed or lower. The only way to fix this is to restart my PC. Has anyone else experienced this bug?

StainlessS
22nd March 2015, 14:53
How long do you tend to keep your machine active since initial boot ? (sleep/hibernate counts as kept active).
Anything out of the ordinary shown in Task Manager when exhibiting bug ? (compared with when working OK
EDIT: when machine idle).
Anything weird shown in Event Logs ?
There is not much to go on (did you report the bug prior to today, if not then not surprising that its not fixed).

EDIT: IMHO, you are asking for trouble expecting Windows to perform faultlessly without at least one cold boot per day.

mandarinka
22nd March 2015, 15:17
EDIT: IMHO, you are asking for trouble expecting Windows to perform faultlessly without at least one cold boot per day.

Has that ever been actual reality since Windows 2000? I don't have such an experience at least.

VideoFanatic
22nd March 2015, 15:19
How long do you tend to keep your machine active since initial boot ? (sleep/hibernate counts as kept active).
Anything out of the ordinary shown in Task Manager when exhibiting bug ? (compared with when working OK
EDIT: when machine idle).
Anything weird shown in Event Logs ?
There is not much to go on (did you report the bug prior to today, if not then not surprising that its not fixed).

EDIT: IMHO, you are asking for trouble expecting Windows to perform faultlessly without at least one cold boot per day.

I use Windows 7 64-bit. My PC is on all the time, I never switch it off as it's always encoding something. When the bug happens I've noticed that CPU usage Task Manager goes from 70% to 100%. Don't know what Event Logs are - where do I find those and what should I be looking for inside them?

Is there any way to get AviSynth to log problems such as what's causing the slow encoding speed so I can give that error log to you?

Groucho2004
22nd March 2015, 15:52
IMHO, you are asking for trouble expecting Windows to perform faultlessly without at least one cold boot per day.
Huh? I've had NT4, Win2K and XP running for weeks at a time and had no trouble.

Groucho2004
22nd March 2015, 15:59
Hi, I was hoping the latest version of AviSynth would have fixed the following bug but the bug still remains. Would you be able to fix this for the next release please?

The bug is that I could be encoding with MT or Non-MT fine for a few days then at random the next encoding and all encodings after that will encode at half the speed or lower. The only way to fix this is to restart my PC. Has anyone else experienced this bug?
I don't think it's a Avisynth bug. I have never heard of this nor have I experienced it myself. My first guess would be that some crappy program is running in the background hogging CPU cycles or that something in your encoding chain does not terminate properly. Check Task Manager for processes that consume CPU cycles when you come across this again.

StainlessS
22nd March 2015, 16:02
M$ client OS are deliberately an inferior product, less fault tolerant, you are expected to pay for the extra luxury of 24/7 operation.
Also, non OS software can of course cause problems due to not releasing some resources, these could of course mount up
(could be plugins or some other software that you use).

I've noticed that CPU usage Task Manager goes from 70% to 100%

EDIT: when machine idle

Event logs can be found by right click on "My Computer" (either on desktop if there, or inside Folders in Windows Explorer), and select
'Manage' (unless they renamed it to something else on W7). You should see 'Event Viewer' and inside that "Application" and "System"
entries containing the logs (plus others). Any nasty looking red ones ?

Is there any way to get AviSynth to log problems
Avisynth v2.58 was (I think) compiled with some debugging enabled (shows in DebugView, google), v2.6 does not
have any debugging enabled (probably not of much use anyway).

EDIT: And what Grouchy said :)

EDIT: Or for Event viewer direct from Start/Run or command line, enter eventvwr.msc

Groucho2004
22nd March 2015, 16:12
M$ client OS are deliberately an inferior product, less fault tolerant, you are expected to pay for the extra luxury of 24/7 operation.
If you compare WinXp64 and Windows Server 2003 x64 for example you'll see that they are exactly the same OS and have the same driver model. Some bells and whistles are turned off and some services are added in the Server version.

I'd like to see some proof of your claim.

StainlessS
22nd March 2015, 16:15
OK, but that was definitely true of W2K (and I thought XP/W2K3 [32bit, 64bit was I think a different animal]).

EDIT: If you extract eg W2K Service Pack4, you will find about 6 or 7 directories for the different versions of OS,
all files in the individual directories are particular to those versions (cant remember if XP was same).

OK, had a look at XP32 ServicePack 3, and of course it does not support Server 2003 which has its own service pack
(ie completely different OS).
XP32 SP3 does however support a number of different versions of XP but the style has changed somewhat,
these seem to be directories related to selection of OS [where I think 'ic' is XP home (Intel consumer) and
'ip' (Intel Professional)].


c:\q\i386\istart\
c:\q\i386\ip\
c:\q\i386\ip\
c:\q\i386\inp\
c:\q\i386\inc\
c:\q\i386\ikp\
c:\q\i386\iknp\
c:\q\i386\iknc\
c:\q\i386\ikc\
c:\q\i386\ic\
c:\q\i386\ic\

I think the 'k' versions might be Korean.
The directories besides 'ip' and 'ic' are just configuration directories with only 9 or 10 files, main files
taken from ic and ip.

In W2K, there were completely distinct directores for the different server versions and client, eg 'sb'
was I think W2K Small Business Server.

Groucho2004
22nd March 2015, 16:21
OK, but that was definitely true of W2K (and I thought XP/W2K3 [32bit]).
XP32 is NT5.1, W2K3 is NT5.2.

Groucho2004
22nd March 2015, 16:24
If you extract eg W2K Service Pack4, you will find about 6 or 7 directories for the different versions of OS,
all files in the individual directories are particular to those versions (cant remember if XP was same).
Still no proof of your claim that the client versions are less fault tolerant (or what exactly that means when it's not related to hardware).

We're getting way off topic here...

TheFluff
23rd March 2015, 17:33
EDIT: IMHO, you are asking for trouble expecting Windows to perform faultlessly without at least one cold boot per day.

hi stainlesss, here's a fact that may be surprising to you (it's true though!): the year is not currently 1998

Groucho2004
23rd March 2015, 17:58
hi stainlesss, here's a fact that may be surprising to you (it's true though!): the year is not currently 1998
Yes, you have made it abundantly clear that you are aware of what year it is and that you disapprove of people using the software of their choice.

Let it go.

TheFluff
23rd March 2015, 18:44
Yes, you have made it abundantly clear that you are aware of what year it is and that you disapprove of people using the software of their choice.

Let it go.

this is not about using the wrong software though, this is spreading blatant misinformation about how software works today

(surprisingly, it does not work like it did in 1998)

StainlessS
23rd March 2015, 19:39
(surprisingly, it does not work like it did in 1998)
I wonder what he's using

The bug is that I could be encoding with MT or Non-MT fine for a few days then at random the next encoding and all encodings after that will encode at half the speed or lower. The only way to fix this is to restart my PC.

raffriff42
25th March 2015, 04:23
100% CPU on idle? Try these:
* Make sure your working (encoder temp & output) folder Properties, Advanced, "allow files to have contents indexed" is UN-checked.
* Make sure Windows Media Player's "media library" does NOT include your working folders.
* Disable video thumbnail creation (http://superuser.com/questions/152272/how-do-i-disable-video-thumbnails-in-windows-7).
* If you have any other background processes ("continuous backup," "update" etc), take appropriate action.

pandy
25th March 2015, 11:51
High CPU load (unknown reason) means: search for problem but usually not in mainline of OS files - usually non MS driver or weird process - there is plenty of services not used for anything that runs and consume resources (i always remove most of services - also MS - useful for everyone except me, turning off Aero, all beautifiers, even wallpaper will improve system performance - stupid translucency or shadow under cursor will consume IMHO to much - after removing all this garbage i always feel that some nasty curtain between and machine was removed - strange but works in real life - observe also memory usage - my impression is that NT as general is good and stable product (and i used NT from version 3.1 up to Win7 - still prefer Win2000 over XP however i was forced to start using XP by nasty developers - shame on You Guys!).

VideoFanatic
25th March 2015, 19:28
Event logs can be found by right click on "My Computer" (either on desktop if there, or inside Folders in Windows Explorer), and select
'Manage' (unless they renamed it to something else on W7). You should see 'Event Viewer' and inside that "Application" and "System"
entries containing the logs (plus others). Any nasty looking red ones ?

Tast Manager Processes: http://postimg.org/image/aphkj8xyz/
Task Manager Performance (CPU & RAM usage): http://postimg.org/image/p7err8pa3/
Event Viewer: http://postimg.org/image/k6pc7juyd/

Above are screenshots I've taken. I can't see any problems. In event viewer you said to look for "Application" and "System". I can't find those. In the event viewer screenshot I posted, what should I be clicking on to find red entries?

Also when I said the slow encoding speed bug happens and CPU usage goes to 100%. That only happened a few times. Most of the time CPU usage stays at 75% or under which was the same usage before the bug. Apart from this Avisynth problem my PC is quite stable and doesn't have any other problems.

StainlessS
25th March 2015, 19:50
From searching google, looks like they hid System and Application in the Windows Logs folder (only one extra click, just above the folder you did look in).

Good god !, how many copies of chrome are you running (as well as FireFox and PaleMoon browser, and PaleMoon portable).

I think unsecapp.exe running might indicate a problem (not sure, think I've had that start after some kind of problem).

You seem to have an awful lot of stuff running. Try clean boot, wait till settles and take a note of all running tasks.
You can probably kill off (EDIT: prevent from start) a few eg Java update scheduler and the likes. I would find out what every non system item is
and see if you actually need it. (eg I think you can go to the java thing in control panel [or whatever its called now]
and switch off the auto update [I hate stuff like that]).

Take a snap of what is running when you are up from clean boot with all the rubbish removed, can then compare with
what is running when problems occur.

EDIT: I can recommend WinPatrol for spotting stuff added to auto run, and to disable/delete them (just turn off the sound effects,
they can scare the Sh1t out of you in the middle of the night [methinks a highland terrier going WOOF!]).

VideoFanatic
25th March 2015, 20:08
Apparently unsecapp.exe is a vital system process and should not be terminated. I've only got 2 Chrome portables running, 1 Pale Moon Portable and 1 Firefox Portable. I'll try what you said - I'll note down all running programs on boot. I don't want to switch off java auto updates as updates are needed for certain programs.

StainlessS
25th March 2015, 20:44
I know unsecapp is system exe and should not be terminated. However, I only had that start (in a previous setup) after some kind
of problem occurred, and it thereafter continued to auto start. I do not have it running now.
https://s20.postimg.org/wuwxmd9bx/Task_Manager_zps8bc6ucix.jpg (https://postimg.org/image/7ovzfj81l/)

I don't want to switch off java auto updates
Your choice.

EDIT: I currently have Visual Studio 6 and MSDN help open, as shown in Task Manager (they would not usually appear on idle m/c).
EDIT: And of course firefox is running as I'm here now.
EDIT: That is XP32 by the way.
EDIT: Bitmeter2 is a bandwidth monitor [seemingly highish mem usage down to DOT NET shared stuff] and first 4 items beginning with 'c' are
from Comodo Internet Security Suite, WinPatrol at the bottom. stacsv.exe is basic audio driver (I disable Hi-Def audio driver).
All the rest are operating system.

Wilbert
25th March 2015, 21:03
Moved all non-relevant posts to a separate thread. If you figured out how to replicate it then we can have a look at it. Are we sure it is an AviSynth problem?

Groucho2004
25th March 2015, 22:02
Are we sure it is an AviSynth problem?
No, and I doubt it is.

VideoFanatic
30th July 2015, 04:01
Found out the cause. I was only encoding 1 video with MeGUI but looked at the processes and there were 2 of these running: X264_64.exe
Ended one of them and the problem was fixed. So it seems MeGUI sometimes leaves a process open when it shouldn't - looks like a bug.