FranceBB
21st September 2017, 19:27
Hi,
it seems that Avisynth crashes due to Dither Tool. I tried to use SetMemoryMax(128) to reduce the cache, but it didn't help, 'cause RAM was already fine, between 1.2 and 1.4 GB. It crashes before the end in all the five tests I made. At 99.8% and 99.2% in a 6 minutes content and at about 78.9% in a 22 minutes content. Seeking back and forth in AVSPmod is fine and doesn't give any error. It crashes in both Windows XP x86 and Windows Server 2008 R2 (based on Windows 7).
My AVS Script:
FFMpegSource2("ExtraEdition.mov", fpsnum=30000, fpsden=1001, atrack=-1)
ResampleAudio(48000)
Normalize(0.89, show=false)
Dither_convert_8_to_16()
dfttest(sigma=64, tbsize=1, lsb_in=true, lsb=true, Y=true, U=true, V=true, opt=3, dither=0)
LinearResize(3840, 2160, kernel="spline64", mode=0, lsb_in=true, lsb_out=true, TVrange=true, matrix="709", matrix_out="709", cplace_in="mpeg2", cplace_out="mpeg2", NoRing=false, interlaced=false)
f3kdb(range=15, Y=45, Cb=30, Cr=30, grainY=0, grainC=0, sample_mode=2, blur_first=true, dynamic_grain=false, opt=3, mt=true, keep_tv_range=true, input_mode=1, input_depth=16, output_mode=1, output_depth=16)
s16 = last
DitherPost (mode=-1)
TextSub("Extra Edition - Epilogue.ass")
Dither_convert_8_to_16 ()
s16.Dither_limit_dif16 (last, thr=1.0, elast=2.0)
Dither_Out()
and my x265 command line:
@echo off
@avs4x265.exe --input-depth 16 --dither --preset medium --level 5.1 --tune fastdecode --ref 2 --rc-lookahead 3 -b 2 --profile main10 --crf 23 --deblock -1:-1 --overscan show --colormatrix bt709 --range limited --transfer bt709 --colorprim bt709 --videoformat component --no-open-gop --min-keyint 1 --repeat-headers --rd 3 --vbv-maxrate 25000 --vbv-bufsize 32000 --asm=sse4.2 --wpp --csv encodinglog.csv --log-level 2 --csv-log-level 2 -o "raw_video.hevc" "AVS Script.avs"
@echo+
@audio.exe -i "AVS Script.avs" -vn -sn -c:a aac -b:a 320k -ar 48000 "output_file.aac"
pause
I used two different samples and they have two different lengths, but both crashed at different percentages, so I don't think it's related to the source. I'm now trying to encode one more time with the same sample and the same filters, but at 8bit instead of 16bit, just to be sure that it's Dither Tool that is making Avisynth crash.
"encodinglogs.csv" file doesn't contain any info about the crash; it just reports all the frames served by Avisynth to x265 and how they have been encoded.
Any advice? Any suggestion?
Thank you in advance.
it seems that Avisynth crashes due to Dither Tool. I tried to use SetMemoryMax(128) to reduce the cache, but it didn't help, 'cause RAM was already fine, between 1.2 and 1.4 GB. It crashes before the end in all the five tests I made. At 99.8% and 99.2% in a 6 minutes content and at about 78.9% in a 22 minutes content. Seeking back and forth in AVSPmod is fine and doesn't give any error. It crashes in both Windows XP x86 and Windows Server 2008 R2 (based on Windows 7).
My AVS Script:
FFMpegSource2("ExtraEdition.mov", fpsnum=30000, fpsden=1001, atrack=-1)
ResampleAudio(48000)
Normalize(0.89, show=false)
Dither_convert_8_to_16()
dfttest(sigma=64, tbsize=1, lsb_in=true, lsb=true, Y=true, U=true, V=true, opt=3, dither=0)
LinearResize(3840, 2160, kernel="spline64", mode=0, lsb_in=true, lsb_out=true, TVrange=true, matrix="709", matrix_out="709", cplace_in="mpeg2", cplace_out="mpeg2", NoRing=false, interlaced=false)
f3kdb(range=15, Y=45, Cb=30, Cr=30, grainY=0, grainC=0, sample_mode=2, blur_first=true, dynamic_grain=false, opt=3, mt=true, keep_tv_range=true, input_mode=1, input_depth=16, output_mode=1, output_depth=16)
s16 = last
DitherPost (mode=-1)
TextSub("Extra Edition - Epilogue.ass")
Dither_convert_8_to_16 ()
s16.Dither_limit_dif16 (last, thr=1.0, elast=2.0)
Dither_Out()
and my x265 command line:
@echo off
@avs4x265.exe --input-depth 16 --dither --preset medium --level 5.1 --tune fastdecode --ref 2 --rc-lookahead 3 -b 2 --profile main10 --crf 23 --deblock -1:-1 --overscan show --colormatrix bt709 --range limited --transfer bt709 --colorprim bt709 --videoformat component --no-open-gop --min-keyint 1 --repeat-headers --rd 3 --vbv-maxrate 25000 --vbv-bufsize 32000 --asm=sse4.2 --wpp --csv encodinglog.csv --log-level 2 --csv-log-level 2 -o "raw_video.hevc" "AVS Script.avs"
@echo+
@audio.exe -i "AVS Script.avs" -vn -sn -c:a aac -b:a 320k -ar 48000 "output_file.aac"
pause
I used two different samples and they have two different lengths, but both crashed at different percentages, so I don't think it's related to the source. I'm now trying to encode one more time with the same sample and the same filters, but at 8bit instead of 16bit, just to be sure that it's Dither Tool that is making Avisynth crash.
"encodinglogs.csv" file doesn't contain any info about the crash; it just reports all the frames served by Avisynth to x265 and how they have been encoded.
Any advice? Any suggestion?
Thank you in advance.