Abstract-Very low bit-rate video coding algorithms using content-based generated patterns to segment out moving regions at macroblock level have exhibited good potential for improved coding efficiency when embedded into the H.264 standard as extra mode. This content-based pattern generation (CPG) algorithm provides local optimal result as only one pattern can be optimally generated from a given set of moving regions. But, it failed to provide optimal results for multiple patterns from entire sets. Obviously, a global optimal solution for clustering the set and then generation of multiple patterns enhances the performance farther. But a global optimal solution is not achievable due to the non-polynomial nature of the clustering problem. In this paper, we proposed a near optimal contentbased pattern generation (OCPG) algorithm which outperforms the existing approach. Coupling OCPG, generating a set of patterns after clustering the macroblocks into several disjoint sets, with direct pattern selection algorithm by allowing all the macroblocks in multiple pattern modes outperforms the existing pattern-based coding while both embedded into the H.264.