Topic: Avisynth Encodings Crash with 2 seconds left when Using SVP

Hi, I've got some 1080i 25fps x264 videos that I'm trying to convert to 720p 59.94 fps x264 using MeGUI 2836, Avisynth 2.6 with the Avisynth SVPflow 4.2.0.142 dll files and the Interframe script here: http://www.spirton.com/interframe/.

My script does this fine and I can encode several files but every couple of days all my encodings crash with 2 seconds remaining encoding time! Technically it doesn't crash but the Status window is frozen. I looked at Task Manager and the x264 processes aren't there and the CPU usage is zero. The jobs still show as "Processing" in MeGUI.  I looked in the MeGUI intermediate folders and the ".264" file size isn't zero which means that the encoding has indeed finished. I muxed the finished files manually and they were complete. I have a 16 core CPU and I encode 6 videos at once. I don't get crashes when NOT using SVP.

Here's my Avisynth script (I'm NOT using Avisynth MT):

<input>
AssumeTFF()
Spline36Resize(1280,1080)
Yadif(mode=1, order=1)
Spline36Resize(1280,720)
InterFrame(GPU=false, Tuning="Smooth", OverrideAlgo=13, Cores=1)
I don't use the GPU as it gives picture glitches.

Can you help please. Thanks

Re: Avisynth Encodings Crash with 2 seconds left when Using SVP

When I did reencodings with frame intrepolations I used construction to remove several frames from the end:

trim(0,framecount-10)

Insert it into the end of your script.
10 is empirical value. The value can be from 1 to 20. It depends on threads count and smoothing factor.

It helped me to avoid encoder hangs.

3 (edited by DaveyMames 23-04-2018 15:06:44)

Re: Avisynth Encodings Crash with 2 seconds left when Using SVP

Thanks. What value should I use for the trim? This is my Interframe script:

InterFrame(GPU=false, Tuning="Smooth", OverrideAlgo=13, Cores=1)

Re: Avisynth Encodings Crash with 2 seconds left when Using SVP

> Cores=1
Then start from 1 and encrease by one if the error repeats. Test on short video clips to get fast results. wink

5 (edited by DaveyMames 24-04-2018 00:26:17)

Re: Avisynth Encodings Crash with 2 seconds left when Using SVP

I don't understand. You said I could use your trim script to prevent crashes. What value should I use for the trim if this is my script?:
InterFrame(GPU=false, Tuning="Smooth", OverrideAlgo=13, Cores=1)

Re: Avisynth Encodings Crash with 2 seconds left when Using SVP

Your script must be like this:

InterFrame(GPU=false, Tuning="Smooth", OverrideAlgo=13, Cores=1)
trim(0,framecount-1)

If it hangs then change to 2:

InterFrame(GPU=false, Tuning="Smooth", OverrideAlgo=13, Cores=1)
trim(0,framecount-2)

and so on...

The crashes (or hangs) I faced was connected to decoder trying to get frame number greater than framecount. I can be wrong but trim helped me.

Re: Avisynth Encodings Crash with 2 seconds left when Using SVP

Thanks. Just checking that's the correct command as that command Trims the audio if it's longer than the video?

Today I got this error: Process exits with error: 0xC0000005 STATUS_ACCESS_VIOLATION (-1073741819). A video starts encoding for a few secs then it crashes and it shows as "Error" in the MeGUI queue.

I'm not sure if it's related to the problem I mentioned before however it only happens with the interframe script and this:

trim(0,framecount-1)

I've attached my MeGUI log if that's of any use to you. If I increase the framecount number will that stop the crash?

Post's attachments

Log Smackdown 2016 15 Apr 14.txt 21.46 kb, 282 downloads since 2018-04-26 

Re: Avisynth Encodings Crash with 2 seconds left when Using SVP

> 0xC0000005 STATUS_ACCESS_VIOLATION (-1073741819)
It is the other error. Maybe it is related. We will look what it can be and how to fix it.

> it only happens with the interframe script and this: trim(0,framecount-1)
Thank you. I expect it can help.

> If I increase the framecount number will that stop the crash?
If you mean trim(0,framecount+...) then not. It will cause the avisynth error about out of the bounds of frame number.

trim(0,framecount-N)
It is just the command to trim (delete) N frames at the end of video. It is kind of lifehack to avoid encoder to get last frame that can cause the crush or hang.

Re: Avisynth Encodings Crash with 2 seconds left when Using SVP

If I understand you correctly as you saying there's nothing I can do to prevent this error?:
0xC0000005 STATUS_ACCESS_VIOLATION (-1073741819)

Re: Avisynth Encodings Crash with 2 seconds left when Using SVP

> 0xC0000005 STATUS_ACCESS_VIOLATION (-1073741819)
We have not solution for this error yet.

Re: Avisynth Encodings Crash with 2 seconds left when Using SVP

I've tried various trim numbers and none of them fixed the problem. Hope this problem gets fixed in the future.