Add duration in metadata