updated code not to use ffprobe since it is too slow.