View Full Version : VirtualDub keeps saving segmented files of 300 frames using XviD encoder
eekeek
28th November 2006, 01:10
VirtualDub 1.7.0
AviSynth 2.5 160906
Koepi's XviD 1.1.2-01112006
Source video is 25fps but when I save to segmented avi files and choose 500 frames for each segment, it creates segments of 300 frames.
It works perfectly with HuffYUV, but not with XviD, why?
Pookie
28th November 2006, 03:56
A bug. Same thing on my system when trying to save segmented AVIs. I ended up with a folder of around 500x2MB files. That's why v1.70 is called "experimental". Some very nice new features, but the app isn't ripe yet.
squid_80
28th November 2006, 07:25
I don't think it's a bug. The way segmented avi files are written has been changed to only split at keyframes. I'm guessing you left the max keyframe interval setting at the default of 300? Try changing it to 250.
eekeek
28th November 2006, 16:40
I don't think it's a bug. The way segmented avi files are written has been changed to only split at keyframes. I'm guessing you left the max keyframe interval setting at the default of 300? Try changing it to 250.
Thanks, that fixed the problem, I set it to 500 for 500 frame segments.
dloneranger
30th November 2006, 17:54
I don't think it's a bug. The way segmented avi files are written has been changed to only split at keyframes. I'm guessing you left the max keyframe interval setting at the default of 300? Try changing it to 250.
Yup that's how it works
The question is why
If Virtualdub split the source into chunks of the right length and fed those to the encoder as separate items it would give the correct output
Also, just setting the encoders max keyframes can easily be thrown off by scene changes
squid_80
30th November 2006, 18:12
Setting the interval to the same value as the segment size is probably a bad idea. Ideally you would want to pick a max keyframe interval that is a factor of the desired segment size, and small as possible within your bitrate/size limits. That's why I suggested 250, if you had the bitrate to spare you could try 125, 100 or even 50 to minimize the undersizing caused by scene changes.
dloneranger
30th November 2006, 18:19
Setting the interval to the same value as the segment size is probably a bad idea. Ideally you would want to pick a max keyframe interval that is a factor of the desired segment size, and small as possible within your bitrate/size limits. That's why I suggested 250, if you had the bitrate to spare you could try 125, 100 or even 50 to minimize the undersizing caused by scene changes.
Understood :-)
I'm wondering why VDub splits on the outgoing data, and not the incoming
Ideally I'd see it as an easy way to do the same as marking frames 0-499, saving that, marking 500-999, saving - etc etc etc
But this would need VDub to be changed to cut the source, not the output
squid_80
30th November 2006, 18:31
The encoder decides where to put keyframes, not virtualdub.
dloneranger
30th November 2006, 19:40
The encoder decides where to put keyframes, not virtualdub.
Yes, this is true
[edit]
Doh! I wasn't thinking about direct stream copying
forget everything I've written - it's nonsense
squid_80
1st December 2006, 02:31
The source is not always uncompressed. You may be using direct stream copy mode or capturing with a card that uses hardware compression.
With mpeg4 codecs that use b-frames, you may actually get more frames back than the original due to b-frame lag. The extra frames aren't accessible since they're packed together with the final frame, all they really do is take up space. You'd be using up a lot of bits unnecessarily if this happened at the end of every 500 frame segment.
eekeek
3rd December 2006, 19:50
Setting the interval to the same value as the segment size is probably a bad idea. Ideally you would want to pick a max keyframe interval that is a factor of the desired segment size, and small as possible within your bitrate/size limits. That's why I suggested 250, if you had the bitrate to spare you could try 125, 100 or even 50 to minimize the undersizing caused by scene changes.
Aah yes, thats true, thanks for your help squid_80 :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.