Log in

View Full Version : 12.5 hour video = No sound.


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. :)



-

Asmodian
30th September 2013, 20:09
You can join two videos with a lot more tools than just VirtualDub. There was a new option added to x264 (--stitchable) to create video that can be spliced and I believe Mkvtoolnix can do the splice.

filler56789
30th September 2013, 20:55
BlankClip(length=44800, fps=1, audio_rate=48000)
Info()

Avisynth says:

Audio length: 2150400000 samples. 12:26:40:000

So it seems the fault is of VirtualDub.

Groucho2004
30th September 2013, 21:53
So it seems the fault is of VirtualDub.
Yes, it is. Avisynth implements the number of audio samples as "__int64" and therefore has no trouble with your clip.
Somewhere in VDub the number of samples seems to get truncated to 32 bit int, hence the negative displayed value.

peterhuh
2nd October 2013, 09:41
Thanks for the responses.
I believe this thread should be moved then.

Would the admin kindly move this thread to VirtualDub instead?
Thanks in advance.

Guest
2nd October 2013, 10:56
Would the admin kindly move this thread to VirtualDub instead? Bump after forum move.

peterhuh
3rd October 2013, 09:58
Thanks again neuron2.

I successfully compressed and appended all clips to form a single 13.5-hour video. Everything works fine except when I compress the audio with LAME ACM.

If I leave it as PCM, no problem:
http://img208.imageshack.us/img208/7205/uru9.png


With MP3, VirtualDub compresses without errors but freezes upon playback:
http://img46.imageshack.us/img46/3306/leir.png


Funny, ADPCM works fine:
http://img826.imageshack.us/img826/2939/t1xq.png