(Meredith) -- A family in Greencastle, Pennsylvania, is lucky to be alive after they were almost hit by an oncoming train.
In a video that's making its rounds across the internet, you can see the family -- including young children -- having their photos taken on the train tracks by a photographer. In between photos, the kids and adults are seen walking and playing on the tracks.
Suddenly, a train can be heard in the distance.
You can hear one family member yell, "Here comes a train!" right it comes into view. Quickly, everyone scatters across the tracks, hoping to get to safety. One by one, each person is able to get off the tracks, including one of the children, who avoids the train with seconds to spare.
One person, Sami Lynn Mentzer, posted the video on Facebook with the following caption:
"An entire family could have been killed earlier due to their stupidity here in front of our local live cam in Greencastle, PA. Edit to add: there were 8 people there total. Mom, Dad, 2 girls, 3 boys and a photographer."
Virtual Railfan, Inc., who provided the video, reminds everyone to stay off train tracks -- not only for your safety, but because railroad tracks are private property. You can be charged with trespassing if caught on a railroad. Trains also cannot stop quickly to avoid collisions, and never assume tracks are abandoned or inactive. It takes the average freight train traveling at 55 mph more than a mile to stop.
You can learn more about train safety from Operation Lifesaver here.