peterhuh
28th September 2013, 16:00
Hi!
I was editing on some gaming footage I captured last night, I came to notice that if the total length of my video is around 12.5 hours or longer, then there will be no sound.
I am not sure if this is an issue with AVISynth or VirtualDub.
After fiddling for an hour, it seems that there is some limitations on the total number of audio samples when serving from AVISynth to VirtualDub.
To replicate this problem, try this script:
BlankClip(length=44740, fps=1, audio_rate=48000)
will give this:
http://imageshack.us/a/img23/5770/x3ef.png
in VirtualDub, which is roughly 12 hours and 25 minutes.
Note the negative audio length.
But if the video is shorter by 1 second:
BlankClip(length=44739, fps=1, audio_rate=48000)
will give this:
http://imageshack.us/a/img834/7730/w9xg.png
and the audio works fine.
My guess is that the total number of audio sample is limited by a certain 31-bit value: 2^31 = 2147483648.
My current solution is to break up the video into smaller clips for encoding, and then joining them back with VirtualDub's Append AVI feature. I do not like this solution as I will be restricted to use AVI and furthermore, VirtualDub's Append AVI feature does not seem to keep A/V synchronized by padding or discarding audio samples.
I'm wondering if anyone had a better work around, or it's something that I've missed? I still prefer to use AVISynth. If this is not considered a bug, I hope that the AVISynth Dev. Team or Avery Lee may take this as my feature request.
Yes, it takes me 13 hours to beat BioShock Infinite.
Thanks for reading. :)
-
I was editing on some gaming footage I captured last night, I came to notice that if the total length of my video is around 12.5 hours or longer, then there will be no sound.
I am not sure if this is an issue with AVISynth or VirtualDub.
After fiddling for an hour, it seems that there is some limitations on the total number of audio samples when serving from AVISynth to VirtualDub.
To replicate this problem, try this script:
BlankClip(length=44740, fps=1, audio_rate=48000)
will give this:
http://imageshack.us/a/img23/5770/x3ef.png
in VirtualDub, which is roughly 12 hours and 25 minutes.
Note the negative audio length.
But if the video is shorter by 1 second:
BlankClip(length=44739, fps=1, audio_rate=48000)
will give this:
http://imageshack.us/a/img834/7730/w9xg.png
and the audio works fine.
My guess is that the total number of audio sample is limited by a certain 31-bit value: 2^31 = 2147483648.
My current solution is to break up the video into smaller clips for encoding, and then joining them back with VirtualDub's Append AVI feature. I do not like this solution as I will be restricted to use AVI and furthermore, VirtualDub's Append AVI feature does not seem to keep A/V synchronized by padding or discarding audio samples.
I'm wondering if anyone had a better work around, or it's something that I've missed? I still prefer to use AVISynth. If this is not considered a bug, I hope that the AVISynth Dev. Team or Avery Lee may take this as my feature request.
Yes, it takes me 13 hours to beat BioShock Infinite.
Thanks for reading. :)
-