def _get_frames_bytes(self):
        """Computes the total size of the frame documents in the collection."""
        if not self._contains_videos():
            return None

        # Impl note: this pipeline does not suffer the same fate as
        #   _get_samples_bytes, likely because the Slot Based Execution engine
        #   is not used due to additional stage complexity. However, until the
        #   underlying issue is addressed, it is more future-proof to use the
        #   same workaround here rather than rely on the SBE engine not
        #   being used in this case.
        pipeline = [
            {"$unwind": "$frames"},
            {"$replaceRoot": {"newRoot": "$frames"}},
            {"$project": {"size": {"$bsonSize": "$$ROOT"}}},
            {
                "$group": {
                    "_id": None,
                    "size_bytes": {"$sum": "$size"},
                }
            },
        ]

        results = self._aggregate(pipeline=pipeline, attach_frames=True)

        try:
            return next(iter(results))["size_bytes"]
        except:
            return 0
Computes the total size of the frame documents in the collection.
fiftyone/core/collections.py