I want to play a MP4 Named startup.mp4 fullscreen. I've tried this code :
from os import startfile
startfile("C:/Users/idekmauser/desktop/startup.mp4")
It does play but not fullscreen how can I make it play fullscreen
I want to play a MP4 Named startup.mp4 fullscreen. I've tried this code :
from os import startfile
startfile("C:/Users/idekmauser/desktop/startup.mp4")
It does play but not fullscreen how can I make it play fullscreen
You Must Give The Directory As A String Like This
"C:\Users\idekmauser\desktop\startup.mp4"
and not this
C:\Users\idekmauser\desktop\startup.mp4
And You Can Run Your MP4 With This Snippet
from os import startfile
startfile(r"C:\Users\idekmauser\desktop\startup.mp4")
For Reference: [os.startfileDocs] [StackOverflow]
The error is caused by i guess you adding C:\Users\idekmauser\desktop\startup.mp4
in the begning of the file which is not a string
Your code should look something like this
from os import startfile
def play_movie():
startfile("C:/Users/idekmauser/desktop/startup.mp4")
play_movie()
Otherwise to play sounds you can use a Library like playsound
So you start by first installing it
pip3 install playsound
After that your code should look something like this
from playsound import playsound
playsound("C:/Users/idekmauser/desktop/startup.mp4")