Video not showing on HDMI out

Here is the code which I am running:

# monitor configuration: 640*480 @ 60Hz
Mode = VideoMode(640,480,24)
hdmi_out = base.video.hdmi_out
hdmi_out.configure(Mode,PIXEL_BGR)
hdmi_out.start()

# camera (input)configuration
frame_in_w = 640
frame_in_h = 360

# initialize camera from OpenCV
videoIn = cv2.VideoCapture('./video.mp4')
videoIn.set(cv2.CAP_PROP_FRAME_WIDTH, frame_in_w);
videoIn.set(cv2.CAP_PROP_FRAME_HEIGHT, frame_in_h);

import numpy as np
ret, frame_vga = videoIn.read()
print(ret)
while(1):
  #print(ret)
  #cv2.imshow('frame',frame_vga)
  outframe = hdmi_out.newframe()
  outframe[0:360,0:640,:] = frame_vga[0:360,0:640,:]
  hdmi_out.writeframe(outframe)

If I print ret, it’s value is true but nothing will show up on monitor.

I fixed it by moving ret, frame_vga = videoIn.read() into while loop