A system for optimizing encoding of media, the system comprising: at least one processor; and one or more computer-readable storage media including instructions stored thereon that, responsive to execution by the at least one processor, cause the system perform operations including: ascertaining that media from a first region of shared media is to be shared and media from a second region of the shared media is to be sharing protected as part of a media sharing experience between a group of participants; causing the media from the second region to be obfuscated with a key image (134; 134a; 134b) to generate obfuscated video data; optimizing an encoding block structure for the media sharing experience to generate an optimized encoding block structure based on one or more of a size of the second region or a position of the second region relative to the shared media, such that the optimized encoding block structure has fewer encoding blocks that include the obfuscated video data than does an existing encoding block structure; encoding the media from the first region and the obfuscated video data according to the optimized encoding block structure to generate encoded video data; and causing the encoded video data to be shared with one or more participants of the group of participants. at least one processor; and one or more computer-readable storage media including instructions stored thereon that, responsive to execution by the at least one processor, cause the system perform operations including: ascertaining that media from a first region of shared media is to be shared and media from a second region of the shared media is to be sharing protected as part of a media sharing experience between a group of participants; causing the media from the second region to be obfuscated with a key image (134; 134a; 134b) to generate obfuscated video data; optimizing an encoding block structure for the media sharing experience to generate an optimized encoding block structure based on one or more of a size of the second region or a position of the second region relative to the shared media, such that the optimized encoding block structure has fewer encoding blocks that include the obfuscated video data than does an existing encoding block structure; encoding the media from the first region and the obfuscated video data according to the optimized encoding block structure to generate encoded video data; and causing the encoded video data to be shared with one or more participants of the group of participants. ascertaining that media from a first region of shared media is to be shared and media from a second region of the shared media is to be sharing protected as part of a media sharing experience between a group of participants; causing the media from the second region to be obfuscated with a key image (134; 134a; 134b) to generate obfuscated video data; optimizing an encoding block structure for the media sharing experience to generate an optimized encoding block structure based on one or more of a size of the second region or a position of the second region relative to the shared media, such that the optimized encoding block structure has fewer encoding blocks that include the obfuscated video data than does an existing encoding block structure; encoding the media from the first region and the obfuscated video data according to the optimized encoding block structure to generate encoded video data; and causing the encoded video data to be shared with one or more participants of the group of participants.