duration calculated by number of medias