Log in

View Full Version : Livelock in VirtualDub2 processing a sequence of WMV clips in AviSynth+


LigH
27th July 2023, 13:23
Do you have any recommendation how to open a sequence of WMV clips in AviSynth+ to concatenate and recode them to a continuous clip?

Would you prefer L-SMASH Source, FFMS2, or a different source filter?

Do you have any experience regarding the sync at their ends, e.g. would recommend trimming them at the last frame or one before?

My current attempt looks good so far...

# sequence of file names here...

c1 = AudioDub(LwLibavVideoSource(fn1), LwLibavAudioSource(fn1)).Trim(0, 0)
c2 = AudioDub(LwLibavVideoSource(fn2), LwLibavAudioSource(fn2)).Trim(0, 0)
c3 = AudioDub(LwLibavVideoSource(fn3), LwLibavAudioSource(fn3)).Trim(0, 0)
c4 = AudioDub(LwLibavVideoSource(fn4), LwLibavAudioSource(fn4)).Trim(0, 0)
c5 = AudioDub(LwLibavVideoSource(fn5), LwLibavAudioSource(fn5)).Trim(0, 0)
c6 = AudioDub(LwLibavVideoSource(fn6), LwLibavAudioSource(fn6)).Trim(0, 0)
c7 = AudioDub(LwLibavVideoSource(fn7), LwLibavAudioSource(fn7)).Trim(0, 0)
c8 = AudioDub(LwLibavVideoSource(fn8), LwLibavAudioSource(fn8)).Trim(0, 0)

return AlignedSplice(c1, c2, c3, c4, c5, c6, c7, c8).Deblock_qed().Normalize(0.7)

But I'm open for recommendations from practical experience.

LigH
27th July 2023, 15:59
Well, there is an issue... writing MP4 +faststart with x264 8bit and FFmpeg AAC out of VirtualDub2 x64.

[i] Dub: I/O thread has not cycled for thirty seconds -- possible livelock.
(Thread action: stalled due to full pipe to processing thread) (Current
address: 00007FFEC538DB34)

[i] Dub: Processing thread has not cycled for thirty seconds -- possible
livelock. (Thread action: running main loop) (Current address:
00007FFEC538D0E4)

[i] Dub: I/O thread has not cycled for thirty seconds -- possible livelock.
(Thread action: stalled due to full pipe to processing thread) (Current
address: 00007FFEC538DB34)

[i] Dub: Processing thread has not cycled for thirty seconds -- possible
livelock. (Thread action: running main loop) (Current address:
00007FFEC538D0E4)

[i] Dub: I/O thread has not cycled for thirty seconds -- possible livelock.
(Thread action: stalled due to full pipe to processing thread) (Current
address: 00007FFEC538DB34)

When I abort, there is also a deadlock trying to abort the dubbing, and VirtualDub2 is closed forcefully.

The resulting MP4 file does not play in MPC-HC, I guess the "faststart" header update did not happen.

LigH
27th July 2023, 17:33
I tweaked the script a bit and my last attempt passed, at least once. I hope it works reliably for all other batches...

# sequence of file names here...

c1 = AudioDub(LwLibavVideoSource(fn1), LwLibavAudioSource(fn1)).EnsureVBRMP3Sync().Trim(0, 0)
c2 = AudioDub(LwLibavVideoSource(fn2), LwLibavAudioSource(fn2)).EnsureVBRMP3Sync().Trim(0, 0)
c3 = AudioDub(LwLibavVideoSource(fn3), LwLibavAudioSource(fn3)).EnsureVBRMP3Sync().Trim(0, 0)
c4 = AudioDub(LwLibavVideoSource(fn4), LwLibavAudioSource(fn4)).EnsureVBRMP3Sync().Trim(0, 0)
c5 = AudioDub(LwLibavVideoSource(fn5), LwLibavAudioSource(fn5)).EnsureVBRMP3Sync().Trim(0, 0)
c6 = AudioDub(LwLibavVideoSource(fn6), LwLibavAudioSource(fn6)).EnsureVBRMP3Sync().Trim(0, 0)
c7 = AudioDub(LwLibavVideoSource(fn7), LwLibavAudioSource(fn7)).EnsureVBRMP3Sync().Trim(0, 0)
c8 = AudioDub(LwLibavVideoSource(fn8), LwLibavAudioSource(fn8)).EnsureVBRMP3Sync().Trim(0, 0)

AlignedSplice(c1, c2, c3, c4, c5, c6, c7, c8)
EnsureVBRMP3Sync()
Trim(0, 0)
Deblock_qed()
Normalize(0.7)
Prefetch(4)

LigH
27th July 2023, 20:24
Unfortunately, this trick helped only in case I concatenate several clips. When I process only one single file, the livelock is persistent.
__

Well, it's unreliable, but usually it finishes after 5-10 minutes after the end of the dubbing.