How to get the length of an mp4 video inside a node? Work with python in blender 2.8 , i try to find a command for get the lenght of an video inside at image node.

ob = bpy.context.active_object
nodes = ob.active_material.node_tree.nodes

    for n in nodes:
        if n.name == "Image Texture":
            if n.image:
                video = n.image
                ##print(video.lenght)##
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