the best system design for that problem is while uploading video also you save the metadata in a Redis for example duration, file type, quality and more