Capture video only for selected test cases

Is there a way to capture videos only for individual test cases?