VID-424

RFCR @garthwebb @jsutterfield 

Factors out the internal video file pattern recognition so that both video insertion and video upload can use it.
This logic was different in video add vs video insertion in editor and caused fatal error in one case. please see the ticket for more details.