Selur's Little Message Board
Avisynth preview error - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html)
+--- Thread: Avisynth preview error (/thread-1704.html)



Avisynth preview error - serg - 29.01.2021

Processing short video (10 sec) works fine.
However attempt to just preview whole clip, even without any filter assigned, (around 3.5 mins) caused an error :"Avisynth preview error: -> Requested buffer size of 18446744072213944320 is too large".
This error happens on both 32 bit and 64 bit Avisynth.
My system has 32 GB RAM.
Task Manager shows around 3% memory consumption.


RE: Avisynth preview error - Selur - 29.01.2021

This doesn't happen here, so my guess is that it's LWLibavVideoSource having problems with your source.

Possible workarounds you can try:
a. enable the hardware decoding, which will help if your content is decodable through the vpu of your graphics card / cpu.
b. enable 'Filtering->Avisynth->Misc->Prefer FFMpegSource' (and do not enabled 'LibavVideoSource instead of FFmpegSource'). This way if FFmpegSource supports the input it will be used instead of LWLibavVideoSource.
c. enabling 'Use L-Smash for mp4 input' might also work, not totally sure whether it only works for mp4 or 'mp4 compatible' content.
d. I have also seen this happen when some anti virus or firewall solution ran amok and tried to interfere with Avisynth filter loading.
e. might also happen if the source is broken in some way or the input format is not supported by libav&co.

Quote:Task Manager shows around 3% memory consumption.
Task manager would only show something when the memory consumption is slowly increasing. If randomly more memory is requested then available the filter just crash. Smile


Cu Selur


RE: Avisynth preview error - serg - 29.01.2021

(29.01.2021, 20:20)Selur Wrote: This doesn't happen here, so my guess is that it's LWLibavVideoSource having problems with your source.

Possible workarounds you can try:
a. enable the hardware decoding, which will help if your content is decodable through the vpu of your graphics card / cpu.
b. enable 'Filtering->Avisynth->Misc->Prefer FFMpegSource' (and do not enabled 'LibavVideoSource instead of FFmpegSource'). This way if FFmpegSource supports the input it will be used instead of LWLibavVideoSource.
c. enabling 'Use L-Smash for mp4 input' might also work, not totally sure whether it only works for mp4 or 'mp4 compatible' content.
d. I have also seen this happen when some anti virus or firewall solution ran amok and tried to interfere with Avisynth filter loading.
e. might also happen if the source is broken in some way or the input format is not supported by libav&co.

Quote:Task Manager shows around 3% memory consumption.
Task manager would only show something when the memory consumption is slowly increasing. If randomly more memory is requested then available the filter just crash. Smile


Cu Selur
Tried all suggested workarounds.
None of them does work.
However in AvsPmod/Virtualdub2 all input filters (LWLibavVideoSource, LSMASHVideoSource, FFmpegSource2) work with the same video flawlessly.


RE: Avisynth preview error - Selur - 29.01.2021

Quote:However in AvsPmod/Virtualdub2 all input filters (LWLibavVideoSource, LSMASHVideoSource, FFmpegSource2) work with the same video flawlessly.
Did you use the same script? (script can be seen in the Avisynth Script View; and the debug output,..)
Are you using the same Avisynth+ version?

If you did not try the same script the problem with be with the multi-threading options, you can try:
a. lowering the MT-Threads ('Config->Avisynth->Script->Miscellaneous->MT-Threads')
b. disabling MT ('Config->Avisynth->Script->Miscellaneous->Disable MT').
c. Limiting the memory Avisynths Filters can use ('Config->Avisynth->Script->Miscellaneous->AvisynthPlus limit memory').

There is also an option to tell Hybrid to use avs2yuv instead of ffmpeg as decoder (Config->Internals->Avisynth->Prefer avs2yuv as decoder) for Avisynth scripts.

Cu Selur


RE: Avisynth preview error - serg - 29.01.2021

(29.01.2021, 21:39)Selur Wrote:
Quote:However in AvsPmod/Virtualdub2 all input filters (LWLibavVideoSource, LSMASHVideoSource, FFmpegSource2) work with the same video flawlessly.
Did you use the same script? (script can be seen in the Avisynth Script View; and the debug output,..)
Are you using the same Avisynth+ version?

If you did not try the same script the problem with be with the multi-threading options, you can try:
a. lowering the MT-Threads ('Config->Avisynth->Script->Miscellaneous->MT-Threads')
b. disabling MT ('Config->Avisynth->Script->Miscellaneous->Disable MT').
c. Limiting the memory Avisynths Filters can use ('Config->Avisynth->Script->Miscellaneous->AvisynthPlus limit memory').

There is also an option to tell Hybrid to use avs2yuv instead of ffmpeg as decoder (Config->Internals->Avisynth->Prefer avs2yuv as decoder) for Avisynth scripts.

Cu Selur

Looks like I've found the problem (I'm not sure, but now it works).
Original video consists 2 audio tracks: first - PCM and second AC3.
Based on successful results of the processing short segments of the same video, I realized that I took them from the original video without audio tracks.
So, after removing the 2nd AC3 from original video (without video re-encoding) everything works fine.
P.S. I'm using Avisynth+ 3.5 (r3106.3.5.i386)


RE: Avisynth preview error - Selur - 29.01.2021

So you didn't use the same script and source in your tests outside of Hybrid,...
Okay,..
Happy you found the problem.

Cu Selur


RE: Avisynth preview error - serg - 29.01.2021

(29.01.2021, 22:10)Selur Wrote: So you didn't use the same script and source in your tests outside of Hybrid,...
Okay,..
Happy you found the problem.

Cu Selur

The only script I used outside of Hybrid is LWLibavVideoSource() or LSMASHVideoSource() or FFmpegSource2().
All of them recognize original video with 2 audio tracks(PCM and AC3)
In Hybrid I didn't use any filters and get it work only after removing 2nd audio track AC3