Make code more robust for some corrupted videos
Improve `fgRanked`