How to get the length of an mp4 video inside a node?
The length of a video file is stored in the frame_duration property.

num_frames = n.image.frame_duration


If you wanted duration in time, divide the frames by the fps property.

seconds = num_frames / n.image.fps