i'm trying to encode one of my tape transfers via an avisynth script through ffmpeg. for some reason the process is stopping randomly in the middle of the encode with no error message. i loaded the script up in virtualdub and tried an encode, but i get this error after a while:
is there a fix? my source files are ffv1+flac. i'm running 64-bit avisynth+ 3.7.3 r4003
my script:
ffmpeg commands i've tried:Code:setmemorymax(65536) v = lwlibavvideosource("g:\virtualdub\tape transfers\heat vs boston games 3 and 4 2012.mkv", fpsnum=30000,fpsden=1001) a = lwlibavaudiosource("g:\recordings\heat vs boston games 3 and 4 2012.flac") audiodub(v,a) delayaudio(-.300) assumetff().converttoyuv422(matrix="rec601", interlaced=true).convertbits(10) Levels(95, 1,965, 0, 1020, coring=false,dither=true).tweak(bright=0, cont=1.00, hue=-0, sat=1.00, coring=false, dither=true).convertbits(8) #turnRight().Histogram().TurnLeft() Trim(263, 567113) separatefields() LSFplus(ss_x=1.5, ss_y=1.5, secure=false, Spwr=2, SdmpHi=0, soothe=false, keep=25) FineDehalo(rx=2.5, ry=1.0) neo_dfttest(sigma=105, tbsize=5) weave() f3kdb(dynamic_grain=true) converttoyv12(matrix="rec601", interlaced=true) prefetch(8)
Code:ffmpeg -hwaccel auto -i "script.avs" -vf setfield=tff -c:v libx264 -x264opts tff=1 -x264-params opencl=true -crf 18 -b:v 0K -preset slow -aspect 652:480 -c:a libopus -b:a 192k -vbr on -compression_level 10 -frame_duration 60 -sample_fmt s16 -y "output.mkv"i also tried a fast recompress to magicyuv in virtualdub, and i got the access violation error mentioned above.Code:ffmpeg -i "script.avs" -c:v utvideo -c:a copy "output.avi"
+ Reply to Thread
Results 1 to 9 of 9
-
-
Maybe errors in the video or audiostream?
You could scan both streams with ffmpeg:
Code:FFmpeg.exe -i "inputfile" -f null -
-
-
-
trying that now. unfortunately that's probably gonna be a temporary solution, since my encoding speed is a lot slower now.
before that, i rebooted my pc and had another go at it, and i finally got an error message in ffmpeg.
Code:[avisynth @ 000001ee95f73d40] LWLibavVideoSource: failed to make a frame [in#0/avisynth @ 000001ee95f73ac0] Error during demuxing: Unknown error occurred
Last edited by ENunn; 16th Mar 2025 at 14:33.
-
-
Random stops when using Prefetch are pretty common. There are two things to try. First, try adding a SetMemoryMax(1024) command as the first statement. You can play around with how much memory to allocate.
The other thing is to change the Prefetch number. I always test my script before letting it run. Since I usual VirtualDub to run the scripts, I start a "Video Analysis Pass" and let it crank for 10-20 seconds. While this runs, I note the fps. Very often this will start out at one speed and either speed up or slow down. Note the reading after it has settled down. Then, repeat the test for a smaller Prefetch. You will find that the differences in fps are not at all linear, e.g., Prefecth(3) does NOT produce half the fps as Prefetch(6). In fact, sometimes it will get faster. Your goal is to find the sweet spot. The optimal point is also usually much more stable and should avoid your crashes.
Similar Threads
-
Automatic script Avisynth
By gelo333 in forum Newbie / General discussionsReplies: 10Last Post: 13th Dec 2023, 11:09 -
help avisynth script for cartoon
By david.dgc in forum Video ConversionReplies: 27Last Post: 22nd Jul 2023, 05:06 -
Avisynth script to MPEG2 - What to do?
By ENunn in forum Video ConversionReplies: 15Last Post: 14th Jul 2023, 10:48 -
Avisynth script for Muxing
By Donnje in forum EditingReplies: 14Last Post: 15th Jun 2021, 17:07 -
What do you think about the result of my AviSynth script
By ingoldie in forum RestorationReplies: 30Last Post: 18th Nov 2020, 11:35