Why does my FFmpeg command cause the video image to freeze when using NVENC?

No matter what I try, whenever I use NVENC instead of libx264 with my FFmpeg command, the audio works perfectly fine, but the image freezes somewhere around the middle of the video. The video itself continues playing normally, with the audio still playing, but the image remains frozen for the rest of the video.

My command already works with libx264, but the encoding process is very slow. I suspect there might be a bottleneck when using NVENC.

Interestingly, the problem might not lie with NVENC itself, when I remove the audio effects and timer and use NVENC alone, everything works fine without any video freezing:

ffmpeg -y -i 1.mp4 -filter_complex "[0:v]scale=1280:720,setdar=16/9" -c:v h264_nvenc -cq 30 -c:a aac     -b:a 192k -pix_fmt yuv420p -preset p5 -rc vbr -b:v 0 -r 30 -g 60 out.mp4

Main code:

ffmpeg -y -i 1.mp4 -filter_complex [0:v]scale=1280:720,setdar=16/9[v];[0:a]asplit=2[a0][b0];[a0]volume=0.9,pan=stereo|c0<c0+0*c1| <c0+0*c1,aeval=val(0)|-val(1),volume=0:enable='lt(mod(t,4),2)'[a];[b0]volume=0.8,pan=stereo|c0<0*c0+c1|c1<0*c0+c1,aeval=-val(0)| val(1),volume=0:enable='gt(mod(t,4),2)'[b];[a][b]amix=inputs=2,aformat=channel_layouts=stereo[aout]" -map "[v]" -map "[aout]" -c:v h264_nvenc -cq 30 -c:a aac -b:a 192k -pix_fmt yuv420p -preset p5 -rc vbr -b:v 0 -r 30 -g 60 -ac 2 -channel_layout stereo out.mp4

How can I fix and optimize my FFmpeg filter chain?