replace seek with analyzeduration
handle more errors