[MPlayer-users] 2 pass encoding / encode sound twice?

Ville Saari 113762 at foo.bar.org
Tue Apr 20 17:08:35 CEST 2004


On Mon, Apr 19, 2004 at 11:27:55PM -0400, D Richard Felker III wrote:

> Resyncronization isn't possible. All it could do is bail out with an
> error. If any frames are missing or added, then the number of bits
> needed to code subsequent frames changes totally!

Only until the next keyframe. After that everything should be fully
synchronized.

And even in the absence of keyframes the effect should not be completely
chaotic. If a p-frame was lost, then the next b-frame would be promoted
to a p-frame and its bit-budget would change totally. The next p-frame
and the remaining b-frames before it would have to use different frame
as reference and their bit-budget would change somewhat, but the resulting
next p-frame would be almost identical to its pass-1 conterpart and the
effect to the rest of the video would be negligible.

If the lost frame was a b-frame, it wouldn't affect anything (besides the
bit-savings of not encoding that frame).

If it was an i-frame, the case is similar to a p-frame except that
the bit budget of the next frame would change even more because it
has to be promoted to i-frame to respect the requested keyint.

The duplicated frames would have different effect, but that shouldn't
propagate too far either.

The key to localizing the effect is to keep the ipb-pattern in sync
between passes. The resulting video would then have some discontinuities
in the pattern where the frames were skipped or duplicated, but if the
requested keyint and vmax_b_frames values are not exceeded, who cares?

-- 
 Ville




More information about the MPlayer-users mailing list