added seek to find first video packet and shift, and handle audio packets before beginning of segment