I just went through the VirtualDub code and i decided to give some more
info on just how Frame Droping workes.
becouse i'm no programmer but i do read C++ (a bit
) i will try
to avoide code issues and stick to theory:
As i understand, Frame Droping is depended on the audio~video synch;
when the program detects that the audio is frozen (the video takes to
long to decompress and the program can't go on with the video) the
program takes a few steps.
Becouse BSPlayer proberly already can detect bad frames and drop them,
it should already have the capabilty to detect frozen audio as part of it's
bad frame analysis (have i mentioned this programming stuff is not my
strong side ?).
Lets take the asumption that the frozen audio has been detected and all
is well up to this point;
the following is a qoute from VirtualDub code(//note):
"Attempt to drop a frame before the decoder. Droppable frames (zero-
byte or B-frames) can be dropped without any problem without question.
Dependant (P-frames or delta frames) and independent frames (I-frames
or keyframes) should only be dropped if there is a reasonable
expectation that another independent frame will arrive around the time
that we want to stop dropping frames, since we'll basically kill decoding
until then."
"around the time" should be configured by the user (edit box) and be
depended on the quality of the video and it's FPS rate + the decoding
quality (low quality in decoding means better preformences which means
drping less frames) + user Frame Droping Quality choice (if the user set
low quality then the program dropes a lot of frames).
but lets do what VirtualDub did and ignore all this nice calculatins and just
fix a constant of 2 frames to be droped and when needed jump to the next
keyframe/other independed frame?*.
Well i guses that is it, the frames are drpped the audio is synched to the
video and a slow computer can run hi quality videos with reasonable
quality.
*as metioned in the VirtualDub note, their are special independet frames
that should be handled diffrently, on this i won't go through becouse
i'm not an expert on divx or avi or any video compressin/codeing and
all i know is that if you want a video to be capable of handleing coruption
that is usaly found on removeable media and network connections then
you should use a lot of keyframes every half a second or so (so only that
segment of the movie will be impared).
P.S: i don't know if this is avilable but if their is a like VBR video
(keyframes only appear in scenes that are constantly changing and the
the colors are changing rapidly - action scince fiction stuff) then the 2
droped frames constant becomes very logical.