Is there a way to merge this function with the videocommon one? I'm still fine if not.