while an exact answer is difficult for me to provide, it does seem that the reason for sparking is soot due to diesel.
from the video's description, it looks like the region is newly electrified and that only a few passenger trains operate on electric traction. rest do so on diesel, and the soot from unburnt diesel leads to the wire behaving as an insulator at certain stretches, thereby leading to poor contact by panto and causing sparking.