Re: Not the first time I've seen a video like that
did no-one program in a way for the car to recognise a rail crossing
It wouldn't be easy since some have gates, some just have lights, it is not uncommon for them to be angled, etc. One hopes that the maintenance is good on them but there are probably some situations where you have either the lights or the bell not operating so a self driving car will need to be able to "hear" the bell even if the light isn't flashing or is perhaps blocked by driven snow (LEDs suck for melting snow off, that was never a problem with incandescent lights)
It is also common to see trains that are "near" the crossing (i.e. stopped up the tracks a bit to unload) will trigger the lights and bell but the correct move is to stop, look both ways, then cross. Sometimes crossing with gates even do that - the lights and bell are going but the gate is up. I'm not sure exactly how that works, maybe the train is able to command the gate to be raised if it is going to sit around in the area without blocking the crossing.
Sometimes in situations like that the train will be moving, so the lights and bell will be flashing/ringing, then stop, then start again as the train moves around up the way a bit perhaps to push a few cars off onto a siding and/or add a few cars.
There is a lot of nuance to crossings beyond "if the lights are flashing and the gate is down you have to stop" that a self driving car will have to deal with. You don't want to program one to always stop for flashing lights and bells because in some places it might end up sitting there for a few hours while angry drivers honk and are forced to drive around it.