Instead of picking the first segment returned by the db (i.e. possibly random), sort segments by submission time and use the oldest visible segment with a non-zero video duration.