Printable Version of Topic
Click here to view this topic in its original format
Unofficial VirtualDub Support Forums > Testing / Bug Reports > No Audio In If Segmented Avi Shorter Than 1 Second


Posted by: ^rooker Apr 19 2012, 01:09 PM
When using "save segmented avi", there is no audio data written to a segment which is shorter than 1 second (in my case PAL: <=24 frames).

Steps to reproduce:
1) Open a 25fps video
2) Set Video/Audio to "Direct stream copy"
3) select the first 24 frames
4) Choose "File > Save segmented avi" and set "Limit number of video frames per segment" to 1500 (=1 minute PAL)
5) Open the resulting avi (=24 frames duration)
6) Choose "File > File Information".

It says: "Length: 0 samples"


I know this sounds like a super-exotic "who-the-hell-would-need-this-to-work" request, but in our current workflow, we are storing hours of lossless FFv1-compressed AVIs in 1-minute segments for long-term video archiving purposes.

I have reproduced this behavior with 64bit Virtualdub version 1.9.11 as well as 1.10.1: Same behavior.

Posted by: ^rooker Apr 19 2012, 01:13 PM
Just wanted to add that when saving the same sub-second range (<=24 frames) with the regular "File > Save as AVI" command, the resulting file works fine.

Posted by: phaeron Apr 21 2012, 10:29 PM
I just did a test locally and was unable to reproduce this. Is there audio compression involved, and if so, does a file with uncompressed audio show any different behavior?

Posted by: ^rooker Apr 23 2012, 09:55 AM
Thanks for taking a look at it smile.gif
The audio is uncompressed pcm_s16le 48kHz.

I've uploaded a 1-second (25 frames) sample (video: PAL FFv1, audio: uncompressed 48kHz pcm_s16le):
http://download.das-werkstatt.com/pb/mthk/FFv1-Examples/v-02357_01-1sec-ffv1-VHS.avi


I have verified that I can reproduce the problem with that file:

1) Open the file
2) Video: full processing mode, Audio > full processing mode
3) Go: Beginning (=frame 0) / Edit: Set selection start
4) Go: End (=frame 25)
5) Go: Prev keyframe (=frame 24)
6) Edit: Set selection end
7) File: Save segmented avi
8) Limit number of video frames per segment: 1500 frames



Posted by: ^rooker Apr 26 2012, 12:35 PM
Could you reproduce it?

Posted by: Abrazo Apr 26 2012, 07:48 PM
Just for your information, I did a test with the "32-bit" version of VirtualDub 1.9.11 and could easily reproduce this problem.
(I do not have the possibility to do a test with the "64-bit" version.)

From the moment there are less than 25 frames in the selection and you combine this with "save segmented avi" you do not have audio in the resulting file, not with "Full compression", nor with "Direct Stream copy" selected in the Audio-menu.

One could call this a 'minor' bug and maybe it would be good to resolve it, if possible ?

May we suppose that chances are low that you will have an original video file of less than 25 frames, when you have the intention to split up your files in pieces of 1500 frames each ?

Posted by: Abrazo Apr 26 2012, 08:36 PM
Audio > Interleaving > defaults:

- Enable audio/video interleaving = checked/actif
- Preload = 500 ms
- Interleaving audio every "1" "frames"
- Delay audio track by 0 ms

Changing the "Preload" from 500 ms to 0 ms seems to make the difference ...

Posted by: phaeron Apr 30 2012, 02:27 AM
Okay, yes, now I can reproduce the problem, thanks to Abrazo's investigative work. It is indeed related to the preload, or more precisely, when the preload time exceeds the frame count for the last segment. I'll see if I can fix this for 1.10.2.

Posted by: phaeron May 6 2012, 10:13 PM
Try test-9 in the pinned 1.10.2 testing thread, which has an attempted fix for the issue.

Posted by: ^rooker May 7 2012, 09:59 AM
I've checked with v1.10.2-test9 (http://www.virtualdub.org/beta/VirtualDub-1.10.2-test9-AMD64.zip), and creating a <25 frames segment contains the audio now.
File information lists the correct number of samples.

Thank you very much!

@Abrazo:
The problem appeared when segmenting a movie where the very last segment had less than 24 frames. I wasn't going to segment a <25 frames video smile.gif

Posted by: Abrazo May 7 2012, 05:30 PM
Thanks for the feedback and clarifying things.

So, for you, the problem was only there when the very last segment had a total of less than 25 frames
(= rest-segment after dividing the videofile in segments of 1500 frames each).

It was almost a real coincidence to discover this little shortcoming.

Posted by: ^rooker May 8 2012, 01:53 PM
Actually it *was* a conincidence that we discovered this shortcoming wink.gif

However: Thank you very much for taking care of it!
Virtualdub's greatness is that it does the things it does reliably and precisely. Thank you.

Powered by Invision Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)