mrithul e
mrithul e

Reputation: 91

how to play video using python in full screen

I want to play a video on full screen using python but when I played the video using cv2 and moviepy' preview function the play back is not perfect

when playing video using Windows's video player the video is smooth and full screen but when using moviepy or cv2 the video is full screen but four sides of the video is cropped and the video playback is very lag

when playing the video the codes below the video player code's should also work ,

I mean :

rough code:

#video playing code
...
...
...
...
while True:
  print("hi")

the loop should run at the same time the video is playing not after the video playing finished , thanks

Upvotes: 0

Views: 265

Answers (2)

mrithul e
mrithul e

Reputation: 91

the problem is solved using the vlc python library

Upvotes: 0

Dat Le
Dat Le

Reputation: 59

You should use another thread (multithreading) for the cv2 video loading, the loop will run at the same time with the video playing.

This thread maybe help you solve your problem.

Upvotes: 0

Related Questions