resle
27th January 2018, 08:26
Running software-generated scripts, that look like this...
function CreateTrack(float duration, float afps)
{
duration = Round(duration)
return ResampleAudio(ConvertToMono(BlankClip(duration, fps=afps)),44100)
}
function GetAudio(string file, float duration, float afps)
{
duration = Round(duration)
result = BlankClip(duration, fps=afps)
result = AudioDub(result, DirectShowSource(file))
return ResampleAudio(ConvertToMono(result),44100)
}
function Attach(clip channel, int point, float whole, string file, float duration, float afps)
{
channel = channel.Trim(0, point) + GetAudio(file, duration, afps)
temp = CreateTrack(whole, afps)
return AudioDub(temp, channel)
}
video = ImageSource("S:\temp\render\%05d.png", 0, 3721, 24, true)
audio = CreateTrack(3720, 24)
music = CreateTrack(3720, 24)
fx = CreateTrack(3720, 24)
speech = CreateTrack(3720, 24)
speech = Attach(speech,Round(120),3720,"d:\\000.WAV",48,24)
speech = Attach(speech,Round(216),3720,"d:\\001.WAV",72,24)
speech = Attach(speech,Round(336),3720,"d:\\002.WAV",72,24)
audio = MixAudio(audio, speech, 0.00, 1.00)
audio = MixAudio(audio, fx, 0.50, 0.50)
audio = MixAudio(audio, music, 0.50, 0.50)
return AudioDub(video, audio)
...and passing the output to FFMpeg for x264/aac encoding.
These scripts are generated by custom-made animation software, thousands of them, but all looking like the above.
The problem:
randomly, some of the audio files will be truncated.
If I encode the same video again, the same audio file might or might not be fine. It's entirely random.
WAV files are pcm/mono/44k
FFMpeg 64bit latest build
AVIsynth version: I tried 2.58, 2.60, AVS+ ... same issue
OS - Windows 10 64bit
Any hint? Anyone stumbled on the same problem in the past?
Thanks
function CreateTrack(float duration, float afps)
{
duration = Round(duration)
return ResampleAudio(ConvertToMono(BlankClip(duration, fps=afps)),44100)
}
function GetAudio(string file, float duration, float afps)
{
duration = Round(duration)
result = BlankClip(duration, fps=afps)
result = AudioDub(result, DirectShowSource(file))
return ResampleAudio(ConvertToMono(result),44100)
}
function Attach(clip channel, int point, float whole, string file, float duration, float afps)
{
channel = channel.Trim(0, point) + GetAudio(file, duration, afps)
temp = CreateTrack(whole, afps)
return AudioDub(temp, channel)
}
video = ImageSource("S:\temp\render\%05d.png", 0, 3721, 24, true)
audio = CreateTrack(3720, 24)
music = CreateTrack(3720, 24)
fx = CreateTrack(3720, 24)
speech = CreateTrack(3720, 24)
speech = Attach(speech,Round(120),3720,"d:\\000.WAV",48,24)
speech = Attach(speech,Round(216),3720,"d:\\001.WAV",72,24)
speech = Attach(speech,Round(336),3720,"d:\\002.WAV",72,24)
audio = MixAudio(audio, speech, 0.00, 1.00)
audio = MixAudio(audio, fx, 0.50, 0.50)
audio = MixAudio(audio, music, 0.50, 0.50)
return AudioDub(video, audio)
...and passing the output to FFMpeg for x264/aac encoding.
These scripts are generated by custom-made animation software, thousands of them, but all looking like the above.
The problem:
randomly, some of the audio files will be truncated.
If I encode the same video again, the same audio file might or might not be fine. It's entirely random.
WAV files are pcm/mono/44k
FFMpeg 64bit latest build
AVIsynth version: I tried 2.58, 2.60, AVS+ ... same issue
OS - Windows 10 64bit
Any hint? Anyone stumbled on the same problem in the past?
Thanks